Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git tag validation #4552

Merged
merged 2 commits into from
Jul 28, 2023
Merged

Git tag validation #4552

merged 2 commits into from
Jul 28, 2023

Conversation

janezpodhostnik
Copy link
Contributor

@janezpodhostnik janezpodhostnik commented Jul 12, 2023

closes: #4414

This PR makes it mandatory that the git tags pushed to this repository are in semver format, with an optinal "(.+/)*v" prefix. meaning that these are all valid: crypto/v0.24.5-fvm, tools/flaky_test_monitor/v0.23.5, v0.23.5, 0.23.5-fvm

Changes:

  • CI that checks the tag on git push. This doesn't prevent pushing or using incorrect tags, but it does notify the user (through a failed github action) that something isn't ok
  • Nodes will fail to startup if they have a version that cannot be parsed (is a semver with an optional "v" prefix)
  • integration tests CI have git clone with fetch-depth: 0 this is so that all tags are fetched, so that the version is detected correctly.
  • some renaming to make the code clearer.

@janezpodhostnik janezpodhostnik added the Execution Cadence Execution Team label Jul 12, 2023
@janezpodhostnik janezpodhostnik self-assigned this Jul 12, 2023
@janezpodhostnik janezpodhostnik force-pushed the janez/git-tag-validation branch 2 times, most recently from a581224 to db9b4e1 Compare July 12, 2023 16:21
@janezpodhostnik
Copy link
Contributor Author

bors merge

bors bot added a commit that referenced this pull request Jul 28, 2023
4552: Git tag validation r=janezpodhostnik a=janezpodhostnik

closes: #4414 

This PR makes it mandatory that the git tags pushed to this repository are in semver format, with an optinal "(.+\/)*v" prefix. meaning that these are all valid: crypto/v0.24.5-fvm, tools/flaky_test_monitor/v0.23.5, v0.23.5, 0.23.5-fvm

Changes:
- CI that checks the tag on git push. This doesn't prevent pushing or using incorrect tags, but it does notify the user (through a failed github action) that something isn't ok
- Nodes will fail to startup if they have a version that cannot be parsed (is a semver with an optional "v" prefix)
- integration tests CI have git clone with `fetch-depth: 0` this is so that all tags are fetched, so that the version is detected correctly.
- some renaming to make the code clearer.

Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jul 28, 2023

@janezpodhostnik
Copy link
Contributor Author

bors merge

bors bot added a commit that referenced this pull request Jul 28, 2023
4552: Git tag validation r=janezpodhostnik a=janezpodhostnik

closes: #4414 

This PR makes it mandatory that the git tags pushed to this repository are in semver format, with an optinal "(.+\/)*v" prefix. meaning that these are all valid: crypto/v0.24.5-fvm, tools/flaky_test_monitor/v0.23.5, v0.23.5, 0.23.5-fvm

Changes:
- CI that checks the tag on git push. This doesn't prevent pushing or using incorrect tags, but it does notify the user (through a failed github action) that something isn't ok
- Nodes will fail to startup if they have a version that cannot be parsed (is a semver with an optional "v" prefix)
- integration tests CI have git clone with `fetch-depth: 0` this is so that all tags are fetched, so that the version is detected correctly.
- some renaming to make the code clearer.

Co-authored-by: Janez Podhostnik <janez.podhostnik@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jul 28, 2023

Build failed:

@janezpodhostnik
Copy link
Contributor Author

bors merge

@bors bors bot merged commit 115432e into master Jul 28, 2023
32 of 33 checks passed
@bors bors bot deleted the janez/git-tag-validation branch July 28, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Execution Cadence Execution Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add safeguards to ensure Node Version is always a "v" + a semver compliant version
3 participants