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

Don't release canary on skip-release by default, add force flag #993

Merged
merged 4 commits into from
Mar 2, 2020

Conversation

zephraph
Copy link
Collaborator

@zephraph zephraph commented Feb 26, 2020

Fixes #962

What Changed

Canaries now no longer publish for PRs that skip the release. A flag --force was added to the canary subcommand to make it always publish, regardless of label.

Why

Often times for things like docs updates or other trivial changes deploying a canary is extra noise that's unnecessary.

Open questions

  1. Does shipit need to be updated with some sort of force flag?
  2. Eslint complexity is over the limit on the canary function. Should I increase it or refactor that function to pull out some checks?
  3. Did I miss updating things anywhere?
  4. Should we invert this PR to make it where it releases by default but has a flag to skip canaries if skip release. (i.e. --respect-labels or something)

Todo:

  • Figure out how to handle eslint complexity failure
  • Add tests
  • Add docs
📦 Published PR as canary version: under canary scope @auto-canary@9.15.4-canary.993.13171.0

✨ Test out this PR locally via:

npm install @auto-canary/auto@9.15.4-canary.993.13171.0
npm install @auto-canary/core@9.15.4-canary.993.13171.0
npm install @auto-canary/all-contributors@9.15.4-canary.993.13171.0
npm install @auto-canary/chrome@9.15.4-canary.993.13171.0
npm install @auto-canary/conventional-commits@9.15.4-canary.993.13171.0
npm install @auto-canary/crates@9.15.4-canary.993.13171.0
npm install @auto-canary/first-time-contributor@9.15.4-canary.993.13171.0
npm install @auto-canary/git-tag@9.15.4-canary.993.13171.0
npm install @auto-canary/gradle@9.15.4-canary.993.13171.0
npm install @auto-canary/jira@9.15.4-canary.993.13171.0
npm install @auto-canary/maven@9.15.4-canary.993.13171.0
npm install @auto-canary/npm@9.15.4-canary.993.13171.0
npm install @auto-canary/omit-commits@9.15.4-canary.993.13171.0
npm install @auto-canary/omit-release-notes@9.15.4-canary.993.13171.0
npm install @auto-canary/released@9.15.4-canary.993.13171.0
npm install @auto-canary/s3@9.15.4-canary.993.13171.0
npm install @auto-canary/slack@9.15.4-canary.993.13171.0
npm install @auto-canary/twitter@9.15.4-canary.993.13171.0
npm install @auto-canary/upload-assets@9.15.4-canary.993.13171.0
# or 
yarn add @auto-canary/auto@9.15.4-canary.993.13171.0
yarn add @auto-canary/core@9.15.4-canary.993.13171.0
yarn add @auto-canary/all-contributors@9.15.4-canary.993.13171.0
yarn add @auto-canary/chrome@9.15.4-canary.993.13171.0
yarn add @auto-canary/conventional-commits@9.15.4-canary.993.13171.0
yarn add @auto-canary/crates@9.15.4-canary.993.13171.0
yarn add @auto-canary/first-time-contributor@9.15.4-canary.993.13171.0
yarn add @auto-canary/git-tag@9.15.4-canary.993.13171.0
yarn add @auto-canary/gradle@9.15.4-canary.993.13171.0
yarn add @auto-canary/jira@9.15.4-canary.993.13171.0
yarn add @auto-canary/maven@9.15.4-canary.993.13171.0
yarn add @auto-canary/npm@9.15.4-canary.993.13171.0
yarn add @auto-canary/omit-commits@9.15.4-canary.993.13171.0
yarn add @auto-canary/omit-release-notes@9.15.4-canary.993.13171.0
yarn add @auto-canary/released@9.15.4-canary.993.13171.0
yarn add @auto-canary/s3@9.15.4-canary.993.13171.0
yarn add @auto-canary/slack@9.15.4-canary.993.13171.0
yarn add @auto-canary/twitter@9.15.4-canary.993.13171.0
yarn add @auto-canary/upload-assets@9.15.4-canary.993.13171.0

@zephraph zephraph self-assigned this Feb 26, 2020
@hipstersmoothie hipstersmoothie force-pushed the no-canary-on-non-deploy branch from 14d433d to fea4546 Compare March 2, 2020 22:24
@hipstersmoothie hipstersmoothie force-pushed the no-canary-on-non-deploy branch from fea4546 to 20cd3d8 Compare March 2, 2020 22:25
@hipstersmoothie
Copy link
Collaborator

Does shipit need to be updated with some sort of force flag?

I have added it as a configurable option. This is solved.

Eslint complexity is over the limit on the canary function. Should I increase it or refactor that function to pull out some checks?

I just turned it off. 🤷‍♂

Did I miss updating things anywhere?

To me it looks like your changes to packages/core/src/auto.ts is all that would be needed.

Should we invert this PR to make it where it releases by default but has a flag to skip canaries if skip release. (i.e. --respect-labels or something)

I feel like a new user would expect the release to be skipped also. I like this, it's a good sane default. This could be viewed as a major but it kind of seems like a bug that it was releasing anything at all.

Sometimes I use a skip-release label on a pr to batch two changes into one release. But I only ever do that at the end so it shouldn't be a problem.

@codecov
Copy link

codecov bot commented Mar 2, 2020

Codecov Report

Merging #993 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #993      +/-   ##
==========================================
+ Coverage   80.91%   80.94%   +0.02%     
==========================================
  Files          44       44              
  Lines        3328     3332       +4     
  Branches      705      668      -37     
==========================================
+ Hits         2693     2697       +4     
  Misses        465      465              
  Partials      170      170
Impacted Files Coverage Δ
packages/core/src/types.ts 100% <ø> (ø) ⬆️
packages/cli/src/parse-args.ts 96.66% <ø> (ø) ⬆️
packages/core/src/auto.ts 78.2% <100%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11da64f...ba2510c. Read the comment docs.

@hipstersmoothie hipstersmoothie marked this pull request as ready for review March 2, 2020 23:42
@hipstersmoothie hipstersmoothie merged commit 89ffaca into master Mar 2, 2020
@hipstersmoothie hipstersmoothie deleted the no-canary-on-non-deploy branch March 2, 2020 23:42
@adierkens
Copy link
Collaborator

🚀 PR was released in v9.15.4 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Mar 2, 2020
@zephraph
Copy link
Collaborator Author

zephraph commented Mar 3, 2020

Thanks for wrapping this up! Sorry I didn't get back to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to skip canaries on skip releases
3 participants