Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create separate metadata entries for composite values #105

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

lkubb
Copy link
Member

@lkubb lkubb commented Dec 8, 2024

What does this PR do?

  • Fixes a crash when accessing out-of-bounds list items in templates
  • Implements the workaround for composite values in metadata described in the linked issue/discussion

What issues does this PR fix or reference?

Fixes: #106
Ref: #104

Previous Behavior

  • No workable path to multiple roles per minion in templated policies
  • Hard crash when accessing out-of-bounds list items

New Behavior

  • Provides a somewhat workable path to multiple roles per minion in templated policies
  • Accessing out-of-bounds list items is treated like accessing undefined keys (prints a warning)

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.82%. Comparing base (f7204c9) to head (ab3fbc3).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/saltext/vault/runners/vault.py 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
- Coverage   90.83%   90.82%   -0.01%     
==========================================
  Files          79       79              
  Lines       13231    13256      +25     
  Branches     1224     1227       +3     
==========================================
+ Hits        12018    12040      +22     
- Misses        953      956       +3     
  Partials      260      260              
Flag Coverage Δ
Linux 90.75% <93.33%> (-0.01%) ⬇️
macOS 66.39% <70.00%> (-0.01%) ⬇️
project 80.47% <86.66%> (-0.02%) ⬇️
py310 90.76% <93.33%> (-0.03%) ⬇️
py39 85.49% <93.33%> (+0.01%) ⬆️
salt_3006_9 85.56% <93.33%> (+<0.01%) ⬆️
salt_3007_1 90.72% <93.33%> (-0.03%) ⬇️
tests 95.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lkubb lkubb force-pushed the feat/complex-metadata branch 2 times, most recently from 5e34be2 to 7ad32d0 Compare December 8, 2024 17:07
@lkubb lkubb marked this pull request as ready for review December 8, 2024 17:38
@lkubb lkubb force-pushed the feat/complex-metadata branch from 7ad32d0 to d2398b5 Compare December 9, 2024 12:14
@lkubb lkubb force-pushed the feat/complex-metadata branch from d2398b5 to ab3fbc3 Compare December 9, 2024 12:20
@lkubb lkubb merged commit a008454 into salt-extensions:main Dec 9, 2024
22 checks passed
@lkubb lkubb deleted the feat/complex-metadata branch December 9, 2024 12:58
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.

[FEATURE REQUEST] Create separate metadata keys of composite values
1 participant