Skip to content

[CDF-27948] Make Infield config migration tolerate invalid root location configs#3002

Merged
Magssch merged 6 commits into
mainfrom
infield-config-skip-invalid
May 12, 2026
Merged

[CDF-27948] Make Infield config migration tolerate invalid root location configs#3002
Magssch merged 6 commits into
mainfrom
infield-config-skip-invalid

Conversation

@Magssch
Copy link
Copy Markdown
Contributor

@Magssch Magssch commented May 12, 2026

Description

cdf migrate infield-configs now skips root location configurations that are missing required fields or whose root asset has not been migrated yet, instead of failing the entire command on the first bad entry. The purpose of this is to enable partial migrations to CDM and to avoid any potential single misconfigured root location to block an entire project migration. Each skipped location now emits a warning, and a summary panel is printed at the end of the run grouping skips by reason, which should somewhat mitigate the now increased risk of users not acknowledging that a location was skipped due to what could be a real data integrity issue that needs to be addressed.

Bump

  • Patch
  • Skip

Changelog

Improved

  • [alpha] cdf migrate infield-configs now migrates the root location configurations it can and reports successes and failures as a summary, instead of aborting on the first invalid or non-migrated location.

@Magssch Magssch requested review from a team as code owners May 12, 2026 12:08
@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 changed the title Infield config skip invalid [CDF-27948] Make Infield config migration tolerate invalid root location configs May 12, 2026
@Magssch
Copy link
Copy Markdown
Contributor Author

Magssch commented May 12, 2026

/gemini review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

☂️ Code Coverage

current status: ✅

Overall Coverage

Statements Covered Coverage Threshold Status
42695 36682 86% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/commands/_migrate/creators.py 87% 🟢
TOTAL 87% 🟢

updated for commit: e1b041a by action🐍

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 introduces error handling for root location configurations during the migration process, including skipping invalid configurations and displaying a summary of results. The reviewer suggests using the Severity enum instead of magic numbers in the summary display to improve maintainability and consistency.

Comment thread cognite_toolkit/_cdf_tk/commands/_migrate/creators.py Outdated
Comment thread cognite_toolkit/_cdf_tk/commands/_migrate/creators.py Outdated
Comment thread cognite_toolkit/_cdf_tk/commands/_migrate/creators.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.91%. Comparing base (580c93c) to head (e1b041a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nite_toolkit/_cdf_tk/commands/_migrate/creators.py 86.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3002      +/-   ##
==========================================
- Coverage   85.91%   85.91%   -0.01%     
==========================================
  Files         465      465              
  Lines       42669    42695      +26     
==========================================
+ Hits        36660    36682      +22     
- Misses       6009     6013       +4     
Files with missing lines Coverage Δ
...nite_toolkit/_cdf_tk/commands/_migrate/creators.py 86.58% <86.66%> (+0.22%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@ronpal ronpal left a comment

Choose a reason for hiding this comment

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

Good stuff!

@Magssch Magssch merged commit fe6f0b7 into main May 12, 2026
15 checks passed
@Magssch Magssch deleted the infield-config-skip-invalid branch May 12, 2026 12:36
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