Skip to content

Fix manager pinned update source migration#41

Merged
Ryson-32 merged 1 commit into
mainfrom
ryan/dev
Jun 24, 2026
Merged

Fix manager pinned update source migration#41
Ryson-32 merged 1 commit into
mainfrom
ryan/dev

Conversation

@Ryson-32

Copy link
Copy Markdown
Contributor

Summary

  • migrate old official fixed-tag update sources to the stable latest manifest when running the manager update command
  • keep custom, dev, file, and non-official update sources unchanged
  • cover the migration with a shell-level update test

Validation

  • bash -n public/local/scripts/subboost.sh
  • npm --prefix public exec vitest run local/scripts/selfhost-shell.test.ts
  • npm --prefix public run lint
  • npm --prefix public run test:unit

@Ryson-32
Ryson-32 merged commit be25918 into main Jun 24, 2026
9 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 473a0c2cf3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread local/scripts/subboost.sh

is_official_fixed_release_url() {
case "$1" in
https://github.com/SubBoost/subboost/releases/download/v[0-9]*.[0-9]*.[0-9]*/release.json) return 0 ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Constrain migration to exact stable tags

For installations intentionally pinned to an official prerelease asset such as https://github.com/SubBoost/subboost/releases/download/v2.6.0-beta.1/release.json, this shell glob still matches because [0-9]* means “a digit followed by arbitrary characters,” not “digits only.” update_cmd then rewrites SUBBOOST_RELEASE_URL to the stable latest manifest before fetching, unexpectedly moving prerelease users off their selected channel instead of only migrating old fixed stable tags.

Useful? React with 👍 / 👎.

Comment thread local/scripts/subboost.sh
local release_file="$TMP_DIR/release.json"
local image compose_url manager_url
mkdir -p "$TMP_DIR"
if migrate_update_release_url "$release_url"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid masking migration write failures

When an old fixed official URL is detected but .env cannot be rewritten (for example because sudo is unavailable or permissions changed), invoking the side-effecting migration from an if condition suppresses errexit inside that function, so a failed write_runtime_env_value just makes the condition false and update_cmd continues with the old pinned URL after printing the migration message. This can leave the installation unmigrated instead of failing clearly at the point where the release source could not be saved.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant