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

Bug: Putting a new version fails after 10 versions #34

Closed
curiousbug opened this issue Jun 30, 2016 · 5 comments
Closed

Bug: Putting a new version fails after 10 versions #34

curiousbug opened this issue Jun 30, 2016 · 5 comments

Comments

@curiousbug
Copy link

Issue:

  • When a key gets up to 10 versions, trying to add version 11 will fail with a 400 error.

Current workaround:

  • Delete the key, which deletes all the current versions.
  • Insert key with newest version.
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '1'
   • stored                    name=test-v10-issue version=1
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds get test-v10-issue
1
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '2'
   • stored                    name=test-v10-issue version=2
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '3'
   • stored                    name=test-v10-issue version=3
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '4'
   • stored                    name=test-v10-issue version=4
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '45
> '
   • stored                    name=test-v10-issue version=5
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '6'
   • stored                    name=test-v10-issue version=6
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '7'
   • stored                    name=test-v10-issue version=7
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '8'
   • stored                    name=test-v10-issue version=8
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '9'
   • stored                    name=test-v10-issue version=9
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '10'
   • stored                    name=test-v10-issue version=10
vagrant@vagrant-ubuntu-trusty-64:~$ unicreds --alias='alias/nonprod-aem-creds-key' put "test-v10-issue" '11'
   ⨯ failed                    error=ConditionalCheckFailedException: The conditional request failed
    status code: 400, request id: 724BNHJ30K36ML3H1DEE5704OBVV4KQNSO5AEMVJF66Q9ASUAAJG

@curiousbug
Copy link
Author

Issue is still present on version 1.3.0

@ojongerius
Copy link
Contributor

Hi there!

Create DB methods between Credstash and Unicreds look identical, is this reproducible with credstash? (pip install credstash, running your tests should be (almost) identical with it.)

Adding --debug would help seeing if this fails in the lookup of the highest version or the putting of said secret (both have use conditionals) could you please rerun your test with '--debug'?

@wolfeidau when fixed it would be nice to have an integration test to verify there is no regression. See #17

@wolfeidau
Copy link
Contributor

FYI fugue/credstash#51

Going to follow the lead of credstash to resolve this, they now pad the version with zeros.

Working on a change to address this now.

@wolfeidau
Copy link
Contributor

May have been a bit hasty in my diagnosis, restored my neglected adhoc integration test which passes with values over 11.

Definitely need to sit down with @curiousbug and debug this more thoroughly before proceeding.

@wolfeidau
Copy link
Contributor

Fixed by #46

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

No branches or pull requests

3 participants