fal 1.21.1__tar.gz → 1.22.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fal might be problematic. Click here for more details.
- {fal-1.21.1/fal.egg-info → fal-1.22.0}/PKG-INFO +1 -1
- {fal-1.21.1 → fal-1.22.0/fal.egg-info}/PKG-INFO +1 -1
- {fal-1.21.1 → fal-1.22.0}/src/fal/_fal_version.py +2 -2
- {fal-1.21.1 → fal-1.22.0}/src/fal/api.py +27 -3
- {fal-1.21.1 → fal-1.22.0}/tests/test_apps.py +35 -0
- {fal-1.21.1 → fal-1.22.0}/.gitignore +0 -0
- {fal-1.21.1 → fal-1.22.0}/Makefile +0 -0
- {fal-1.21.1 → fal-1.22.0}/README.md +0 -0
- {fal-1.21.1 → fal-1.22.0}/docs/conf.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/docs/index.rst +0 -0
- {fal-1.21.1 → fal-1.22.0}/fal.egg-info/SOURCES.txt +0 -0
- {fal-1.21.1 → fal-1.22.0}/fal.egg-info/dependency_links.txt +0 -0
- {fal-1.21.1 → fal-1.22.0}/fal.egg-info/entry_points.txt +0 -0
- {fal-1.21.1 → fal-1.22.0}/fal.egg-info/requires.txt +0 -0
- {fal-1.21.1 → fal-1.22.0}/fal.egg-info/top_level.txt +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/README.md +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/applications/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/applications/app_metadata.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/billing/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/billing/get_user_details.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/create_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/delete_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/get_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/list_user_workflows.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/update_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/files/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/files/check_dir_hash.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/files/upload_local_file.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/users/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/users/get_current_user.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/create_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/delete_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/get_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/list_user_workflows.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/update_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/client.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/errors.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/app_metadata_response_app_metadata.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_detail.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_item.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_extra_data.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_fal_inputs.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_fal_inputs_dev_info.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_prompt.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/current_user.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/customer_details.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/hash_check.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/http_validation_error.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/lock_reason.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/page_comfy_workflow_item.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/page_workflow_item.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/team_role.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/typed_comfy_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/typed_comfy_workflow_update.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/typed_workflow.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/typed_workflow_update.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/user_member.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/validation_error.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_metadata.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_nodes.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_item.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_node.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_node_type.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_input.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_output.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/py.typed +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/types.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/pyproject.toml +0 -0
- {fal-1.21.1 → fal-1.22.0}/openapi_rest.config.yaml +0 -0
- {fal-1.21.1 → fal-1.22.0}/pyproject.toml +0 -0
- {fal-1.21.1 → fal-1.22.0}/setup.cfg +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/__main__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/_serialization.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/_version.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/app.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/apps.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/auth/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/auth/auth0.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/auth/local.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/_utils.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/api.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/apps.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/auth.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/cli_nested_json.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/create.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/debug.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/deploy.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/doctor.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/files.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/keys.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/main.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/parser.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/profile.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/run.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/runners.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/secrets.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/cli/teams.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/config.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/console/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/console/icons.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/console/ux.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/container.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/exceptions/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/exceptions/_base.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/exceptions/_cuda.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/exceptions/auth.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/files.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/flags.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/logging/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/logging/isolate.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/logging/style.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/logging/trace.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/logging/user.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/project.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/py.typed +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/rest_client.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/sdk.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/sync.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/audio/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/audio/audio.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/exceptions.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/file.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/providers/fal.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/providers/gcp.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/providers/r2.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/providers/s3.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/file/types.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/image.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/nsfw_filter/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/nsfw_filter/env.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/nsfw_filter/inference.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/nsfw_filter/model.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/nsfw_filter/requirements.txt +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/image/safety_checker.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/optimize.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/types.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/utils/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/utils/download_utils.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/utils/endpoint.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/utils/retry.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/video/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/toolkit/video/video.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/utils.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/src/fal/workflows.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/assets/cat.png +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/test_apps.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/test_auth.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/test_deploy.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/test_keys.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/test_run.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/cli/test_secrets.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/conftest.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/integration_test.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/mainify_package/__init__.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/mainify_package/impl.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/mainify_package/utils.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/mainify_target.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/test_stability.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/toolkit/file/providers/test_fal_retry.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/toolkit/file_test.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/toolkit/image_test.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/toolkit/test_types.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tests/toolkit/utils/retry.py +0 -0
- {fal-1.21.1 → fal-1.22.0}/tools/demo_script.py +0 -0
|
@@ -33,6 +33,8 @@ import uvicorn
|
|
|
33
33
|
import yaml
|
|
34
34
|
from fastapi import FastAPI
|
|
35
35
|
from fastapi import __version__ as fastapi_version
|
|
36
|
+
from fastapi.encoders import jsonable_encoder
|
|
37
|
+
from fastapi.exceptions import RequestValidationError
|
|
36
38
|
from packaging.requirements import Requirement
|
|
37
39
|
from packaging.utils import canonicalize_name
|
|
38
40
|
from pydantic import __version__ as pydantic_version
|
|
@@ -613,8 +615,8 @@ class FalServerlessHost(Host):
|
|
|
613
615
|
def result_handler(partial_result):
|
|
614
616
|
ret.stream = partial_result.stream
|
|
615
617
|
for log in partial_result.logs:
|
|
616
|
-
if "
|
|
617
|
-
ret.url = log.message.rsplit()[-1]
|
|
618
|
+
if "And API access through" in log.message:
|
|
619
|
+
ret.url = log.message.rsplit()[-1].replace("queue.", "")
|
|
618
620
|
ret.logs.put(log)
|
|
619
621
|
|
|
620
622
|
self._thread_pool.submit(
|
|
@@ -954,7 +956,18 @@ def function( # type: ignore
|
|
|
954
956
|
def wrapper(func: Callable[ArgsT, ReturnT]):
|
|
955
957
|
include_modules_from(func)
|
|
956
958
|
|
|
957
|
-
|
|
959
|
+
if local_python_modules and not isinstance(local_python_modules, list):
|
|
960
|
+
raise ValueError(
|
|
961
|
+
"local_python_modules must be a list of module names as strings, got "
|
|
962
|
+
f"{repr(local_python_modules)}"
|
|
963
|
+
)
|
|
964
|
+
|
|
965
|
+
for idx, module_name in enumerate(local_python_modules or []):
|
|
966
|
+
if not isinstance(module_name, str):
|
|
967
|
+
raise ValueError(
|
|
968
|
+
"local_python_modules must be a list of module names as strings, "
|
|
969
|
+
f"got {repr(module_name)} at index {idx}"
|
|
970
|
+
)
|
|
958
971
|
include_module(module_name)
|
|
959
972
|
|
|
960
973
|
proxy = IsolatedFunction(
|
|
@@ -1092,6 +1105,17 @@ class BaseServable:
|
|
|
1092
1105
|
async def field_exception_handler(request: Request, exc: FieldException):
|
|
1093
1106
|
return JSONResponse(exc.to_pydantic_format(), exc.status_code)
|
|
1094
1107
|
|
|
1108
|
+
# ref: https://github.com/fastapi/fastapi/blob/37c8e7d76b4b47eb2c4cced6b4de59eb3d5f08eb/fastapi/exception_handlers.py#L20
|
|
1109
|
+
@_app.exception_handler(RequestValidationError)
|
|
1110
|
+
async def request_val_exception_handler(
|
|
1111
|
+
request: Request, exc: RequestValidationError
|
|
1112
|
+
):
|
|
1113
|
+
return JSONResponse(
|
|
1114
|
+
{"detail": jsonable_encoder(exc.errors())},
|
|
1115
|
+
422,
|
|
1116
|
+
headers={"x-fal-billable-units": "0"},
|
|
1117
|
+
)
|
|
1118
|
+
|
|
1095
1119
|
@_app.exception_handler(CUDAOutOfMemoryException)
|
|
1096
1120
|
async def cuda_out_of_memory_exception_handler(
|
|
1097
1121
|
request: Request, exc: CUDAOutOfMemoryException
|
|
@@ -212,6 +212,7 @@ class ExceptionApp(fal.App, keep_alive=300, max_concurrency=1):
|
|
|
212
212
|
def app_exception(self) -> Output:
|
|
213
213
|
raise AppException(message="this app is designed to fail", status_code=401)
|
|
214
214
|
|
|
215
|
+
# While making the request provide payload as {"lhs": 1, "rhs": 2}
|
|
215
216
|
@fal.endpoint("/field-exception")
|
|
216
217
|
def field_exception(self, input: Input) -> Output:
|
|
217
218
|
raise FieldException(
|
|
@@ -402,6 +403,12 @@ def test_stateful_app(host: api.FalServerlessHost, user: User):
|
|
|
402
403
|
yield f"{user.username}/{app_alias}"
|
|
403
404
|
|
|
404
405
|
|
|
406
|
+
@pytest.fixture(scope="module")
|
|
407
|
+
def test_pydantic_validation_error():
|
|
408
|
+
with AppClient.connect(StatefulAdditionApp) as client:
|
|
409
|
+
yield client
|
|
410
|
+
|
|
411
|
+
|
|
405
412
|
@pytest.fixture(scope="module")
|
|
406
413
|
def test_cancellable_app(host: api.FalServerlessHost, user: User):
|
|
407
414
|
cancellable_app = fal.wrap_app(CancellableApp)
|
|
@@ -958,6 +965,34 @@ def test_app_exceptions(test_exception_app: AppClient):
|
|
|
958
965
|
assert _CUDA_OOM_MESSAGE in cuda_exc.value.message
|
|
959
966
|
|
|
960
967
|
|
|
968
|
+
def test_pydantic_validation_billing(test_pydantic_validation_error: AppClient):
|
|
969
|
+
with httpx.Client() as httpx_client:
|
|
970
|
+
url = test_pydantic_validation_error.url + "/increment"
|
|
971
|
+
response = httpx_client.post(
|
|
972
|
+
url,
|
|
973
|
+
json={"value": "this-is-not-an-integer"},
|
|
974
|
+
timeout=30,
|
|
975
|
+
)
|
|
976
|
+
|
|
977
|
+
assert response.status_code == 422
|
|
978
|
+
assert response.headers.get("x-fal-billable-units") == "0"
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
def test_field_exception_billing(test_exception_app: AppClient):
|
|
982
|
+
with httpx.Client() as httpx_client:
|
|
983
|
+
url = test_exception_app.url + "/field-exception"
|
|
984
|
+
response = httpx_client.post(
|
|
985
|
+
url,
|
|
986
|
+
json={"lhs": 1, "rhs": 2},
|
|
987
|
+
timeout=30,
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
assert response.status_code == 422
|
|
991
|
+
# For errors raised on runtime, developers should be handling the billing.
|
|
992
|
+
# Therefore not adding billing units.
|
|
993
|
+
assert not hasattr(response.headers, "x-fal-billable-units")
|
|
994
|
+
|
|
995
|
+
|
|
961
996
|
def test_kill_runner(host: api.FalServerlessHost, test_sleep_app: str):
|
|
962
997
|
handle = apps.submit(test_sleep_app, arguments={"wait_time": 10})
|
|
963
998
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/applications/app_metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/comfy/list_user_workflows.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/create_workflow.py
RENAMED
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/delete_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/list_user_workflows.py
RENAMED
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/api/workflows/update_workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/body_upload_local_file.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/comfy_workflow_schema_prompt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/page_comfy_workflow_item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/typed_comfy_workflow_update.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_metadata.py
RENAMED
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_nodes.py
RENAMED
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_contents_output.py
RENAMED
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_detail_contents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fal-1.21.1 → fal-1.22.0}/openapi-fal-rest/openapi_fal_rest/models/workflow_schema_output.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|