Skip to content

feat(Workflows): Add missing unknown classes for future-compatibility#2627

Open
haakonvt wants to merge 3 commits into
pysdk-release-v7from
fix-forward-compat-workflows
Open

feat(Workflows): Add missing unknown classes for future-compatibility#2627
haakonvt wants to merge 3 commits into
pysdk-release-v7from
fix-forward-compat-workflows

Conversation

@haakonvt
Copy link
Copy Markdown
Contributor

@haakonvt haakonvt commented May 18, 2026

Cherry-picked from master (i.e. v8)

…#2623)

Co-authored-by: Sachin Bhagwat <sachin.bhagwat@cognite.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@haakonvt haakonvt requested review from a team as code owners May 18, 2026 12:38
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements forward compatibility for workflow tasks by adding fallback classes for unknown task types and refactoring loading logic to use match statements. It also standardizes internal loading methods to _load and updates Postgres Gateway integration tests. Feedback was provided to correct a terminology error in a warning message within the UnknownWorkflowTaskParameters class, ensuring it correctly refers to 'parameters' instead of 'output'.

Comment thread cognite/client/data_classes/workflows.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 97.87234% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.04%. Comparing base (11cb462) to head (c023f19).

Files with missing lines Patch % Lines
cognite/client/data_classes/workflows.py 97.84% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           pysdk-release-v7    #2627      +/-   ##
====================================================
+ Coverage             91.02%   91.04%   +0.02%     
====================================================
  Files                   192      192              
  Lines                 26227    26266      +39     
====================================================
+ Hits                  23872    23914      +42     
+ Misses                 2355     2352       -3     
Files with missing lines Coverage Δ
cognite/client/_api/workflows/tasks.py 91.66% <100.00%> (ø)
cognite/client/data_classes/__init__.py 100.00% <ø> (ø)
cognite/client/data_classes/workflows.py 97.26% <97.84%> (+1.30%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant