From 8137551647e697a4c553f9b3c2475c04104a3f6c Mon Sep 17 00:00:00 2001 From: skudasov Date: Fri, 13 Sep 2024 11:17:21 +0200 Subject: [PATCH] add retract versions for test tags --- RELEASE.md | 47 +++++++++++++++++++++++++++++ havoc/go.mod | 2 ++ k8s-test-runner/go.mod | 2 ++ lib/go.mod | 5 ++- seth/go.mod | 2 ++ tools/asciitable/go.mod | 2 ++ tools/breakingchanges/go.mod | 2 ++ tools/citool/go.mod | 2 ++ tools/ecrimagefetcher/go.mod | 2 ++ tools/envresolve/go.mod | 2 ++ tools/ghlatestreleasechecker/go.mod | 2 ++ tools/ghsecrets/go.mod | 2 ++ tools/gotestloghelper/go.mod | 2 ++ tools/testlistgenerator/go.mod | 2 ++ tools/workflowresultparser/go.mod | 2 ++ wasp/go.mod | 2 ++ 16 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..053e4dbb7 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,47 @@ +## Releasing a module + +The Chainlink repository contains multiple independent modules. To release any of them, follow these steps: + +- Merge all PRs that include the functionality you want to release (this can apply to multiple modules). +- For each module being released, add a release notes file in the .changesets folder named `vX.X.X.md`. The format is flexible, but ensure to describe all changes and any necessary upgrade procedures. +- Follow tagging strategy described below, push the tag and check the [release page](https://github.com/smartcontractkit/chainlink-testing-framework/releases) + +### Tagging strategy + +Use only [lightweight tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) + +**Do not move tags between commits. If something need to be fixed increment patch or minor version.** + +Major versions require `$pkg/$subpkg/vX.X.X-alpha` to be released before to analyze the scope of breaking changes across other repositories via Dependabot. +``` +git tag k8s-test-runner/v2.0.0-test-release-alpha && git push --tags +``` + +Minor changes can be tagged as `$pkg/$subpkg/vX.X.X` and released after verifying [release page](https://github.com/smartcontractkit/chainlink-testing-framework/releases) +``` +git tag k8s-test-runner/v0.6.0-test-release-alpha && git push --tags +``` + +### Minor and patch releases +- Tag the main branch using the format `$pkg/$subpkg/vX.X.X` +- Push the tags and visit https://github.com/smartcontractkit/chainlink-testing-framework/releases to check the release. + +There should be no breaking changes in patch or minor releases, check output of `Breaking changes` on the release page, if there are - fix them and publish another patch version. + +### Major release +- Append `vX` to Go module path, example +``` +module github.com/smartcontractkit/chainlink-testing-framework/wasp/v2 +``` +- Tag the main branch using the format `$pkg/$subpkg/v2.X.X-alpha` +- Push the tags and visit https://github.com/smartcontractkit/chainlink-testing-framework/releases to check the release. +- Check Dependabot pipeline to analyze dependencies + +## Debug Release Pipeline +Since some components of pipeline are relying on published Go modules index it is hard to test it, but we have a test script for that purpose: + +To test release for any module use `-test-release-alpha` tags, they are retracted so consumers can't accidentally install them +``` +nix develop +python ./scripts/test-package-release.py -tag k8s-test-runner/v0.6.0-test-release-alpha -package ./k8s-test-runner +``` \ No newline at end of file diff --git a/havoc/go.mod b/havoc/go.mod index 3b09e7869..257af279a 100644 --- a/havoc/go.mod +++ b/havoc/go.mod @@ -77,3 +77,5 @@ require ( ) replace sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.0 + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/k8s-test-runner/go.mod b/k8s-test-runner/go.mod index 2c76e7915..2ae1b0f81 100644 --- a/k8s-test-runner/go.mod +++ b/k8s-test-runner/go.mod @@ -76,3 +76,5 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/lib/go.mod b/lib/go.mod index 403d49242..acd2a9ff4 100644 --- a/lib/go.mod +++ b/lib/go.mod @@ -325,4 +325,7 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -retract v1.50.0 +retract ( + [v1.999.0-test-release, v1.999.999-test-release] + v1.50.0 +) diff --git a/seth/go.mod b/seth/go.mod index a0d5a1491..7074b918c 100644 --- a/seth/go.mod +++ b/seth/go.mod @@ -56,3 +56,5 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/asciitable/go.mod b/tools/asciitable/go.mod index 15c63bde0..2b430abc5 100644 --- a/tools/asciitable/go.mod +++ b/tools/asciitable/go.mod @@ -9,3 +9,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/breakingchanges/go.mod b/tools/breakingchanges/go.mod index 641233f62..7378ddcf3 100644 --- a/tools/breakingchanges/go.mod +++ b/tools/breakingchanges/go.mod @@ -3,3 +3,5 @@ module github.com/smartcontractkit/chainlink-testing-framework/tools/breakingcha go 1.22.6 require golang.org/x/sync v0.8.0 + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/citool/go.mod b/tools/citool/go.mod index dbbacd7b6..fe1356702 100644 --- a/tools/citool/go.mod +++ b/tools/citool/go.mod @@ -15,3 +15,5 @@ require ( github.com/spf13/pflag v1.0.5 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/ecrimagefetcher/go.mod b/tools/ecrimagefetcher/go.mod index 3cacef377..910a6e43c 100644 --- a/tools/ecrimagefetcher/go.mod +++ b/tools/ecrimagefetcher/go.mod @@ -14,3 +14,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/envresolve/go.mod b/tools/envresolve/go.mod index 25c7f09d2..43585a525 100644 --- a/tools/envresolve/go.mod +++ b/tools/envresolve/go.mod @@ -11,3 +11,5 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/ghlatestreleasechecker/go.mod b/tools/ghlatestreleasechecker/go.mod index fda30fd59..36768e4d2 100644 --- a/tools/ghlatestreleasechecker/go.mod +++ b/tools/ghlatestreleasechecker/go.mod @@ -9,3 +9,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/ghsecrets/go.mod b/tools/ghsecrets/go.mod index 5ec6070c6..665c36a85 100644 --- a/tools/ghsecrets/go.mod +++ b/tools/ghsecrets/go.mod @@ -8,3 +8,5 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/gotestloghelper/go.mod b/tools/gotestloghelper/go.mod index e44eb12f3..ec66397b2 100644 --- a/tools/gotestloghelper/go.mod +++ b/tools/gotestloghelper/go.mod @@ -13,3 +13,5 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/testlistgenerator/go.mod b/tools/testlistgenerator/go.mod index 45eada1c2..c7a96a595 100644 --- a/tools/testlistgenerator/go.mod +++ b/tools/testlistgenerator/go.mod @@ -14,3 +14,5 @@ require ( github.com/spf13/pflag v1.0.5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/tools/workflowresultparser/go.mod b/tools/workflowresultparser/go.mod index 50d2d9ae4..fb0f1e29c 100644 --- a/tools/workflowresultparser/go.mod +++ b/tools/workflowresultparser/go.mod @@ -9,3 +9,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release] diff --git a/wasp/go.mod b/wasp/go.mod index 8e8ec0ce2..621f71f18 100644 --- a/wasp/go.mod +++ b/wasp/go.mod @@ -210,3 +210,5 @@ require ( go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect golang.org/x/arch v0.4.0 // indirect ) + +retract [v1.999.0-test-release, v1.999.999-test-release]