Skip to content

Fix quality.rules wire format: use externalId not ruleSetExternalId#3003

Merged
ronpal merged 2 commits into
mainfrom
fix/quality-rule-external-id-wire-format
May 12, 2026
Merged

Fix quality.rules wire format: use externalId not ruleSetExternalId#3003
ronpal merged 2 commits into
mainfrom
fix/quality-rule-external-id-wire-format

Conversation

@ronpal
Copy link
Copy Markdown
Contributor

@ronpal ronpal commented May 12, 2026

Summary

  • The API spec defines quality.rules items as RuleSetVersionReference with {externalId, version}, not {ruleSetExternalId, version}
  • Replaces list[RuleSetVersionId] in DataProductVersionQuality with a new RuleSetVersionRef class whose external_id field serialises as externalId on the wire
  • Renames DataProductVersionQualityRule.rule_set_external_idexternal_id so the correct user-facing YAML field is externalId: (not ruleSetExternalId:)
  • Updates get_dependent_items to key on "externalId" in the raw dict

Correct YAML

quality:
  rules:
    - externalId: my-ruleset
      version: "1.0.0"

Bump

  • Patch
  • Skip

Changelog

Fixed

  • Fix quality.rules wire format to use externalId instead of ruleSetExternalId when serialising data product version quality rules.

The API spec defines quality.rules items as RuleSetVersionReference
with {externalId, version}, not {ruleSetExternalId, version}.

- Replace list[RuleSetVersionId] with a new RuleSetVersionRef class
  whose external_id field serialises as externalId on the wire
- Rename DataProductVersionQualityRule.rule_set_external_id to
  external_id so users write `externalId:` in their YAML
- Update get_dependent_items to look up "externalId" in the raw dict
- Update tests to use the correct field name
@ronpal ronpal requested review from a team as code owners May 12, 2026 12:54
@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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
42698 36688 86% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/client/resource_classes/data_product_version.py 89% 🟢
cognite_toolkit/_cdf_tk/resource_ios/_resource_ios/data_product_version.py 77% 🟢
cognite_toolkit/_cdf_tk/yaml_classes/data_product_version.py 94% 🟢
TOTAL 87% 🟢

updated for commit: 1ed2a31 by action🐍

@ronpal ronpal enabled auto-merge (squash) May 12, 2026 13:01
@ronpal ronpal merged commit bd19858 into main May 12, 2026
13 of 14 checks passed
@ronpal ronpal deleted the fix/quality-rule-external-id-wire-format branch May 12, 2026 13:05
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.92%. Comparing base (fe6f0b7) to head (1ed2a31).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...resource_ios/_resource_ios/data_product_version.py 0.00% 1 Missing ⚠️
...olkit/_cdf_tk/yaml_classes/data_product_version.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3003   +/-   ##
=======================================
  Coverage   85.92%   85.92%           
=======================================
  Files         465      465           
  Lines       42695    42698    +3     
=======================================
+ Hits        36685    36688    +3     
  Misses       6010     6010           
Files with missing lines Coverage Δ
...tk/client/resource_classes/data_product_version.py 88.73% <100.00%> (+1.96%) ⬆️
...resource_ios/_resource_ios/data_product_version.py 77.27% <0.00%> (ø)
...olkit/_cdf_tk/yaml_classes/data_product_version.py 94.11% <50.00%> (ø)

... 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.

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