Skip to content

e2e: Add multi-version support to generator - #9933

Merged
thanethomson merged 20 commits into
mainfrom
thane/9928-multi-version-e2e
Dec 21, 2022
Merged

thanethomson merged 20 commits into
mainfrom
thane/9928-multi-version-e2e

Conversation

@thanethomson

@thanethomson thanethomson commented Dec 21, 2022 •

Copy link
Copy Markdown
Contributor

Closes #9928

This only adds a CI job for now that we can trigger manually via GitHub Actions. We can automate this once we've proven it works in CI. It seems to work locally.

It does, however, rely on the tendermint/e2e-node Docker images for the relevant versions you want to run being available locally or via Docker Hub.

This PR should be able to be automatically backported to v0.37, and #9935 manually backports this to v0.34.


PR checklist

  • Tests written/updated, or no tests needed
  • CHANGELOG_PENDING.md updated, or no changelog entry needed
  • Updated relevant documentation (docs/) and code comments, or no
    documentation updates needed

@thanethomson thanethomson added the S:backport-to-v0.37.x Tell mergify to backport the PR to v0.37.x label Dec 21, 2022
@thanethomson
thanethomson requested a review from a team December 21, 2022 01:36
matrix:
group: ['00', '01', '02', '03', '04']
runs-on: ubuntu-latest
timeout-minutes: 60

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That much?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sergio-mena sergio-mena Dec 21, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is minor, so if that's the value all over, I'd say let's leave it this way

Comment thread test/e2e/README.md Resolved
Comment thread test/e2e/README.md
Comment on lines +44 to +47
# Using "latest" will cause the generator to auto-detect the latest
# non-pre-release version tag in the current Git repository that is closest to
# the Tendermint version in this repository (as specified in
# ../../version/version.go).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it make sense to only consider the releases of the current git branch going backwards in time? (rather than all branches)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Forget about this comment. I've been doing some research and some small experiments and what I'm suggesting is probably too complex, along the lines of implementing git describe (example here)

Comment thread test/e2e/generator/generate.go Resolved
Comment thread test/e2e/generator/generate.go Resolved
Comment thread test/e2e/README.md Resolved

@sergio-mena sergio-mena left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent!

@thanethomson
thanethomson merged commit 188069b into main Dec 21, 2022
@thanethomson
thanethomson deleted the thane/9928-multi-version-e2e branch December 21, 2022 22:06
thanethomson added a commit that referenced this pull request Dec 21, 2022
…34) (#9935)

* e2e: Improve help for multi-version CLI param

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Rename multiversion to multiVersion

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Extract generator params into struct

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add support for more than 2 versions in multi-version tests

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add generator logic to extract latest release tag from Git repo

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Cater for "dev-" prefixes in tags

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add sophisticated weighted version parsing to generator

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add note to E2E readme about multi-version testing

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Expand on Docker image comment in readme

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Replace "HEAD" keyword with "local"

Also add the version weighting printout when generating a testnet for
informational purposes.

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Update readme to reflect "HEAD" -> "local" keyword change and expand on examples

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Clarify comment relating to Docker image versions

Signed-off-by: Thane Thomson <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sergio Mena <[email protected]>

* e2e: Skip invalid tags instead of erroring in generator

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add comment in version selection code

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Use error format specifier when returning wrapped error

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Sergio Mena <[email protected]>
mergify Bot pushed a commit that referenced this pull request Dec 21, 2022
* ci: Add missing group to manual E2E workflow

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Improve help for multi-version CLI param

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Rename multiversion to multiVersion

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Extract generator params into struct

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add support for more than 2 versions in multi-version tests

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add generator logic to extract latest release tag from Git repo

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Cater for "dev-" prefixes in tags

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add sophisticated weighted version parsing to generator

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add note to E2E readme about multi-version testing

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Expand on Docker image comment in readme

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Print node version weights when generating testnets

Signed-off-by: Thane Thomson <[email protected]>

* ci: Add manual E2E workflow to run multi-version tests

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Replace "HEAD" keyword with "local"

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Update readme to reflect "HEAD" -> "local" keyword change and expand on examples

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Clarify comment relating to Docker image versions

Signed-off-by: Thane Thomson <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sergio Mena <[email protected]>

* e2e: Skip invalid tags instead of erroring in generator

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add comment in version selection code

Signed-off-by: Thane Thomson <[email protected]>

* ci: Replace "HEAD" with "local" keyword in multiversion workflow

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Use error format specifier when returning wrapped error

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Sergio Mena <[email protected]>
(cherry picked from commit 188069b)

# Conflicts:
#	go.mod
#	go.sum
adrianbrink pushed a commit to heliaxdev/tendermint that referenced this pull request May 23, 2023
#220)

* e2e: Add multi-version support to generator (tendermint#9933)

* ci: Add missing group to manual E2E workflow

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Improve help for multi-version CLI param

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Rename multiversion to multiVersion

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Extract generator params into struct

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add support for more than 2 versions in multi-version tests

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add generator logic to extract latest release tag from Git repo

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Cater for "dev-" prefixes in tags

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add sophisticated weighted version parsing to generator

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add note to E2E readme about multi-version testing

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Expand on Docker image comment in readme

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Print node version weights when generating testnets

Signed-off-by: Thane Thomson <[email protected]>

* ci: Add manual E2E workflow to run multi-version tests

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Replace "HEAD" keyword with "local"

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Update readme to reflect "HEAD" -> "local" keyword change and expand on examples

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Clarify comment relating to Docker image versions

Signed-off-by: Thane Thomson <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sergio Mena <[email protected]>

* e2e: Skip invalid tags instead of erroring in generator

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Add comment in version selection code

Signed-off-by: Thane Thomson <[email protected]>

* ci: Replace "HEAD" with "local" keyword in multiversion workflow

Signed-off-by: Thane Thomson <[email protected]>

* e2e: Use error format specifier when returning wrapped error

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Sergio Mena <[email protected]>
(cherry picked from commit 188069b)

# Conflicts:
#	go.mod
#	go.sum

* Resolve conflicts

Signed-off-by: Thane Thomson <[email protected]>

* Applied renaming to README

* Apply suggestions from code review

Co-authored-by: Thane Thomson <[email protected]>

---------

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Thane Thomson <[email protected]>
@moul moul mentioned this pull request Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S:backport-to-v0.37.x Tell mergify to backport the PR to v0.37.x

Projects

Status: Done/Merged

Development

Successfully merging this pull request may close these issues.

e2e: Enable multi-version testing in nightly QA and for releases

2 participants