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

Packages: update versioning and release process #18195

Merged
merged 17 commits into from
Sep 12, 2019
Merged

Conversation

dprokop
Copy link
Member

@dprokop dprokop commented Jul 19, 2019

@ryantxu @torkelo

This PR introduces updated Readmes that summarise guidelines about packages versioning and releases. Also, ALPHA notices are added to every package's Readme.


I have been thinking recently about the approach to versioning packages. This seems to be slightly tricky, especially that we have some experience now with loads of versions pushed to npm.

Here are my thoughts:

  1. Packages' version should ALWAYS reflect current Grafana version
  2. We should stop using alpha prerelease id in every version of packages. I think having an an explicite warnings about packages being in ALPHA state until further notice is sufficient. Having alpha in every version on npm is making managing versioning more complicated than it should be and it doesn't bring us any value and it's a pain to say which version of package corresponds to which version of Grafana.
  3. We should be publishing packages under 3 different dist-tags on npm:
    • latest - version that is released with latest stable Grafana, i.e. 6.2.5
    • next - version that is released with current Grafana prerelease, i.e. 6.3.0.beta.1
    • canary - version that is released directly from master on every merge, i.e. 6.4.0-pre-bbc3e10b. My main motivation for canary is that master isn't actually the next version. It's a possible next version, depending on the commits that's gonna be cherry picked to the release branch. Also, what is very important, lerna.json version on master should always be the same as in package.json, meaning it's the next major/minor i.e. 6.4.0-pre. The pre doesn't seem like semantic versioning, but as long as we are consistent, this should not be an issue. Grafana doesn't strictly follow semver anyways.

So, some action points if this is going to be merged and followed:

  • Update scripts/circle-release-next-packages.sh to publish to canary dist-tag instead of next:
    • Either introduce packages:publishCanary script
    • or use yarn packages:publish --dist-tag canary --yes in the script
  • Sync with Packages: update package.json files  #18173 (update versions to 6.4.0-pre)
  • Next Grafana release will include packages release as well. Depending whether its gonna be beta.2 or stable, we should publish to npm with version corresponding to Grafana version. This is introduced in eb32fe5
  • Grafana Release Guide should be updated with new additional step that would describe the process or redirect to this guide. I suggest that you @ryantxu assist anyone who's gonna do the release
  • Since there are a lot of versions published to npm already I thought it would be wise to cleanup the history there a little bit. But, if we skip adding alpha to every version, and follow Grafana's versioning, I think we should be fine with those early versions being published on npm. We can ask them to remove some of them later on.
  • We should consider publishing from master (canary release according to ^^) to different registry than npm and maybe treat npm as a source of packages released with Grafana. This is described in Packages: versioning and releases #18038 (comment) . Thanks to that we could avoid having a lot of noise in our npm history. We don't have access to GH package registry yet.

Copy link
Member

@torkelo torkelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!"

Copy link
Member

@ryantxu ryantxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good -- I'll wait for you to get back to pull the trigger :)

@dprokop dprokop requested a review from torkelo August 14, 2019 12:17
packages/README.md Outdated Show resolved Hide resolved
@dprokop
Copy link
Member Author

dprokop commented Aug 14, 2019

@ryantxu @torkelo can u review one more time, pushed some commits there with script to release next/latest versions when releasing Grafana.

@dprokop dprokop requested a review from xlson August 14, 2019 12:22
@dprokop dprokop changed the title Packages: update versioning and release guide Packages: update versioning and release process Aug 14, 2019
scripts/build/release-packages.sh Outdated Show resolved Hide resolved
scripts/build/release-packages.sh Show resolved Hide resolved
scripts/build/release-packages.sh Show resolved Hide resolved
scripts/build/release-packages.sh Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
dprokop and others added 2 commits August 14, 2019 14:56
Co-Authored-By: Leonard Gram <leo@xlson.com>
Copy link
Contributor

@xlson xlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ryantxu ryantxu self-requested a review August 14, 2019 14:05
Copy link
Member

@ryantxu ryantxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too!

@dprokop dprokop added this to the 6.4 milestone Aug 15, 2019
@dprokop dprokop merged commit c2dea63 into master Sep 12, 2019
@dprokop dprokop deleted the packages/versioning branch September 12, 2019 06:00
ryantxu added a commit that referenced this pull request Sep 12, 2019
* grafana/query-observable:
  TimeSeries: Replace fieldName with fieldIndex  (#19030)
  DataLinksInput - change the way enter key is handled (#18985)
  TimeSeries: Add data frame index and field name (#19005)
  Packages: update versioning and release process (#18195)
  API: Add `updatedAt` to api/users/:id (#19004)
ryantxu added a commit to ryantxu/grafana that referenced this pull request Sep 12, 2019
* grafana/master:
  toolkit: fix master build, avoid null check (grafana#19055)
  Auth: Allow inviting existing users when login form is disabled (grafana#19048)
  MSSQL: Fix memory leak when debug enabled (grafana#19049)
  Update CONTRIBUTING.md (grafana#19051)
  Update README.md (grafana#19047)
  toolkit: pipe execa output to console.stdout (grafana#19052)
  QueryProcessing: Observable query interface and RxJS for query & stream processing   (grafana#18899)
  Fix exit live mode icon: change back to Stop. (grafana#19043)
  Loki: Fix vertical alignment issue in label selector (grafana#18943)
  Fix: Align buttons and label in ToggleButtonGroup (grafana#19036)
  toolkit: run make for backend plugins (grafana#19029)
  Explore: Fix auto completion on label values for Loki (grafana#18988)
  TimeSeries: Replace fieldName with fieldIndex  (grafana#19030)
  DataLinksInput - change the way enter key is handled (grafana#18985)
  TimeSeries: Add data frame index and field name (grafana#19005)
  Packages: update versioning and release process (grafana#18195)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants