Skip to content

[CDF-28553] Add lineageAnnotation support to workflow version tasks - #3208

Open
Magssch wants to merge 5 commits into
mainfrom
cdf-28553/workflow-lineage-annotation
Open

[CDF-28553] Add lineageAnnotation support to workflow version tasks#3208
Magssch wants to merge 5 commits into
mainfrom
cdf-28553/workflow-lineage-annotation

Conversation

@Magssch

@Magssch Magssch commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

Adds lineageAnnotation (sources/targets as CDF resource URIs) to workflow version tasks, in both the YAML class and the request/response resource classes. The field is gated behind the existing data_products alpha flag since even though it requires its own feature flag in CDF, it's main purpose is to be used with data products. The YAML validator rejects it when the flag is off, and dump_resource strips it from CDF responses so it does not show up in diffs/dumps. Also adds identifiable list diffing on uri for lineage sources/targets, and finally makes the data_products flag visible in cdf about since the API itself is now publicly documented.

Bump

  • Patch
  • Skip

Changelog

Added

  • [alpha] Toolkit will now recognize lineageAnnotation on workflow version tasks, declaring the data sources and targets of each task. Requires the data_products alpha flag.

@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@Magssch

Magssch commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

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

Copy link
Copy Markdown
Contributor

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 introduces support for workflow task lineage annotations, guarded by the DATA_PRODUCTS feature flag. It defines LineageInfo and TaskLineage models, adds lineage_annotation to tasks, implements serialization stripping when the feature flag is disabled, and includes comprehensive unit tests to validate these changes. I have no feedback to provide as there are no review comments.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
43707 37226 85% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/resource_classes/workflow_version.py 97% 🟢
cognite_toolkit/_cdf_tk/feature_flags.py 100% 🟢
cognite_toolkit/_cdf_tk/resource_ios/_resource_ios/workflow.py 83% 🟢
cognite_toolkit/_cdf_tk/yaml_classes/workflow_version.py 100% 🟢
TOTAL 95% 🟢

updated for commit: 01ad105 by action🐍

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.17%. Comparing base (a285039) to head (01ad105).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3208      +/-   ##
==========================================
+ Coverage   85.03%   85.17%   +0.13%     
==========================================
  Files         466      465       -1     
  Lines       43830    43707     -123     
==========================================
- Hits        37271    37226      -45     
+ Misses       6559     6481      -78     
Files with missing lines Coverage Δ
...cdf_tk/client/resource_classes/workflow_version.py 96.92% <100.00%> (+0.14%) ⬆️
cognite_toolkit/_cdf_tk/feature_flags.py 100.00% <ø> (ø)
...kit/_cdf_tk/resource_ios/_resource_ios/workflow.py 83.17% <100.00%> (+0.73%) ⬆️
...e_toolkit/_cdf_tk/yaml_classes/workflow_version.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

DATA_PRODUCTS = FlagMetadata(
visible=False,
description="Enables support for data product resources",
visible=True,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Making this visible since data products is now publicly documented

@Magssch
Magssch marked this pull request as ready for review September 8, 2026 08:40
@Magssch
Magssch requested review from a team as code owners September 8, 2026 08:40
@Magssch
Magssch enabled auto-merge (squash) September 8, 2026 08:40
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.

2 participants