Improve bumpUpstream: semver sort and Docker registry-based version format resolution#475
Open
Improve bumpUpstream: semver sort and Docker registry-based version format resolution#475
Conversation
|
Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 34066e3 This is a development version and should only be installed for testing purposes.
Hash: (by dappnodebot/build-action) |
Marketen
requested changes
Mar 6, 2026
| return release.data.id; | ||
| } | ||
|
|
||
| async uploadReleaseAssets({ |
| owner: this.owner, | ||
| repo: this.repo, | ||
| release_id: releaseId, | ||
| data: fs.createReadStream(filepath) as any, |
Comment on lines
+15
to
+17
| "pre-commit": "npm run lint && npm run test", | ||
| "cli": "node dist/dappnodesdk.js", | ||
| "start": "yarn cli" |
Contributor
There was a problem hiding this comment.
what are these changes for? are you sure these are needed?
Comment on lines
+134
to
+174
| ## VSCode debugging | ||
|
|
||
| The DappNode SDK can be run and debugged in VSCode. | ||
| This run configurations can be configured via de `.vscode/launch.json` | ||
|
|
||
| Example `launh.json` | ||
| ```json | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Run dappnodesdk", | ||
| "runtimeExecutable": "yarn", | ||
| "runtimeArgs": [ | ||
| "start", | ||
| "github-action", | ||
| "bump-upstream", | ||
| "--dir", | ||
| "${workspaceFolder}/../dummy", // Path to the DappNode package | ||
| "--skip_build" | ||
| ], | ||
| "cwd": "${workspaceFolder}", | ||
| "env": { | ||
| "GITHUB_TOKEN": "ghp_XXX", // Your github API key | ||
| "SKIP_COMMIT": "true" | ||
| }, | ||
| "skipFiles": [ | ||
| "<node_internals>/**" | ||
| ], | ||
| "preLaunchTask": "tsc: build - tsconfig.json", | ||
| "outFiles": [ | ||
| "${workspaceFolder}/dist/**/*.js" | ||
| ], | ||
| "console": "integratedTerminal" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
Contributor
There was a problem hiding this comment.
I dont think this should go into this PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the
bump-upstreamGitHub Action to correctly handle upstream repos that use non-standard version tag formats (e.g.,n8n@2.10.3,v1.2.3) and ensures the version written to the manifest and docker-compose matches what the Docker image registry actually expects.Changes
releases[0]), releases are now filtered (no drafts, prereleases, or RCs) and sorted by semver to always pick the highest valid version.isValidReleasenow strips prefixes before semver validation, so tags liken8n@2.10.3are correctly recognized as valid releases instead of triggering false warnings.resolveVersionFormat.ts): New helper that determines the correct version format by:v1.17.1for geth,0.17.7for ollama,2.10.3for n8n)per_pageto 100 for GitHub releases API to ensure we don't miss the latest valid release.cli/startnpm scripts.Problem
Different upstream projects use different conventions:
v1.17.1(geth)v1.17.1v0.17.7(ollama)0.17.7vn8n@2.10.3(n8n)2.10.3n8n@Previously, the raw GitHub tag was always used, which could cause mismatches with Docker image tags, or the sort order could pick the wrong release.
Test plan
vprefix kept — Docker tag usesv)vprefix stripped — Docker tag has nov)n8n@prefix stripped — Docker tag is bare semver)isValidReleaseno longer warns forn8n@X.Y.Zstyle tags