[AAP-87587] Provide validation patterns for nested fields and top level fields in metadata - #1668
[AAP-87587] Provide validation patterns for nested fields and top level fields in metadata#1668daphnemaeve wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds optional clean-text metadata injection and tier-2 validation patterns for credential fields. Credential creation uses ChangesCredential validation metadata
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant APIClient
participant CredentialTypeCreateSerializer
participant get_tier2_pattern
APIClient->>CredentialTypeCreateSerializer: request credential representation
CredentialTypeCreateSerializer->>get_tier2_pattern: obtain tier-2 pattern
get_tier2_pattern-->>CredentialTypeCreateSerializer: return pattern metadata
CredentialTypeCreateSerializer-->>APIClient: return eligible fields with validation metadata
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The validation metadata and toggle-dependent behavior are covered without an identified merge-blocking issue. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
| ): | ||
| # injectors commonly contain Jinja2 template syntax, so it is excluded | ||
| # from free-text checks. | ||
| excluded_fields = frozenset({"injectors"}) |
There was a problem hiding this comment.
Should this change live in this PR?
I also see it in #1660.
…nfo on top level fields as well
Co-authored-by: Vidya Nambiar <43621546+vidyanambiar@users.noreply.github.com>
Until django-ansible-base PR ansible#1119 (AAP-85987) lands, the new ansible_base.lib.metadata module may not exist. Wrap all imports from that module in try/except ImportError blocks so the feature is a no-op when DAB hasn't been updated yet, following the same pattern used in AWX (PR #16638). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0c2888b to
5afc67a
Compare
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (60.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #1668 +/- ##
==========================================
- Coverage 93.39% 93.32% -0.08%
==========================================
Files 247 247
Lines 11698 11722 +24
==========================================
+ Hits 10925 10939 +14
- Misses 773 783 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Updates metadata class to include pattern and pattern description for input validation.
Summary by CodeRabbit
New Features
Bug Fixes