Skip to content

e2e: Add multi-version support to generator#9933

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

e2e: Add multi-version support to generator#9933
thanethomson merged 20 commits intomainfrom
thane/9928-multi-version-e2e

Conversation

@thanethomson
Copy link
Contributor

@thanethomson thanethomson commented Dec 21, 2022

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@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
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
Contributor Author

Choose a reason for hiding this comment

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

This is the same as in https://github.com/tendermint/tendermint/blob/main/.github/workflows/e2e-manual.yml (from which I derived this new workflow). It's also the same as in the nightlies: https://github.com/tendermint/tendermint/blob/main/.github/workflows/e2e-nightly-main.yml#L21

If we should change it, we should probably change it uniformly across all those workflows.

Copy link
Contributor

@sergio-mena sergio-mena Dec 21, 2022

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 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
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
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)

Signed-off-by: Thane Thomson <connect@thanethomson.com>
…pand on examples

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
thanethomson and others added 2 commits December 21, 2022 16:35
Co-authored-by: Sergio Mena <sergio@informal.systems>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Copy link
Contributor

@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

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

Excellent!

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@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 <connect@thanethomson.com>

* e2e: Rename multiversion to multiVersion

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Extract generator params into struct

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Add sophisticated weighted version parsing to generator

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Expand on Docker image comment in readme

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Clarify comment relating to Docker image versions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Apply suggestions from code review

Co-authored-by: Sergio Mena <sergio@informal.systems>

* e2e: Skip invalid tags instead of erroring in generator

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Add comment in version selection code

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Use error format specifier when returning wrapped error

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Sergio Mena <sergio@informal.systems>
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 <connect@thanethomson.com>

* e2e: Improve help for multi-version CLI param

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Rename multiversion to multiVersion

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Extract generator params into struct

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Add sophisticated weighted version parsing to generator

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Expand on Docker image comment in readme

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Print node version weights when generating testnets

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Clarify comment relating to Docker image versions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Apply suggestions from code review

Co-authored-by: Sergio Mena <sergio@informal.systems>

* e2e: Skip invalid tags instead of erroring in generator

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Add comment in version selection code

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Use error format specifier when returning wrapped error

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Sergio Mena <sergio@informal.systems>
(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 <connect@thanethomson.com>

* e2e: Improve help for multi-version CLI param

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Rename multiversion to multiVersion

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Extract generator params into struct

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Add sophisticated weighted version parsing to generator

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Expand on Docker image comment in readme

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Print node version weights when generating testnets

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Clarify comment relating to Docker image versions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Apply suggestions from code review

Co-authored-by: Sergio Mena <sergio@informal.systems>

* e2e: Skip invalid tags instead of erroring in generator

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Add comment in version selection code

Signed-off-by: Thane Thomson <connect@thanethomson.com>

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: Use error format specifier when returning wrapped error

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Sergio Mena <sergio@informal.systems>
(cherry picked from commit 188069b)

# Conflicts:
#	go.mod
#	go.sum

* Resolve conflicts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Applied renaming to README

* Apply suggestions from code review

Co-authored-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
@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