Repository navigation
add option to force a reauth for a docker registry - #36893
Conversation
|
Go Go Jenkins! |
|
Thanks for submitting this @tyhunt99. @ticosax Does this approach look good to you? I wanted to ping you here so you had a chance to review this change as well as to see this comment that is related to the motivation of this change. You're much more involved in this code than I am, so I wanted to make sure you had a chance to see it. @tyhunt99 Based on the response from @ticosax and if this approach looks good, then I think getting some documentation added so users will know to use this option would be good. |
|
Jenkins was quite sluggish. @rallytime Do I need to worry about the failing checks? It says the lint failed but didn't actually give me any feedback as to what might be wrong. For documentation should I just add another commit to this pr? |
|
The ubuntu and centos failures are not related to your change, however the following pylint error is: And yeah, you can add the doc change in a new commit. Any new commits will trigger a new test run, too. |
Fixes #32829. Adds ability to specify reauth in the docker-registry pillar data structure to specify the reauth kwarg to docker-py login call. If not specified it defaults to old behaviour of False
…guration also fixed a typo in the new code where I used cred instead of creds
|
Okay I fixed the linter issue and also added what I believe is passable documentation. If there are any issues let me know. Also are there any guidelines as to how documentation should be written? |
|
thx @rallytime for the ping. |
|
I see the new version was released but this PR was not in in it. When will this be merged into a release? |
|
@tyhunt99 This PR was made against the develop branch, so as it stands it won't be in a release until |
|
Awesome thanks @rallytime! How do you tell which release develop is currently pointing to? |
|
@tyhunt99 Develop is the branch that all feature additions go into. We branch from develop about every six months to create the new feature release. 2016.11 is the latest upcoming feature release, which will be officially announced soon. These develop feature releases are codenamed after the periodic table before we cut the date-based branch. We're currently on Bug fixes go into the release branches themselves, and we merge those fixes forward to all newer branches. So for example, the back-port I made just now is only against the 2016.3 branch, but once it goes in, it will be merged into 2016.11, too. Does that help? We also have some docs explaining this a bit more here. |
|
@rallytime Yes that helps. Thanks! |
What does this PR do?
Adds ability to specify reauth in the docker-registry pillar data structure to specify the reauth kwarg passed to docker-py login call. If not specified it defaults to old behavior of False.
This makes credentials in the .docker/config.json file used by docker-py, which are possibly out of date or have been manually modified, to not interfere with credentials passed in pillar data without having to mange the config file via salt.
What issues does this PR fix or reference?
Fixes #32829
Previous Behavior
Retains old behavior of default reauth=False when calling docker login through docker-py
New Behavior
Ability to specify if a reauth is done during docker login call
Tests written?
No
Please review Salt's Contributing Guide for best practices.
Fixes #32829. Adds ability to specify reauth in the docker-registry pillar data structure to specify the reauth kwarg to docker-py login call. If not specified it defaults to old behaviour of False