Skip to content

Package revision race #395

Description

@enykeev

Between fetching a revision number as a part of checkout and uploading a new package with this revision during deploy, every parallel package build will end up with the same revision number and will fail on deploy stage due to package already being present.

Activity

  1. arm4b commented on Dec 20, 2016

    @arm4b
    Member

    That's what I thought about when implemented existing revision number logic. I wanted to rely on external service like Redis with locking and releasing to avoid any possible race conditions around revision number like this.

    But with time, I must admit that it was over-engineering, rather then real case.
    Race never happened, because one thing is PR where release number doesn't matter and another thing is Merge.
    What's important for us is post-merge build, which happens pretty rarely (a couple of times/month in st2-packages and a couple of times/day for st2 in average).

  2. arm4b commented on Jul 20, 2017

    @arm4b
    Member

    Happened for the first time now with @Kami during the year or something 👍
    https://circleci.com/gh/StackStorm/st2/4522
    If there is less than 10mins between merging 2 PRs into master, - they'll race on package revision.

  3. arm4b commented on Jul 20, 2017

    @arm4b
    Member

    I still think by implementing some locking and relying on external service would be overengineering.

    Solution for now: don't merge 2 PRs in one go.

    If that issue will happen again and again, - then yes worth adding some external Consul or Redis or whatever for revision locking.

  4. arm4b commented on Aug 23, 2017

    @arm4b
    Member

    Update: the race happened one more time during the 2.4 release when we trigger the build for both st2-packages + st2 repos at the same time.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions