From c01287d915bdfc2e9e824dfe3e446116c5fb2458 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 29 Apr 2020 12:51:14 -0600 Subject: [PATCH 1/8] added backport process doc --- wiki/backport-process.md | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 wiki/backport-process.md diff --git a/wiki/backport-process.md b/wiki/backport-process.md new file mode 100644 index 00000000000..2f7177ee323 --- /dev/null +++ b/wiki/backport-process.md @@ -0,0 +1,47 @@ +# EUI backport patches + +In general, we strongly encourage updating to the latest version of EUI to obtain bug fixes, and we do not actively consider backporting fixes to previous major or minor release versions. The exception to this is when supporting Kibana's release process, as we want to avoid pushing larger changes near the feature freeze. + +### Tracking issue + +When preparing for a backport a github issue in should be created in EUI referencing the relevant issues and/or PRs to be included - see https://github.com/elastic/eui/issues/3386 as an example. This issue is used to keep track of the patch's completion progress and to ensure the desired changes are included in the release. + +### Patch process + +This provides a walkthrough of the patching & backport release process; examples are taken from the release of x.x.x based on https://github.com/elastic/eui/issues/3386 + +* Update your local repo's knowledge of commits so they can be referenced - `git checkout master && git pull` +* Identify the target version of EUI to patch; GH issue says the new version should be `22.3.1` and I confirmed the patch's base is `22.3.0` + * in the EUI git repo, checkout the release tag the patch is intended for - `git checkout v22.3.0` + * create a new branch from the versioned tag, the name is unimportant but I use the target version without a leading `v` - `git checkout -b 22.3.1` +* Run `yarn` to ensure you have the correct dependencies for that point in time installed +* Apply the commit(s) with the desired changes + * GH issue references #3369, #3378, #3330, and #3398 + * We always use squash merges, so each PR has a single commit hash to include + * For each PR, find the merge commit + * For example, #3369's merge message is + ![3369 merge](https://d.pr/i/l002Vu.png) + giving `797057a` as the commit hash + * For this release, we have `797057a`, `9ba25c0`, `68080d2`, and `42c7ced` + * Cherry pick the commit hashes into the backport branch and resolve any conflicts - `git cherry-pick 797057a 9ba25c0 68080d2 42c7ced` + * Resolve changelog conflicts by taking the base version (`22.3.0`'s side in this example) and adding the cherry-picked entry to the `master` heading + * You may need to re-run yarn in order to commit changes, if the commit modified dependencies + * Remember to continue cherry picking with `git cherry-pick --continue` until all commits have been applied +* Start the dev server and check that the intended changes have been properly applied, you don't want to repeat this process to patch the patch - `yarn start` +* Once everything looks correct, it's time to release; the `yarn release` script only works when releasing from `master`, so we'll run [a subset of those steps](https://github.com/elastic/eui/blob/06fc9a6880766168aec1a622873e7f6fe1b3d42b/scripts/release.js#L34-L57) manually + * Run the unit tests again - `npm test` + * Create the release builds - `npm run build` + * Update the I18n tokens - `npm run update-token-changelog -- patch` + * Use npm to update package.json & package-lock.json version, git commit, and git tag - `npm version patch` + * Push the version commit & tag to upstream - `git push upstream --tags` + * Publish the new version to npm + * Get your npm One Time Password (OTP) from Google Authenticator, Authy, etc + * `npm publish --otp=your-one-time-password` +* Update `master`'s changelog to include this release + * On the branch you used to build & release, copy the relevant changelog section - e.g. contents of `## [`22.3.1`](https://github.com/elastic/eui/tree/v22.3.1)` + * Checkoug `master` - `git checkout master` + * Paste the changelog section at the correct location in _CHANGELOG.md_ + * Include an extra line at the top of this section describing it as a backport, e.g. **Note: this release is a backport containing changes originally made in `23.0.0`, `23.1.0`, and `23.2.0`** + * Commit the changelog entry to master and push - `git commit -anm "changelog" && git push` +* Let people know the backport is released +* Celebrate profusely From db7e5aaf14b99e0b59964b10b133733091881a2b Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:17:53 -0600 Subject: [PATCH 2/8] Update wiki/backport-process.md Co-authored-by: Greg Thompson --- wiki/backport-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/backport-process.md b/wiki/backport-process.md index 2f7177ee323..bfb3b317ddc 100644 --- a/wiki/backport-process.md +++ b/wiki/backport-process.md @@ -4,7 +4,7 @@ In general, we strongly encourage updating to the latest version of EUI to obtai ### Tracking issue -When preparing for a backport a github issue in should be created in EUI referencing the relevant issues and/or PRs to be included - see https://github.com/elastic/eui/issues/3386 as an example. This issue is used to keep track of the patch's completion progress and to ensure the desired changes are included in the release. +When preparing for a backport a GitHub issue should be created in EUI referencing the relevant issues and/or PRs to be included - see https://github.com/elastic/eui/issues/3386 as an example. This issue is used to keep track of the patch's completion progress and to ensure the desired changes are included in the release. ### Patch process From c5ddf6cd2d56538a871b11511019cb3c7bbe519e Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:18:11 -0600 Subject: [PATCH 3/8] Update wiki/backport-process.md Co-authored-by: Greg Thompson --- wiki/backport-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/backport-process.md b/wiki/backport-process.md index bfb3b317ddc..0e7c6e740ce 100644 --- a/wiki/backport-process.md +++ b/wiki/backport-process.md @@ -8,7 +8,7 @@ When preparing for a backport a GitHub issue should be created in EUI referencin ### Patch process -This provides a walkthrough of the patching & backport release process; examples are taken from the release of x.x.x based on https://github.com/elastic/eui/issues/3386 +This provides a walkthrough of the patching & backport release process; examples are taken from the release of v22.3.1 based on https://github.com/elastic/eui/issues/3386 * Update your local repo's knowledge of commits so they can be referenced - `git checkout master && git pull` * Identify the target version of EUI to patch; GH issue says the new version should be `22.3.1` and I confirmed the patch's base is `22.3.0` From 47a88270f6356ff25625dffbb205415004d47c62 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:18:20 -0600 Subject: [PATCH 4/8] Update wiki/backport-process.md Co-authored-by: Greg Thompson --- wiki/backport-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/backport-process.md b/wiki/backport-process.md index 0e7c6e740ce..fee4b293c81 100644 --- a/wiki/backport-process.md +++ b/wiki/backport-process.md @@ -11,7 +11,7 @@ When preparing for a backport a GitHub issue should be created in EUI referencin This provides a walkthrough of the patching & backport release process; examples are taken from the release of v22.3.1 based on https://github.com/elastic/eui/issues/3386 * Update your local repo's knowledge of commits so they can be referenced - `git checkout master && git pull` -* Identify the target version of EUI to patch; GH issue says the new version should be `22.3.1` and I confirmed the patch's base is `22.3.0` +* Identify the target version of EUI to patch; GitHub issue says the new version should be `22.3.1` and I confirmed the patch's base is `22.3.0` * in the EUI git repo, checkout the release tag the patch is intended for - `git checkout v22.3.0` * create a new branch from the versioned tag, the name is unimportant but I use the target version without a leading `v` - `git checkout -b 22.3.1` * Run `yarn` to ensure you have the correct dependencies for that point in time installed From 8189fb2d6dfc8bfddecc54e7d1c66824a46a0051 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:18:26 -0600 Subject: [PATCH 5/8] Update wiki/backport-process.md Co-authored-by: Greg Thompson --- wiki/backport-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/backport-process.md b/wiki/backport-process.md index fee4b293c81..db6dce37904 100644 --- a/wiki/backport-process.md +++ b/wiki/backport-process.md @@ -16,7 +16,7 @@ This provides a walkthrough of the patching & backport release process; examples * create a new branch from the versioned tag, the name is unimportant but I use the target version without a leading `v` - `git checkout -b 22.3.1` * Run `yarn` to ensure you have the correct dependencies for that point in time installed * Apply the commit(s) with the desired changes - * GH issue references #3369, #3378, #3330, and #3398 + * GitHub issue references #3369, #3378, #3330, and #3398 * We always use squash merges, so each PR has a single commit hash to include * For each PR, find the merge commit * For example, #3369's merge message is From a2fcc2f3deea801624b3f6d161925bec1e2f9b25 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:18:34 -0600 Subject: [PATCH 6/8] Update wiki/backport-process.md Co-authored-by: Greg Thompson --- wiki/backport-process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/backport-process.md b/wiki/backport-process.md index db6dce37904..7ee68da1299 100644 --- a/wiki/backport-process.md +++ b/wiki/backport-process.md @@ -39,7 +39,7 @@ This provides a walkthrough of the patching & backport release process; examples * `npm publish --otp=your-one-time-password` * Update `master`'s changelog to include this release * On the branch you used to build & release, copy the relevant changelog section - e.g. contents of `## [`22.3.1`](https://github.com/elastic/eui/tree/v22.3.1)` - * Checkoug `master` - `git checkout master` + * Checkout `master` - `git checkout master` * Paste the changelog section at the correct location in _CHANGELOG.md_ * Include an extra line at the top of this section describing it as a backport, e.g. **Note: this release is a backport containing changes originally made in `23.0.0`, `23.1.0`, and `23.2.0`** * Commit the changelog entry to master and push - `git commit -anm "changelog" && git push` From 23a07279ff2ff62cd71186d4117ee7cac22742e9 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:38:16 -0600 Subject: [PATCH 7/8] PR feedback --- wiki/backport-process.md | 47 ----------------------------------- wiki/releasing-versions.md | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 47 deletions(-) delete mode 100644 wiki/backport-process.md diff --git a/wiki/backport-process.md b/wiki/backport-process.md deleted file mode 100644 index 7ee68da1299..00000000000 --- a/wiki/backport-process.md +++ /dev/null @@ -1,47 +0,0 @@ -# EUI backport patches - -In general, we strongly encourage updating to the latest version of EUI to obtain bug fixes, and we do not actively consider backporting fixes to previous major or minor release versions. The exception to this is when supporting Kibana's release process, as we want to avoid pushing larger changes near the feature freeze. - -### Tracking issue - -When preparing for a backport a GitHub issue should be created in EUI referencing the relevant issues and/or PRs to be included - see https://github.com/elastic/eui/issues/3386 as an example. This issue is used to keep track of the patch's completion progress and to ensure the desired changes are included in the release. - -### Patch process - -This provides a walkthrough of the patching & backport release process; examples are taken from the release of v22.3.1 based on https://github.com/elastic/eui/issues/3386 - -* Update your local repo's knowledge of commits so they can be referenced - `git checkout master && git pull` -* Identify the target version of EUI to patch; GitHub issue says the new version should be `22.3.1` and I confirmed the patch's base is `22.3.0` - * in the EUI git repo, checkout the release tag the patch is intended for - `git checkout v22.3.0` - * create a new branch from the versioned tag, the name is unimportant but I use the target version without a leading `v` - `git checkout -b 22.3.1` -* Run `yarn` to ensure you have the correct dependencies for that point in time installed -* Apply the commit(s) with the desired changes - * GitHub issue references #3369, #3378, #3330, and #3398 - * We always use squash merges, so each PR has a single commit hash to include - * For each PR, find the merge commit - * For example, #3369's merge message is - ![3369 merge](https://d.pr/i/l002Vu.png) - giving `797057a` as the commit hash - * For this release, we have `797057a`, `9ba25c0`, `68080d2`, and `42c7ced` - * Cherry pick the commit hashes into the backport branch and resolve any conflicts - `git cherry-pick 797057a 9ba25c0 68080d2 42c7ced` - * Resolve changelog conflicts by taking the base version (`22.3.0`'s side in this example) and adding the cherry-picked entry to the `master` heading - * You may need to re-run yarn in order to commit changes, if the commit modified dependencies - * Remember to continue cherry picking with `git cherry-pick --continue` until all commits have been applied -* Start the dev server and check that the intended changes have been properly applied, you don't want to repeat this process to patch the patch - `yarn start` -* Once everything looks correct, it's time to release; the `yarn release` script only works when releasing from `master`, so we'll run [a subset of those steps](https://github.com/elastic/eui/blob/06fc9a6880766168aec1a622873e7f6fe1b3d42b/scripts/release.js#L34-L57) manually - * Run the unit tests again - `npm test` - * Create the release builds - `npm run build` - * Update the I18n tokens - `npm run update-token-changelog -- patch` - * Use npm to update package.json & package-lock.json version, git commit, and git tag - `npm version patch` - * Push the version commit & tag to upstream - `git push upstream --tags` - * Publish the new version to npm - * Get your npm One Time Password (OTP) from Google Authenticator, Authy, etc - * `npm publish --otp=your-one-time-password` -* Update `master`'s changelog to include this release - * On the branch you used to build & release, copy the relevant changelog section - e.g. contents of `## [`22.3.1`](https://github.com/elastic/eui/tree/v22.3.1)` - * Checkout `master` - `git checkout master` - * Paste the changelog section at the correct location in _CHANGELOG.md_ - * Include an extra line at the top of this section describing it as a backport, e.g. **Note: this release is a backport containing changes originally made in `23.0.0`, `23.1.0`, and `23.2.0`** - * Commit the changelog entry to master and push - `git commit -anm "changelog" && git push` -* Let people know the backport is released -* Celebrate profusely diff --git a/wiki/releasing-versions.md b/wiki/releasing-versions.md index d1ccd2b81ac..f4313d83754 100644 --- a/wiki/releasing-versions.md +++ b/wiki/releasing-versions.md @@ -23,3 +23,54 @@ That's it. The latest changes were published to GitHub, a new `git` tag now exis For information on releasing the eslint plugin checkout the readme in [packages/eslint-plugin/README.md](../packages/eslint-plugin/README.md) [docs]: https://elastic.github.io/eui/ + +# Backport process + +In general, we strongly encourage updating to the latest version of EUI to obtain bug fixes, and we do not actively consider backporting fixes to previous major or minor release versions. The exception to this is when supporting Kibana's release process, as we want to avoid pushing larger changes near the feature freeze. + +### Tracking issue + +When preparing for a backport a GitHub issue should be created in EUI referencing the relevant issues and/or PRs to be included - see https://github.com/elastic/eui/issues/3386 as an example. This issue is used to keep track of the patch's completion progress and to ensure the desired changes are included in the release. + +### Patch process + +This provides a walkthrough of the patching & backport release process; examples are taken from the release of v22.3.1 based on https://github.com/elastic/eui/issues/3386 + +* Unless it is unreasonable, begin by performing a full release from the `master` branch. This ensures the changelog is prepared for referencing later by the backport, and pulls in all commits that will be used by the backport. + * Switch to `master` - `git checkout master` + * Run the release script and follow the prompts - `npm run release` +* Identify the target version of EUI to patch; GitHub issue says the new version should be `22.3.1` and I confirmed the patch's base is `22.3.0` + * in the EUI git repo, checkout the release tag the patch is intended for - `git checkout v22.3.0` + * create a new branch from the versioned tag, the name is unimportant but I use the target version without a leading `v` - `git checkout -b 22.3.1` +* Run `yarn` to ensure you have the correct dependencies for that point in time installed +* Apply the commit(s) with the desired changes + * GitHub issue references #3369, #3378, #3330, and #3398 + * We always use squash merges, so each PR has a single commit hash to include + * For each PR, find the merge commit + * For example, #3369's merge message is + ![3369 merge](https://d.pr/i/l002Vu.png) + giving `797057a` as the commit hash + * For this release, we have `797057a`, `9ba25c0`, `68080d2`, and `42c7ced` + * Cherry pick the commit hashes into the backport branch and resolve any conflicts - `git cherry-pick 797057a 9ba25c0 68080d2 42c7ced` + * Resolve changelog conflicts by taking the base version (`22.3.0`'s side in this example) and adding the cherry-picked entry to the `master` heading + * You may need to re-run yarn in order to commit changes, if the commit modified dependencies + * Remember to continue cherry picking with `git cherry-pick --continue` until all commits have been applied +* Start the dev server and check that the intended changes have been properly applied, you don't want to repeat this process to patch the patch - `yarn start` +* Once everything looks correct, it's time to release; the `yarn release` script only works when releasing from `master`, so we'll run [a subset of those steps](https://github.com/elastic/eui/blob/06fc9a6880766168aec1a622873e7f6fe1b3d42b/scripts/release.js#L34-L57) manually + * Run the unit tests again - `npm test` + * Create the release builds - `npm run build` + * Update the I18n tokens - `npm run update-token-changelog -- patch` + * Use npm to update package.json & package-lock.json version, git commit, and git tag - `npm version patch` + * Push the version commit & tag to upstream - `git push upstream --tags` + * Publish the new version to npm + * Get your npm One Time Password (OTP) from Google Authenticator, Authy, etc + * Publish with your OPT and the new version as the tag - `npm publish --tag=22.3.1 --otp=your-one-time-password` +* Releasing a new version sets npm's `latest` tag +* Update `master`'s changelog to include this release + * On the branch you used to build & release, copy the relevant changelog section - e.g. contents of `## [`22.3.1`](https://github.com/elastic/eui/tree/v22.3.1)` + * Checkout `master` - `git checkout master` + * Paste the changelog section at the correct location in _CHANGELOG.md_ + * Include an extra line at the top of this section describing it as a backport, e.g. **Note: this release is a backport containing changes originally made in `23.0.0`, `23.1.0`, and `23.2.0`** + * Commit the changelog entry to master and push - `git commit -anm "changelog" && git push` +* Let people know the backport is released +* Celebrate profusely From 7c5ec4868703e3705d2d2eeb21ad36c6a7bf5c9c Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Thu, 30 Apr 2020 13:52:59 -0600 Subject: [PATCH 8/8] Update wiki/releasing-versions.md Co-authored-by: Greg Thompson --- wiki/releasing-versions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/wiki/releasing-versions.md b/wiki/releasing-versions.md index f4313d83754..73d9b376977 100644 --- a/wiki/releasing-versions.md +++ b/wiki/releasing-versions.md @@ -65,7 +65,6 @@ This provides a walkthrough of the patching & backport release process; examples * Publish the new version to npm * Get your npm One Time Password (OTP) from Google Authenticator, Authy, etc * Publish with your OPT and the new version as the tag - `npm publish --tag=22.3.1 --otp=your-one-time-password` -* Releasing a new version sets npm's `latest` tag * Update `master`'s changelog to include this release * On the branch you used to build & release, copy the relevant changelog section - e.g. contents of `## [`22.3.1`](https://github.com/elastic/eui/tree/v22.3.1)` * Checkout `master` - `git checkout master`