[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-03-25 05:20:02 +00:00
committed by GitHub
parent 4763c80a1b
commit 2ce4c21be2
6 changed files with 42 additions and 3104 deletions

View File

@@ -49,9 +49,7 @@ class ArchiveSandboxStorage(SandboxStorage):
(
pipeline(sandbox)
.add(["curl", "-fsSL", download_url, "-o", archive], error_message="Failed to download archive")
.add(
["sh", "-c", 'tar -xzf "$1" 2>/dev/null; exit $?', "sh", archive], error_message="Failed to extract"
)
.add(["sh", "-c", 'tar -xzf "$1" 2>/dev/null; exit $?', "sh", archive], error_message="Failed to extract")
.add(["rm", archive], error_message="Failed to cleanup")
.execute(timeout=_ARCHIVE_TIMEOUT, raise_on_error=True)
)

View File

@@ -268,7 +268,7 @@ class AppBundleService:
zs.upload_items(upload_items, src_dir="bundle")
# Tree sizes are already set from manifest; no need to update
app_model = db.session.query(App).filter(App.id == app_id).first()
app_model = db.session.query(App).where(App.id == app_id).first()
if app_model:
AppAssetService.set_draft_assets(
app_model=app_model,

View File

@@ -41,12 +41,11 @@ class SandboxProviderService:
provider_types = SandboxType.get_all()
tenant_configs = {
config.provider_type: config
for config in session.query(SandboxProvider).filter(SandboxProvider.tenant_id == tenant_id).all()
for config in session.query(SandboxProvider).where(SandboxProvider.tenant_id == tenant_id).all()
}
system_configs = {
config.provider_type: config
for config in session.query(SandboxProviderSystemConfig)
.filter(SandboxProviderSystemConfig.provider_type.in_(provider_types))
for config in session.query(SandboxProviderSystemConfig).where(SandboxProviderSystemConfig.provider_type.in_(provider_types))
.all()
}
@@ -149,7 +148,7 @@ class SandboxProviderService:
tenant_config = _query_tenant_config(session, tenant_id, provider_type)
system_config = session.query(SandboxProviderSystemConfig).filter_by(provider_type=provider_type).first()
session.query(SandboxProvider).filter(SandboxProvider.tenant_id == tenant_id).update({"is_active": False})
session.query(SandboxProvider).where(SandboxProvider.tenant_id == tenant_id).update({"is_active": False})
# using tenant config
if tenant_config:

View File

@@ -38,10 +38,15 @@ def _make_llm_node(reasoning_format: str) -> LLMNode:
object.__setattr__(
node,
"_run_context",
{"_dify": types.SimpleNamespace(
tenant_id="tenant", app_id="app", user_id="user",
user_from="account", invoke_from="debugger",
)},
{
"_dify": types.SimpleNamespace(
tenant_id="tenant",
app_id="app",
user_id="user",
user_from="account",
invoke_from="debugger",
)
},
)
return node

View File

@@ -30,11 +30,11 @@ x-shared-env: &shared-api-worker-env
SECRET_KEY: ${SECRET_KEY:-sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U}
INIT_PASSWORD: ${INIT_PASSWORD:-}
DEPLOY_ENV: ${DEPLOY_ENV:-PRODUCTION}
ENABLE_COLLABORATION_MODE: ${ENABLE_COLLABORATION_MODE:-false}
CHECK_UPDATE_URL: ${CHECK_UPDATE_URL:-https://updates.dify.ai}
OPENAI_API_BASE: ${OPENAI_API_BASE:-https://api.openai.com/v1}
MIGRATION_ENABLED: ${MIGRATION_ENABLED:-true}
FILES_ACCESS_TIMEOUT: ${FILES_ACCESS_TIMEOUT:-300}
ENABLE_COLLABORATION_MODE: ${ENABLE_COLLABORATION_MODE:-false}
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-60}
REFRESH_TOKEN_EXPIRE_DAYS: ${REFRESH_TOKEN_EXPIRE_DAYS:-30}
APP_DEFAULT_ACTIVE_REQUESTS: ${APP_DEFAULT_ACTIVE_REQUESTS:-0}
@@ -113,6 +113,7 @@ x-shared-env: &shared-api-worker-env
CONSOLE_CORS_ALLOW_ORIGINS: ${CONSOLE_CORS_ALLOW_ORIGINS:-*}
COOKIE_DOMAIN: ${COOKIE_DOMAIN:-}
NEXT_PUBLIC_COOKIE_DOMAIN: ${NEXT_PUBLIC_COOKIE_DOMAIN:-}
NEXT_PUBLIC_SOCKET_URL: ${NEXT_PUBLIC_SOCKET_URL:-ws://localhost}
NEXT_PUBLIC_BATCH_CONCURRENCY: ${NEXT_PUBLIC_BATCH_CONCURRENCY:-5}
STORAGE_TYPE: ${STORAGE_TYPE:-opendal}
OPENDAL_SCHEME: ${OPENDAL_SCHEME:-fs}
@@ -454,11 +455,6 @@ x-shared-env: &shared-api-worker-env
SANDBOX_DIFY_CLI_ROOT: ${SANDBOX_DIFY_CLI_ROOT:-}
CLI_API_URL: ${CLI_API_URL:-http://api:5001}
FILES_API_URL: ${FILES_API_URL:-http://localhost}
SSH_SANDBOX_HOST: ${SSH_SANDBOX_HOST:-agentbox}
SSH_SANDBOX_PORT: ${SSH_SANDBOX_PORT:-22}
SSH_SANDBOX_USERNAME: ${SSH_SANDBOX_USERNAME:-agentbox}
SSH_SANDBOX_PASSWORD: ${SSH_SANDBOX_PASSWORD:-agentbox}
SSH_SANDBOX_BASE_WORKING_PATH: ${SSH_SANDBOX_BASE_WORKING_PATH:-/workspace/sandboxes}
CODE_EXECUTION_ENDPOINT: ${CODE_EXECUTION_ENDPOINT:-http://sandbox:8194}
CODE_EXECUTION_API_KEY: ${CODE_EXECUTION_API_KEY:-dify-sandbox}
CODE_EXECUTION_SSL_VERIFY: ${CODE_EXECUTION_SSL_VERIFY:-True}
@@ -530,6 +526,18 @@ x-shared-env: &shared-api-worker-env
SANDBOX_HTTP_PROXY: ${SANDBOX_HTTP_PROXY:-http://ssrf_proxy:3128}
SANDBOX_HTTPS_PROXY: ${SANDBOX_HTTPS_PROXY:-http://ssrf_proxy:3128}
SANDBOX_PORT: ${SANDBOX_PORT:-8194}
SSH_SANDBOX_HOST: ${SSH_SANDBOX_HOST:-agentbox}
SSH_SANDBOX_PORT: ${SSH_SANDBOX_PORT:-22}
SSH_SANDBOX_USERNAME: ${SSH_SANDBOX_USERNAME:-agentbox}
SSH_SANDBOX_PASSWORD: ${SSH_SANDBOX_PASSWORD:-agentbox}
SSH_SANDBOX_BASE_WORKING_PATH: ${SSH_SANDBOX_BASE_WORKING_PATH:-/workspace/sandboxes}
AGENTBOX_SSH_USERNAME: ${AGENTBOX_SSH_USERNAME:-agentbox}
AGENTBOX_SSH_PASSWORD: ${AGENTBOX_SSH_PASSWORD:-agentbox}
AGENTBOX_SSH_PORT: ${AGENTBOX_SSH_PORT:-22}
AGENTBOX_SOCAT_TARGET_HOST: ${AGENTBOX_SOCAT_TARGET_HOST:-api}
AGENTBOX_SOCAT_TARGET_PORT: ${AGENTBOX_SOCAT_TARGET_PORT:-5001}
AGENTBOX_NGINX_HOST: ${AGENTBOX_NGINX_HOST:-nginx}
AGENTBOX_NGINX_PORT: ${AGENTBOX_NGINX_PORT:-80}
WEAVIATE_PERSISTENCE_DATA_PATH: ${WEAVIATE_PERSISTENCE_DATA_PATH:-/var/lib/weaviate}
WEAVIATE_QUERY_DEFAULTS_LIMIT: ${WEAVIATE_QUERY_DEFAULTS_LIMIT:-25}
WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: ${WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED:-true}
@@ -625,11 +633,11 @@ x-shared-env: &shared-api-worker-env
PLUGIN_DIFY_INNER_API_KEY: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
PLUGIN_DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001}
ENDPOINT_URL_TEMPLATE: ${ENDPOINT_URL_TEMPLATE:-http://localhost/e/{hook_id}}
MARKETPLACE_ENABLED: ${MARKETPLACE_ENABLED:-true}
MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
CREATORS_PLATFORM_FEATURES_ENABLED: ${CREATORS_PLATFORM_FEATURES_ENABLED:-true}
CREATORS_PLATFORM_API_URL: ${CREATORS_PLATFORM_API_URL:-https://creators.dify.ai}
CREATORS_PLATFORM_OAUTH_CLIENT_ID: ${CREATORS_PLATFORM_OAUTH_CLIENT_ID:-}
MARKETPLACE_ENABLED: ${MARKETPLACE_ENABLED:-true}
MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: ${ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES:-true}
PLUGIN_STDIO_BUFFER_SIZE: ${PLUGIN_STDIO_BUFFER_SIZE:-1024}

File diff suppressed because it is too large Load Diff