Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix secret repr #2517
Fix secret repr #2517
Conversation
- 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 #2025 Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
|
Could you take a look? Thanks. |
|
I have some considerations on why the replacement of |
| @@ -4,14 +4,14 @@ | |||
|
|
|||
| class Secret(Model): | |||
| """A secret.""" | |||
| id_attribute = 'ID' | |||
| id_attribute = 'Id' | |||
ulyssessouza
Feb 26, 2020
•
Contributor
I'm not sure to understand this change. According to https://docs.docker.com/engine/api/v1.30/#tag/Secret that's an uppercase "D"
feliperuhland
Feb 27, 2020
Author
Contributor
I don't remember why I did it, but it's fixed now.
Thanks.
|
|
||
| def __repr__(self): | ||
| return "<%s: '%s'>" % (self.__class__.__name__, self.name) | ||
| return "<%s: '%s'>" % (self.__class__.__name__, self.id) |
feliperuhland
Feb 27, 2020
Author
Contributor
It's because List Secrets doesn't return the name attribute.
Issue #2025
ulyssessouza
Feb 28, 2020
Contributor
Well...
The API says it does. That's in the very link you mentioned. If not, it's a bug
|
Please sign your commits following these rules: $ git clone -b "fix-secret-repr" git@github.com:feliperuhland/docker-py.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354382592
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 -fAmending updates the existing PR. You DO NOT need to open a new one. |
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
191da62
to
3626329

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


This PR fixes issue #2025