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

Fix secret repr #2470

Closed
wants to merge 3 commits into from
Closed

Conversation

feliperuhland
Copy link
Contributor

This PR fixes issue #2025

  • Create a unit test to reproduce the repr issue - 52d030d
  • Fix secrets repr issue - 514bfd0

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "fix-secret-repr" git@github.com:feliperuhland/docker-py.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354499952
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

- a post fake secret
- added to fake api
- create a unit test

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
- Change id_attribute to Id
- add new property id
- add name fallback

Fixes docker#2025

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
Copy link

@etienne-napoleone etienne-napoleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to change the repr method than the name getter?
I'm pretty sure that someone using my_secret.name is not expecting to get an id instead of a name in certain cases.

@feliperuhland
Copy link
Contributor Author

feliperuhland commented Dec 4, 2019

Maybe it would be better to change the repr method than the name getter?
I'm pretty sure that someone using my_secret.name is not expecting to get an id instead of a name in certain cases.

Thank you, @etienne-napoleone.

I changed the repr in c5f3376

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
@feliperuhland
Copy link
Contributor Author

docker.errors.APIError: 503 Server Error: Service Unavailable ("Swarm is encrypted and needs to be unlocked before it can be used. Please use "docker swarm unlock" to unlock it.")

Seems like a CI problem. Is there a way to run it again?

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.

3 participants