-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
is jenkins_secret_text_credentials supposed to update or only create? #584
Comments
@cheeseplus any opinion on that? |
ok. this is unexpected
|
I don't have an opinion right off but that is largely because I'm still getting familiar with the cookbook and Jenkins. That said this is a good start for me to dive into the resources as I've mostly just worked on the core bits. Is this a regression? I don't think we changed anything regarding the resource since 4.2.1 but if so that'll make the hunt a bit easier. |
I do not think it is a regression. IMHO we need to have an expectation on how it should behave and I guess (like with other parts in this cookbook) it is about 2nd day operations. most of the things work for initial creation but not for updating things. so my suggestion is to spice up the integration tests with update behaviours. |
Just in case anyone else runs into this, it still seems to be a thing. As a workaround I've switched entirely over to jenkins_password_credential resources even when having a username doesn't really make sense since they update fine. |
does the credential resource only
create
or does it update too?jenkins_secret_text_credentials
with a new value does detect the difference, but does not change the valueCookbook version
5.0.0
Chef-client version
12.18.31
Platform Details
[Operating system distribution and release version. Cloud provider if running in the cloud]
Scenario:
update a
jenkins_secret_text_credentials
Steps to Reproduce:
run chef-client with value 'a', change value to 'b' run chef-client again
Expected Result:
updated credential
Actual Result:
old value still there
odd thing: the resource does recognise that it is different, it just does not update it.
next run:
from now on it keeps reporting the create unless you change the credential in the dashboard to the new value. after that it does show
(up to date)
again.so I wonder if I need to
:delete
:create
...my least surprise implementation would be a
:create_or_update
actionThe text was updated successfully, but these errors were encountered: