-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[APIv2] secrets are missing Version field #9316
Comments
@ashley-cui PTAL |
hmm, didn't we decide that it doesn't make sense to have a version field since docker only responds with a version field since it has a swarm manager that deals with secrets? but i guess since its compat, should i wire in the version number anyway? |
Yes, that what we thought initially. I am also not sure which version to return. @jwhonce @baude WDYT? |
I have no idea what version to return, Perhaps API version. |
Docker secrets allow mutation - AFAIK the Version is incremented every time the secret changes. It sounds like we should add the field and fix it to 1? |
Ohh that makes more sense than the swarm version number. I can add the version in pretty easily, I can do that fairly easily, if it's just fixing it to 1 |
42 would also be cool 😎 |
Update: I tested it out and creating a secret defaults version to 11. I can't figure out what 11 means, and I also can't find where it the docs that it explains what the secret version means. If anyone recalls if they read anything about versions, let me know :) |
@ashley-cui, there is a secret update endpoint which allows for updating a given secret. AFAIUI, the Without having looked too closely, I assume that an update only works when the specified version is |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Trying to find regressions by exercising the APIv2 trough docker-py's test suite (see #5386) I came across a failing assertion
SecretAPITest::test_inspect_secret
test.It seems secrets returned from
GET /secrets
andGET /secret/{id}
endpoints are missing the (non-optional)Version
field.Steps to reproduce the issue:
Describe the results you received:
The secrets returned don't have a
Version
field.Describe the results you expected:
The secrets returned should have a
Version
field.see Docker API docs: https://docs.docker.com/engine/api/v1.40/#operation/ConfigInspect
The text was updated successfully, but these errors were encountered: