Skip to content

feat: archive logs export#38207

Draft
hjlarry wants to merge 27 commits into
langgenius:mainfrom
hjlarry:p441
Draft

feat: archive logs export#38207
hjlarry wants to merge 27 commits into
langgenius:mainfrom
hjlarry:p441

Conversation

@hjlarry

@hjlarry hjlarry commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@github-actions github-actions Bot added the web This relates to changes on the web. label Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-07-01 01:47:49.098430395 +0000
+++ /tmp/pyrefly_pr.txt	2026-07-01 01:47:40.636352358 +0000
@@ -558,10 +558,18 @@
    --> tests/integration_tests/model_runtime/__mock/plugin_model.py:235:9
 ERROR `unpatch` may be uninitialized [unbound-name]
   --> tests/integration_tests/plugin/__mock/http.py:67:9
+ERROR TypedDict `ArchiveBundleManifest` does not have key `campaign_id` [bad-typed-dict-key]
+   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:221:25
+ERROR TypedDict `ArchiveBundleManifest` does not have key `archive_window_start` [bad-typed-dict-key]
+   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:222:25
+ERROR TypedDict `ArchiveBundleManifest` does not have key `archive_window_end` [bad-typed-dict-key]
+   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:223:25
+ERROR TypedDict `ArchiveBundleManifest` does not have key `run_shard` [bad-typed-dict-key]
+   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:224:25
 ERROR Argument `FakeArchiveStorage` is not assignable to parameter `storage` with type `ArchiveStorage | None` in function `services.retention.workflow_run.archive_paid_plan_workflow_run.WorkflowRunArchiver._archive_bundle` [bad-argument-type]
-   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:412:56
+   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:444:56
 ERROR Argument `FakeArchiveStorage` is not assignable to parameter `storage` with type `ArchiveStorage | None` in function `services.retention.workflow_run.archive_paid_plan_workflow_run.WorkflowRunArchiver._archive_bundle` [bad-argument-type]
-   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:437:60
+   --> tests/integration_tests/services/retention/test_workflow_run_archiver.py:469:60
 ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
    --> tests/integration_tests/services/test_node_output_inspector_service.py:231:59
 ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
@@ -6895,6 +6903,18 @@
     --> tests/unit_tests/services/rag_pipeline/test_rag_pipeline_service.py:2309:13
 ERROR Argument `SimpleNamespace` is not assignable to parameter `current_user` with type `Account` in function `services.rag_pipeline.rag_pipeline.RagPipelineService.set_datasource_variables` [bad-argument-type]
     --> tests/unit_tests/services/rag_pipeline/test_rag_pipeline_service.py:2311:13
+ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `tables` with type `dict[str, ArchiveBundleTableManifestEntry]` in function `services.retention.workflow_run.archive_bundle_index.ArchiveBundleManifest.__init__` [bad-argument-type]
+   --> tests/unit_tests/services/retention/workflow_run/test_archive_download_preparation.py:149:16
+ERROR Cannot index into `dict[str, bytes]` [bad-index]
+   --> tests/unit_tests/services/retention/workflow_run/test_archive_download_preparation.py:241:52
+ERROR Argument `FakeRedis` is not assignable to parameter `redis` with type `RedisClientWrapper` in function `services.retention.workflow_run.archive_download_task_cache.WorkflowRunArchiveDownloadTaskCache.__init__` [bad-argument-type]
+   --> tests/unit_tests/services/retention/workflow_run/test_archive_download_task_cache.py:123:49
+ERROR Argument `FakeRedis` is not assignable to parameter `redis` with type `RedisClientWrapper` in function `services.retention.workflow_run.archive_download_task_cache.WorkflowRunArchiveDownloadTaskCache.__init__` [bad-argument-type]
+   --> tests/unit_tests/services/retention/workflow_run/test_archive_download_task_cache.py:146:49
+ERROR Argument `FakeRedis` is not assignable to parameter `redis` with type `RedisClientWrapper` in function `services.retention.workflow_run.archive_download_task_cache.WorkflowRunArchiveDownloadTaskCache.__init__` [bad-argument-type]
+   --> tests/unit_tests/services/retention/workflow_run/test_archive_download_task_cache.py:168:49
+ERROR Argument `FakeRedis` is not assignable to parameter `redis` with type `RedisClientWrapper` in function `services.retention.workflow_run.archive_download_task_cache.WorkflowRunArchiveDownloadTaskCache.__init__` [bad-argument-type]
+   --> tests/unit_tests/services/retention/workflow_run/test_archive_download_task_cache.py:193:49
 ERROR Argument `dict[str, int]` is not assignable to parameter `manifest` with type `ArchiveManifest` in function `services.retention.workflow_run.restore_archived_workflow_run.WorkflowRunRestore._get_schema_version` [bad-argument-type]
    --> tests/unit_tests/services/retention/workflow_run/test_restore_archived_workflow_run.py:342:41
 ERROR Argument `() -> Mock` is not assignable to parameter `session_maker` with type `sessionmaker[Unknown]` in function `services.retention.workflow_run.restore_archived_workflow_run.WorkflowRunRestore._restore_from_run` [bad-argument-type]

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 51.58% 51.72% +0.14%
Strict coverage 51.10% 51.24% +0.14%
Typed symbols 31,008 31,200 +192
Untyped symbols 29,384 29,398 +14
Modules 2935 2945 +10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant