feat(integrations): Add Integration Tasks sub-resource - #2829
Draft
vikramlc-cognite wants to merge 1 commit into
Draft
feat(integrations): Add Integration Tasks sub-resource#2829vikramlc-cognite wants to merge 1 commit into
vikramlc-cognite wants to merge 1 commit into
Conversation
Adds TaskHistory/TaskHistoryList/SyncResult data classes and IntegrationTasksAPI (list_history, sync), wired into the IntegrationsAPI aggregator as self.tasks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
11 tasks
vikramlc-cognite
added this pull request to stack #2833
September 9, 2026 05:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
TaskHistory/TaskHistoryList/SyncResultdata classes andIntegrationTasksAPI(list_history,sync), wired into theIntegrationsAPIaggregator asself.tasks. Builds on the Errors sub-resource from #2828.Type of change
What changed
cognite/client/data_classes/integrations/tasks.py:TaskHistory,TaskHistoryList,SyncResult.cognite/client/_api/integrations/tasks.py:IntegrationTasksAPI.list_history()and.sync()(single-page incremental polling endpoint — caller inspectsmore_data/next_cursorto continue).self.tasks = IntegrationTasksAPI(...)into theIntegrationsAPIconstructor, plustesting.py/doc-accessor updates.tests/tests_unit/test_api/test_integrations/test_tasks.pyand aTestSyncResultdata-class test, including explicit-nullhandling forhistory/errors.Why it changed
cognitedata/service-contractsPR #3378; field-level details (warningCount/fatalCount,sources/targetslineage) confirmed against the localodinservice implementation.What to focus on during review
SyncResultdepends onIntegrationErrorListfrom the Errors sub-resource (the/syncendpoint returns both task history and errors together) — this is why Errors had to land before Tasks in this PR stack, not the other way around.list_history()raisesValueErroriftask_nameis given withoutexternal_id;sync()raises if neitherinclude_errorsnorinclude_task_updatesis set — both have matchingRaises:docstring sections and tests.Test evidence
pytest tests/tests_unit/ -q→ 6,609 passed, 8 failed (pre-existing, unrelated), 6 skippedpython scripts/sync_client_codegen/main.py verify→ sync mirrors up to dateruff check/ruff format --check→ cleanmypy→ no issues (545 source files)Risks and unknowns
sync()is not auto-paginated by design (matches the server's incremental-polling contract) — worth double-checking that's the intended usage pattern rather than an oversight.Rollout and rollback
FeaturePreviewWarninggating as the rest of the module. No migrations. Revert is a straight revert of this commit.Checklist