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

Race condition when creating GitHub releases #2799

Closed
Daniel15 opened this issue Feb 28, 2017 · 3 comments
Closed

Race condition when creating GitHub releases #2799

Daniel15 opened this issue Feb 28, 2017 · 3 comments
Assignees

Comments

@Daniel15
Copy link
Member

Daniel15 commented Feb 28, 2017

The release scripts for Yarn create a new GitHub release.

This results in a race condition like this:

  • If the Windows build finishes before the Linux build, the GitHub release is not marked as a prerelease
  • If the Linux build finishes before the Windows build, the GitHub release is marked as a prerelease

This is very confusing: Sometimes builds that are prereleases are marked as stable (eg. see Homebrew/homebrew-core#10147), while other times stable releases are marked as prereleases (eg. see nodejs/docker-node#337 (comment)).

The correct behaviour should be as follows:

  • If the new version number has the same minor version number as the current stable release (as per http://yarnpkg.com/latest-version), mark it as stable.
  • Otherwise, mark it as prerelease

For example, if we're publishing 0.23.2 and the latest stable is 0.23.1, it should be marked as stable. On the other hand, if we're publishing 0.24.0 and the latest stable is 0.23.1, it should not be marked as stable.

To simplify things, I might also unify the Windows and Linux builds so they upload the build artifacts in the same way, and also automatically bump the version numbers on the site.

@petetnt
Copy link

petetnt commented Feb 28, 2017

I just ran into this myself (I think)? I installed some modules and saw a warning that Your current version of Yarn is out of date. The latest version is "0.21.3" while you're on "0.20.3". Went to upgrade it with brew, but it wasn't available. Went to check the website and it said that latest version (https://yarnpkg.com/latest-version) is 0.21.3. Clicked the link on the front page that said Stable: 0.21.3 and it said that it's a pre-release. Checked package.json and it was updated recently to 0.22.0-0. 🤔

@Daniel15
Copy link
Member Author

Daniel15 commented Feb 28, 2017

@petetnt - That's not related, Homebrew is updated separately by the Homebrew community.

Clicked the link on the front page that said Stable: 0.21.3 and it said that it's a pre-release.

This is related, the GitHub release sometimes incorrectly says it's a prerelease.

Checked package.json and it was updated recently to 0.22.0-0. 🤔

This is the development version. Builds from master (such as nightly builds) will have 0.22.0 as their version number.

@petetnt
Copy link

petetnt commented Feb 28, 2017

@Daniel15 Yeah, the Homebrew part was more of back story (as was the package.json part) how this affected me as the enduser. The formula would have been trivial to update, but I just didn't have any clue what was the actual stable version.

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

2 participants