Skip to content

Offer no update to development builds - #2349

Merged
nadaverell merged 1 commit into
mainfrom
fix/no-update-notice-dev-builds
Oct 27, 2026
Merged

nadaverell merged 1 commit into
mainfrom
fix/no-update-notice-dev-builds

Conversation

@nadaverell

@nadaverell nadaverell commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Local builds of Radar showed the "Update Available" popup on every page: a build of a commit past a release tag (v1.18.2-22-ga0694c7fa, or one with -dirty) parses as a semver prerelease of that tag, so the automatic update check always found the tag newer. It also covers screenshots taken from local builds.

Development builds that look up releases (git-describe, dirty and commit-hash versions, as buildChannel classifies them) now get the latest release's version with updateAvailable: false from the automatic check. A plain dev build still skips the automatic lookup, as before. The manual check already behaved this way. Released and prerelease builds are unchanged.

Test: TestAutomaticCheckOffersNoUpdateToDevelopmentBuilds covers git-describe, dirty and git-describe+dirty versions against a v1.18.2 release, plus a release one behind, which still gets the update. It fails on the previous code.

A build of a commit past a release tag (v1.18.2-22-gabc, or a dirty tree)
parses as a prerelease of that tag, so the automatic check always found the
tag newer and showed Update Available on every local build. Development
builds now get the latest release's version without an update, as the
manual check already did.
@nadaverell
nadaverell requested a review from hisco as a code owner October 26, 2026 23:29
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Prevent update notices on development builds

🐞 Bug fix 🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Prevent automatic checks from offering a release as an update to development builds.
• Preserve the latest release details while leaving stable and prerelease comparisons unchanged.
• Test git-describe and dirty builds, plus a stable release that should still receive an update.
Diagram

graph TD
  A["Automatic check"] --> B{"Development build?"} -->|Yes, release-only| C["Release lookup"] --> D{"Development build?"} -->|Yes| E["Latest, no update"]
  B -->|No| C
  D -->|No| F["Semver comparison"]
Loading
High-Level Assessment

The focused change reuses the existing development-build classification and manual-check behavior. Skipping the release lookup entirely would lose the latest-release details, so the current approach is preferable.

Files changed (2) +34 / -1

Bug fix (1) +3 / -1
version.goSuppress automatic update offers for development builds +3/-1

Suppress automatic update offers for development builds

• Applies the existing development-build handling to automatic as well as manual lookups. It still returns release details and validates the latest version, but does not mark an update available for development builds.

internal/version/version.go

Tests (1) +31 / -0
version_test.goCover automatic checks for development and stable builds +31/-0

Cover automatic checks for development and stable builds

• Adds a regression test showing that git-describe and dirty builds receive the latest release version without an update offer. It also confirms that a stable release one version behind still receives an update offer.

internal/version/version_test.go

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Plain dev builds still get no release info 🐞 Bug ≡ Correctness
Description
The fetchLatestRelease guard !options.manual && (IsDisabled() || Current == "dev") returns
before any lookup. IsDevelopmentBuild() now covers dev, but the new branch is unreachable for
automatic checks when Current == "dev", so the PR's claim that all development builds get the
latest version is not true for dev.
Code

internal/version/version.go[373]

+	if IsDevelopmentBuild() {
Evidence
The early return at version.go:296 precedes the changed block, and the new test omits "dev".
Manual-path tests cover "dev", but automatic ones do not.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Automatic checks with Current=="dev" return early in fetchLatestRelease, so they never get LatestVersion, unlike other development builds after this PR.
## Fix Focus Areas
- internal/version/version.go[294-298]
- internal/version/version_test.go[826-856]
## Recommended Fix
Remove `|| Current == "dev"` from the early-return guard (the development branch already prevents UpdateAvail), or explicitly document that dev is exempt. Add "dev" to the new test.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread internal/version/version.go
@nadaverell
nadaverell merged commit a8517be into main Oct 27, 2026
10 of 11 checks passed
@nadaverell
nadaverell deleted the fix/no-update-notice-dev-builds branch October 27, 2026 00:10
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