Skip to content

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

Closed

Description

@curiousbug

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

Activity

  1. curiousbug commented on Jun 30, 2016

    @curiousbug
    Author

    Issue is still present on version 1.3.0

  2. ojongerius commented on Jun 30, 2016

    @ojongerius
    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

  3. wolfeidau commented on Jul 7, 2016

    @wolfeidau
    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.

  4. wolfeidau commented on Jul 7, 2016

    @wolfeidau
    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.

  5. wolfeidau commented on Aug 27, 2016

    @wolfeidau
    Contributor

    Fixed by #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址