From bd903e9b8d7b96a7eec165f1e73f2f4eede5b29a Mon Sep 17 00:00:00 2001 From: Tommy Markley <5437176+tmarkley@users.noreply.github.com> Date: Tue, 7 Mar 2023 17:36:00 -0600 Subject: [PATCH] Simplifies `re2` upgrade instructions (#3328) * Follow-up from #3018 Signed-off-by: Tommy Markley <5437176+tmarkley@users.noreply.github.com> Signed-off-by: David Sinclair --- CHANGELOG.md | 1 + .../build/tasks/patch_native_modules_task.ts | 21 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 231b543330f6..b9734f3d1de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -128,6 +128,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Doc] Add current plugin persistence implementation readme ([#3081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3081)) - [Doc] Improve DEVELOPER_GUIDE to make first time setup quicker and easier ([#3421](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3421)) - Correct copyright date range of NOTICE file and notice generator ([#3308](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3308)) +- Simplify the in-code instructions for upgrading `re2` ([#3328](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3328)) ### 🛠 Maintenance diff --git a/src/dev/build/tasks/patch_native_modules_task.ts b/src/dev/build/tasks/patch_native_modules_task.ts index 7b9e67db148d..3bd9fa63c358 100644 --- a/src/dev/build/tasks/patch_native_modules_task.ts +++ b/src/dev/build/tasks/patch_native_modules_task.ts @@ -52,17 +52,16 @@ interface Package { >; } -// Process for updating urls and checksums after bumping the version of `re2`: -// 1. Match `version` with the version in the yarn.lock file. -// 2. Update the url to match the version. -// 2a. If a Node.js update occurs, the node module version must match as -// well (i.e. '83'). See https://nodejs.org/en/download/releases/#ref-1. -// 3. Generate the new checksum by executing the following commands: -// 3a. `wget {url}` -// 3b. `sha256sum {downloaded file name}` -// 3c. For `linux-arm64`, the sha256 can also be found by replacing -// "linux-arm64-83.tar.gz" in the url with "sha256sum.txt.asc" -// and copying the sha256 from that file. +/* Process for updating URLs and checksums after bumping the version of `re2` or NodeJS: + * 1. Match the `version` with the version in the yarn.lock file. + * 2. Match the module version, the digits at the end of the filename, with the output of + * `node -p process.versions.modules`. + * 3. Confirm that the URLs exist for each platform-architecture combo on + * https://github.com/uhop/node-re2/releases/tag/[VERSION]; reach out to maintainers for ARM + * releases of `re2` as they currently don't have an official ARM release. + * 4. Generate new checksums for each artifact by downloading each one and calling + * `shasum -a 256` or `sha256sum` on the downloaded file. + */ const packages: Package[] = [ { name: 're2',