-
Notifications
You must be signed in to change notification settings - Fork 234
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
Add config as code support for credentials configuration #235
Add config as code support for credentials configuration #235
Conversation
.map(type -> type.getClass().getName()) | ||
.filter(classNames::contains) | ||
.collect(Collectors.toList()); | ||
return new ArrayList<>(classNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any references to this method anywhere so I don't know how to test if this works or not, all tests in this plugin pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 What you tested in your screenshot is the CredentialsProviderFilter
.
For CredentialsTypeFilter
it's the Types > Add > Includes / Excludes.
Manually tested, it still works 👍 (at least, not discovered flaw)
(the last one, Restrictions, is covered by CredentialsProviderTypeRestriction)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm all tests are passing except the export.
Waiting on the companion PR to merge, but I will try to merge other PRs and releasing before to not have incrementals in release.
.map(type -> type.getClass().getName()) | ||
.filter(classNames::contains) | ||
.collect(Collectors.toList()); | ||
return new ArrayList<>(classNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
With the assertion in mind that the classNames
is coming from the UI ("positive" story), that list is populated from getProviderDescriptors
which corresponds. No negative story found as the filter
method only receive a CredentialsProvider, so no cheat possible.
Only "cons" is if some providers are removed over time, the existing configuration will still have a Set with them inside, no impact.
.map(type -> type.getClass().getName()) | ||
.filter(classNames::contains) | ||
.collect(Collectors.toList()); | ||
return new ArrayList<>(classNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 What you tested in your screenshot is the CredentialsProviderFilter
.
For CredentialsTypeFilter
it's the Types > Add > Includes / Excludes.
Manually tested, it still works 👍 (at least, not discovered flaw)
(the last one, Restrictions, is covered by CredentialsProviderTypeRestriction)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me :)
Propogating through atm, will merge and release bom and update bom, if you're in no rush I'd hold off |
Doing some reviews/merge today, if not done today, will come back on it soon-ish after ;) |
src/test/resources/com/cloudbees/plugins/credentials/casc/credentialsProviderManager.yaml
Outdated
Show resolved
Hide resolved
src/test/java/com/cloudbees/plugins/credentials/CredentialsProviderTypeRestrictionTest.java
Show resolved
Hide resolved
@Wadeck reminder |
Possibly caused: https://issues.jenkins.io/browse/JENKINS-67170 |
some minor jcasc testing cleanup done as well
Fixes jenkinsci/azure-keyvault-plugin#92