Skip to content

fix: add version string checking#2314

Merged
JeffreyDallas merged 14 commits intomainfrom
02310-D-check-semantic-version
Jul 25, 2025
Merged

fix: add version string checking#2314
JeffreyDallas merged 14 commits intomainfrom
02310-D-check-semantic-version

Conversation

@JeffreyDallas
Copy link
Copy Markdown
Contributor

@JeffreyDallas JeffreyDallas commented Jul 21, 2025

Description

This pull request changes the following:

  • Check for releaseTag version
  • Show user message instead of throw error if cluster-ref connect is called twice

Related Issues

Pull request (PR) checklist

  • This PR added tests (unit, integration, and/or end-to-end)
  • This PR updated documentation
  • This PR added no TODOs or commented out code
  • This PR has no breaking changes
  • Any technical debt has been documented as a separate issue and linked to this PR
  • Any package.json changes have been explained to and approved by a repository manager
  • All related issues have been linked to this PR
  • All changes in this PR are included in the description
  • When this PR merges the commits will be squashed and the title will be used as the commit message, the 'commit message guidelines' below have been followed

Testing

  • This PR added unit tests
  • This PR added integration/end-to-end tests
  • These changes required manual testing that is documented below
  • Anything not tested is documented

The following manual testing was done:

  • TBD

The following was not tested:

  • TBD
Commit message guidelines We use 'Conventional Commits' to ensure that our commit messages are easy to read, follow a consistent format, and for automated release note generation. Please follow the guidelines below when writing your commit messages:
  1. BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type. NOTE: currently breaking changes will only bump the MAJOR version.
  2. The title is prefixed with one of the following:
Prefix Description Semantic Version Update Captured in Release Notes
feat: a new feature MINOR Yes
fix: a bug fix PATCH Yes
perf: performance PATCH Yes
refactor: code change that isn't feature or fix none No
test: adding missing tests none No
docs: changes to documentation none Yes
build: changes to build process none No
ci: changes to CI configuration none No
style: formatting, missing semi-colons, etc none No
chore: updating grunt tasks etc; no production code change none No

Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
@JeffreyDallas JeffreyDallas requested a review from a team as a code owner July 21, 2025 08:25
@JeffreyDallas JeffreyDallas requested review from Copilot, jan-milenkov and nathanklick and removed request for jan-milenkov and nathanklick July 21, 2025 08:25
@JeffreyDallas JeffreyDallas self-assigned this Jul 21, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds version string validation to ensure release tags are valid semantic versions. The changes focus on improving input validation and error handling for version strings used in the deployment process.

  • Adds semver validation for release tags to prevent invalid version strings from being processed
  • Automatically prefixes version strings with 'v' if not already present
  • Includes a minor code style fix for quote consistency

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/commands/relay.ts Minor quote style fix from backticks to single quotes
src/commands/node/tasks.ts Adds version validation and automatic 'v' prefix for release tags
src/commands/node/configs.ts Adds semver validation check for release tags

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 21, 2025

Unit Test Results - Linux

32 tests  ±0   32 ✅ ±0   0s ⏱️ ±0s
16 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit fc7e0fe. ± Comparison against base commit 1e4484e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 21, 2025

Unit Test Results - Windows

  1 files  ±0  175 suites  ±0   2s ⏱️ ±0s
492 tests ±0  492 ✅ ±0  0 💤 ±0  0 ❌ ±0 
496 runs  ±0  496 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fc7e0fe. ± Comparison against base commit 1e4484e.

♻️ This comment has been updated with latest results.

@JeffreyDallas JeffreyDallas changed the title fix add version string checking fix: add version string checking Jul 21, 2025
JeffreyDallas and others added 6 commits July 21, 2025 03:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: JeffreyDallas <39912573+JeffreyDallas@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: JeffreyDallas <39912573+JeffreyDallas@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: JeffreyDallas <39912573+JeffreyDallas@users.noreply.github.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
@github-actions
Copy link
Copy Markdown
Contributor

E2E Test Report

 19 files  ±0  135 suites  ±0   1h 54m 43s ⏱️ + 1m 41s
360 tests  - 1  360 ✅  - 1  0 💤 ±0  0 ❌ ±0 
373 runs   - 1  373 ✅  - 1  0 💤 ±0  0 ❌ ±0 

Results for commit b8026a3. ± Comparison against base commit dac31bb.

This pull request removes 1 test.
cluster-ref connect should fail with cluster ref that already exists ‑ ClusterCommand cluster-ref connect should fail with cluster ref that already exists

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 21, 2025

E2E Test Report

 20 files  + 1  138 suites  +5   2h 9m 32s ⏱️ - 7m 24s
377 tests +13  377 ✅ +14  0 💤 ±0  0 ❌  - 1 
390 runs  +13  390 ✅ +14  0 💤 ±0  0 ❌  - 1 

Results for commit fc7e0fe. ± Comparison against base commit 1e4484e.

This pull request removes 1 and adds 14 tests. Note that renamed tests count towards both.
cluster-ref connect should fail with cluster ref that already exists ‑ ClusterCommand cluster-ref connect should fail with cluster ref that already exists
Enable Envoy proxy port forwarding and create client from network config should succeed ‑ E2E Test Suite for 'account-cmd-e2e' account-cmd-e2e AccountCommand Test SDK create account and submit transaction Enable Envoy proxy port forwarding and create client from network config should succeed
Should be able to use the getSingleBlock Method to validate block node connectivity ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should be able to use the getSingleBlock Method to validate block node connectivity
Should fail with versions less than v0.62.3 ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should fail with versions less than v0.62.3
Should succeed deploying block node with 'add' command ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should succeed deploying block node with 'add' command
Should succeed with removing block node with 'destroy' command ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand Should succeed with removing block node with 'destroy' command
generate key files ‑ E2E Test Suite for 'block-node-cmd-e2e' Bootstrap network for test [release v0.62.3] generate key files
node log command should work ‑ E2E Test Suite for 'block-node-cmd-e2e' block-node-cmd-e2e BlockNodeCommand node log command should work
should cleanup previous deployment ‑ E2E Test Suite for 'block-node-cmd-e2e' Bootstrap network for test [release v0.62.3] should cleanup previous deployment
should succeed with 'deployment add-cluster' ‑ E2E Test Suite for 'block-node-cmd-e2e' Bootstrap network for test [release v0.62.3] should succeed with 'deployment add-cluster'
should succeed with deployment create ‑ E2E Test Suite for 'block-node-cmd-e2e' Bootstrap network for test [release v0.62.3] should succeed with deployment create
…

♻️ This comment has been updated with latest results.

@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Jul 21, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+1.29% (target: -1.00%) 79.38%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1e4484e) 40861 34202 83.70%
Head commit (fc7e0fe) 40938 (+77) 34796 (+594) 85.00% (+1.29%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2314) 97 77 79.38%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Copy link
Copy Markdown
Contributor

@jeromy-cannon jeromy-cannon left a comment

Choose a reason for hiding this comment

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

we need to ensure that anytime a version is passed in by the user, that we either add or remove the 'v' as needed based on whether it is needed for a helm chart, image, or consensus node version.

I only see the CN version check. But, I expected to see a check for passing in the helm chart versions or docker image as well

@jeromy-cannon jeromy-cannon added the PR: Unresolved Comments A pull request where there are comments and they need to be resolved. label Jul 21, 2025
JeffreyDallas and others added 4 commits July 21, 2025 23:12
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
@JeffreyDallas JeffreyDallas added PR: Needs Team Approval A pull request that needs review from a team member. and removed PR: Unresolved Comments A pull request where there are comments and they need to be resolved. labels Jul 22, 2025
jan-milenkov
jan-milenkov previously approved these changes Jul 22, 2025
@jan-milenkov jan-milenkov added PR: Needs Manager Approval A pull request that needs review from a manager. and removed PR: Needs Team Approval A pull request that needs review from a team member. labels Jul 22, 2025
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
@JeffreyDallas JeffreyDallas requested a review from a team as a code owner July 24, 2025 13:50
@JeffreyDallas JeffreyDallas added the PR: Needs Team Approval A pull request that needs review from a team member. label Jul 24, 2025
@jeromy-cannon jeromy-cannon added PR: Ready to Merge A pull request that is ready to merge. and removed PR: Needs Team Approval A pull request that needs review from a team member. PR: Needs Manager Approval A pull request that needs review from a manager. labels Jul 24, 2025
@JeffreyDallas JeffreyDallas merged commit d790ca0 into main Jul 25, 2025
71 of 72 checks passed
@JeffreyDallas JeffreyDallas deleted the 02310-D-check-semantic-version branch July 25, 2025 03:23
swirlds-automation added a commit that referenced this pull request Aug 11, 2025
## [0.42.0](v0.41.0...v0.42.0) (2025-08-11)

### Features

* add flag to private key ([#2356](#2356)) ([dc9c1d7](dc9c1d7))
* **cli:** implement solo quick start single destroy ([#2424](#2424)) ([5979db5](5979db5))
* create accounts with predefined keys on quick-start ([#2303](#2303)) ([0d5a0b0](0d5a0b0))
* helm dependency manager prefers global installation ([#2308](#2308)) ([9768ae0](9768ae0))
* update command flags and ECDSA key documents ([#2417](#2417)) ([246df6f](246df6f))
* updated smoke test help to debug intermittent failure ([#2420](#2420)) ([12a96b4](12a96b4))

### Bug Fixes

* add support for latest version of block node v0.15.0 ([#2391](#2391)) ([66d9f90](66d9f90))
* add version string checking ([#2314](#2314)) ([d790ca0](d790ca0))
* address issues for solo node add/update/delete when using separate subcommands ([#2398](#2398)) ([b1ea909](b1ea909))
* bump CN to v0.63.9, MN to v0.134, Relay to v0.69.3, BN to v0.14.0, Solo chart to v0.54.5 ([#2322](#2322)) ([e12938f](e12938f))
* bump explorer to v25.1.1 ([#2403](#2403)) ([bfae543](bfae543))
* bump relay version and fix some tests ([#2385](#2385)) ([c2f4bab](c2f4bab))
* correct service name in port-forward command for Mirror Node REST Java API ([#2396](#2396)) ([6847713](6847713))
* do not assign mask value to default value for data sensitive flags ([#2401](#2401)) ([ce96ad9](ce96ad9))
* handle optional adminKey flag safely in context configuration ([#2365](#2365)) ([8b20668](8b20668))
* remove logs of 'argv' and 'context.config' ([#2378](#2378)) ([a4d4e36](a4d4e36))
* remove unnecessary node logs from migration test workflow ([#2400](#2400)) ([43a53fc](43a53fc))
* solo quick-start single deploy failure during network setup ([#2369](#2369)) ([2f12c17](2f12c17))
* update post freeze CN source directory for application.properties ([#2397](#2397)) ([9752f9d](9752f9d))
@swirlds-automation
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Ready to Merge A pull request that is ready to merge. released

Projects

None yet

5 participants