Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(ci): bad pyinfra type coverage report comments (#36482)

chariri1b4356b66a5e
diff --git a/.github/workflows/pyrefly-type-coverage-comment.yml b/.github/workflows/pyrefly-type-coverage-comment.yml
index 52c16f31537..2fe9aa591de 100644
--- a/.github/workflows/pyrefly-type-coverage-comment.yml
+++ b/.github/workflows/pyrefly-type-coverage-comment.yml
@@ -63,8 +63,8 @@ jobs:
id: render
run: |
comment_body="$(uv run --directory api python libs/pyrefly_type_coverage.py \
- --base base_report.json \
- < pr_report.json)"
+ --base "$GITHUB_WORKSPACE/base_report.json" \
+ < "$GITHUB_WORKSPACE/pr_report.json")"
{
echo "### Pyrefly Type Coverage"
diff --git a/.github/workflows/pyrefly-type-coverage.yml b/.github/workflows/pyrefly-type-coverage.yml
index eae8debf1a5..915e406b571 100644
--- a/.github/workflows/pyrefly-type-coverage.yml
+++ b/.github/workflows/pyrefly-type-coverage.yml
@@ -65,6 +65,9 @@ jobs:
# Save structured data for the fork-PR comment workflow
cp /tmp/pyrefly_report_pr.json pr_report.json
cp /tmp/pyrefly_report_base.json base_report.json
+ # Keep fork-PR comments correct while the trusted workflow_run job is
+ # still using the default-branch renderer, which resolves --base from api/.
+ cp /tmp/pyrefly_report_base.json api/base_report.json
- name: Save PR number
run: |
@@ -77,6 +80,7 @@ jobs:
path: |
pr_report.json
base_report.json
+ api/base_report.json
pr_number.txt
- name: Comment PR with type coverage
diff --git a/api/controllers/service_api/index.py b/api/controllers/service_api/index.py
index 31151b5f9f3..41f8ef53a5b 100644
--- a/api/controllers/service_api/index.py
+++ b/api/controllers/service_api/index.py
@@ -11,7 +11,7 @@ register_response_schema_models(service_api_ns, IndexInfoResponse)
@service_api_ns.route("/")
class IndexApi(Resource):
@service_api_ns.response(200, "Success", service_api_ns.models[IndexInfoResponse.__name__])
- def get(self):
+ def get(self) -> dict[str, str]:
return {
"welcome": "Dify OpenAPI",
"api_version": "v1",