argocd-vault-plugin icon indicating copy to clipboard operation
argocd-vault-plugin copied to clipboard

fix(ksm): handle duplicate secrets with the same uid

Open robbert229 opened this issue 1 year ago • 1 comments
trafficstars

Keeper Secrets Manager can return multiple records with the same uid. This is because KSM is now returning a secret for each time a secret is referenced. This breaks previous assumptions.

Description

Removing previous ksm sanity check ensuring a record is only returned once, and added supporting tests.

Checklist

Please make sure that your PR fulfills the following requirements:

  • [x] Reviewed the guidelines for contributing to this repository
  • [x] The commit message follows the Conventional Commits Guidelines.
  • [x] Tests for the changes have been updated
  • [x] Are you adding dependencies? If so, please run go mod tidy -compat=1.21 to ensure only the minimum is pulled in.
  • [x] Docs have been added / updated
  • [ ] Optional. My organization is added to USERS.md.

Type of Change

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] New tests
  • [ ] Build/CI related changes
  • [ ] Documentation content changes
  • [ ] Other (please describe)

Other information

I implemented the original keeper secrets manager functionality back in #468.

robbert229 avatar Jul 08 '24 20:07 robbert229

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.57%. Comparing base (42a43f0) to head (c355157). Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #652      +/-   ##
==========================================
- Coverage   72.16%   71.57%   -0.59%     
==========================================
  Files          26       29       +3     
  Lines        1994     2600     +606     
==========================================
+ Hits         1439     1861     +422     
- Misses        458      588     +130     
- Partials       97      151      +54     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Jul 08 '24 21:07 codecov-commenter