Skip to content

[CDF-27203] 😎Check unresolved variables#2797

Merged
doctrino merged 47 commits intomainfrom
check-variable-substitution
Mar 30, 2026
Merged

[CDF-27203] 😎Check unresolved variables#2797
doctrino merged 47 commits intomainfrom
check-variable-substitution

Conversation

@doctrino
Copy link
Copy Markdown
Contributor

@doctrino doctrino commented Mar 27, 2026

Description

Check for unresolved variables in build v2, and include ignored and failed files in output.

image

Bump

  • Patch
  • Skip

@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

Customization

To customize 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 counter productive. 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 Mar 27, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
39629 33488 85% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cognite_toolkit/_cdf_tk/commands/build_v2/build_v2.py 71% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_build.py 97% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_lineage.py 71% 🟢
cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_module.py 95% 🟢
TOTAL 84% 🟢

updated for commit: 11a3806 by action🐍

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 61.95652% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.50%. Comparing base (2db8d81) to head (11a3806).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...nite_toolkit/_cdf_tk/commands/build_v2/build_v2.py 48.52% 35 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2797      +/-   ##
==========================================
- Coverage   84.57%   84.50%   -0.07%     
==========================================
  Files         447      447              
  Lines       39552    39629      +77     
==========================================
+ Hits        33450    33488      +38     
- Misses       6102     6141      +39     
Files with missing lines Coverage Δ
...t/_cdf_tk/commands/build_v2/data_classes/_build.py 96.55% <100.00%> (+0.49%) ⬆️
..._cdf_tk/commands/build_v2/data_classes/_lineage.py 71.09% <100.00%> (ø)
.../_cdf_tk/commands/build_v2/data_classes/_module.py 95.27% <100.00%> (+0.23%) ⬆️
...nite_toolkit/_cdf_tk/commands/build_v2/build_v2.py 71.20% <48.52%> (-4.33%) ⬇️

... and 3 files with indirect coverage changes

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

@doctrino doctrino changed the title refactor: check unresolved variables [CDF-27203] 😎Check unresolved variables Mar 27, 2026
@doctrino doctrino marked this pull request as ready for review March 27, 2026 10:17
@doctrino doctrino requested review from a team as code owners March 27, 2026 10:17
@doctrino
Copy link
Copy Markdown
Contributor Author

/gemini review

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 enhances the build process by tracking metadata such as duration and organization directories, and improving error reporting for unresolved variables and ignored files. The review feedback identifies that unresolved variables in successfully parsed YAML files are currently collected but not stored or displayed, suggesting an update to the BuiltModule data class and display logic to ensure these are visible to the user and prevent silent configuration issues.

Base automatically changed from standardizing-validation to main March 30, 2026 06:41
…tution

# Conflicts:
#	cognite_toolkit/_cdf_tk/commands/build_v2/build_v2.py
#	cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_build.py
@doctrino doctrino enabled auto-merge (squash) March 30, 2026 07:29
@doctrino doctrino merged commit 3a49e89 into main Mar 30, 2026
15 checks passed
@doctrino doctrino deleted the check-variable-substitution branch March 30, 2026 09:00
doctrino added a commit that referenced this pull request Mar 30, 2026
# Description

Note this is stacked on two branches #2796 , and the branch #2792 ->
#2797 .

Adds a unit test that builds and deploy the complete orgs.

Found a few bugs through the testing:

1. CDF Project not set in `lineage.yaml` when running `cdf build`.
2. Unwrapping build variables were not done correctly for iteration
cases.
3. Lineage serialized as relative paths, but requires absolute paths
causing failure when loading.
4. Graphql was found in an incorrect way. 


## Bump

- [ ] Patch
- [x] Skip
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