[CDF-28175] Fix location filter asset subtree key compatibility#3085
Conversation
## Bump - [x] Patch - [ ] Skip ## Changelog ### Fixed - `cdf build` rejecting unquoted timestamp-like values in config.yaml variables
Accept both assetSubtreeIds and assetSubtreeExternalIds in location filter YAML and normalize to deploy-compatible payloads to avoid build/deploy schema mismatches.
|
/gemini review |
Using Gemini Code AssistThe 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
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 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. |
There was a problem hiding this comment.
Code Review
This pull request adds support for the assetSubtreeIds alias alongside assetSubtreeExternalIds in location filter resources, updating both the loader logic and Pydantic models, and adding corresponding unit tests. The review feedback highlights potential runtime errors (such as AttributeError and TypeError) if these fields or subfilters are explicitly set to null in the YAML configuration, recommending defensive checks and safe defaults (or []) during dictionary operations and list unpacking.
☂️ Code Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3085 +/- ##
==========================================
+ Coverage 86.04% 86.06% +0.01%
==========================================
Files 475 475
Lines 43828 43881 +53
==========================================
+ Hits 37712 37765 +53
Misses 6116 6116
🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for appending missing .gitignore entries during repository initialization and adds alias support for assetSubtreeIds and assetSubtreeExternalIds in location filters. Feedback highlights a missing type hint on a class attribute in repo.py, and several potential runtime errors (such as AttributeError and TypeError) in location.py if filters or subfilters are None or not dictionaries.
3111e14 to
e6a913e
Compare
Description
We introduced an error with Pydantic classes for location filters, mixing
assetSubtreeIds(correct) andassetSubtreeExternalIds(wrong). This change keeps compatibility by accepting both in location YAML and normalizing deploy payloads to API-compatible subtree IDs.Bump
Changelog
Fixed