GithubHelp home page GithubHelp logo

Comments (13)

hipstersmoothie avatar hipstersmoothie commented on May 22, 2024

Possible solution to this discussed with @adierkens:

Set a status on all open PRs to fail while release is in progress. This way a user cannot merge until this status turns green.

Kinda weird but would fix the problem

from auto.

zephraph avatar zephraph commented on May 22, 2024

That's certainly one solution. I'm trying to handle this at the CI level by queuing master builds. Unfortunately Circle doesn't provide a native mechanism for this, but @eddiewebb created an orb to handle it.

You can checkout reaction to see our setup. I'm not 100% certain that it solves the problem (especially if instead of checking out master the steps are checking out a hash) but I hope it gets us close.

from auto.

adierkens avatar adierkens commented on May 22, 2024

If you queue the master build you run into the issue where you're first CI build of master makes commits on top of the stuff that's already been merged (to bump versions) -- or could hit merge conflicts in the release.

Not sure if there's a clean way of doing it

from auto.

hipstersmoothie avatar hipstersmoothie commented on May 22, 2024

Also:

  1. Merge PR 1 with patch label
  2. Merge PR 2 with minor label
  3. CI runs and calculates a minor bump and includes both PRs
  4. CI runs again and publishes a patch with no changes

Should be:

  1. Merge PR 1 with patch label
  2. Merge PR 2 with minor label
  3. CI runs and calculates a patch bump and includes only PR 1
  4. CI runs and calculates a minor bump and includes only PR 2

from auto.

zephraph avatar zephraph commented on May 22, 2024

Yeah, that's certainly a concern... You'd need a way to update the hash that CI build is pointing to. That or have a similar gated mechanism to the queuing that kills incoming builds and have the end of the release process trigger another CI build if there are pending things to be released.

Granted, that's not a general solution. It implies a lot of specific implementation around CI.

from auto.

aleclarson avatar aleclarson commented on May 22, 2024

Could auto-release publish multiple versions in a single CI build?

from auto.

hipstersmoothie avatar hipstersmoothie commented on May 22, 2024

Maybe, the problem is a lot of this behavior is CI dependent and auto doesn't interact with the CI it just runs on it.

from auto.

aleclarson avatar aleclarson commented on May 22, 2024

I was thinking in the context of Travis CI specifically, where pushing interrupts the current build. In that case, auto-release should be able to detect that the patch PR was merged before the minor PR and appropriately perform two releases as expected. AFAICT, this behavior wouldn't conflict with other CI services that don't interrupt the current build on push.

from auto.

hipstersmoothie avatar hipstersmoothie commented on May 22, 2024

In that case this should already work for travis:

  1. minor merged, starts CI run
  2. patch merged, travis interrupts CI run before the minor gets tagged or released to GitHub
  3. auto version finds the latest release to be the one before minor was merged
  4. a minor version is released with both the minor and patch

The case where you might run into problems is where the second PR is merged between the publish hook and auto release. But in this case we might already have code that can handle that.

from auto.

aleclarson avatar aleclarson commented on May 22, 2024

If you re-read my comment, you'll see I said "patch before minor" (not the opposite).

from auto.

hipstersmoothie avatar hipstersmoothie commented on May 22, 2024

The case where "minor before patch" is more important though. if the minor is the first PR we need to respect that label more.

But re-reading what you want is on the second CI run detect the interrupted run and perform two separate shipits for each release, regardless of release type. Am i correct?

from auto.

aleclarson avatar aleclarson commented on May 22, 2024

The case where "minor before patch" is more important though. if the minor is the first PR we need to respect that label more.

What unwanted effect would you be avoiding in that scenario?

But re-reading what you want is on the second CI run detect the interrupted run and perform two separate shipits for each release, regardless of release type. Am i correct?

Actually, you would be detecting the patch PR being not yet released. The cause (eg: interrupted CI build) is irrelevant to auto-release, I think. You could still merge two PRs of the same release type (eg: minor) into the same version if you detect that neither is released yet.

from auto.

adierkens avatar adierkens commented on May 22, 2024

🚀 Issue was released in v7.15.1 🚀

from auto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.