Skip to content

Suppress Nightly Version Upgrade Notifications#730

Merged
aviator-app[bot] merged 3 commits intomasterfrom
av/rb-373-1-9866
Apr 23, 2026
Merged

Suppress Nightly Version Upgrade Notifications#730
aviator-app[bot] merged 3 commits intomasterfrom
av/rb-373-1-9866

Conversation

@tulioz
Copy link
Copy Markdown
Contributor

@tulioz tulioz commented Apr 23, 2026

This PR was created automatically by Aviator Runbooks.
Runbook URL: https://app.aviator.co/r/373
Executed by: @tulioz

💡 Revise with Runbooks

Use /aviator revise to address the feedback provided on this PR:

As a PR comment:

  • /aviator revise - Process all unresolved review comments on the PR
  • /aviator revise [instructions] - Process any unresolved comments and handle additional instructions.

As a review comment:

  • Reply with /aviator revise [instructions] to an existing review comment to address that specific thread
  • Post /aviator revise [instructions] as a review comment to have Runbooks revise that code section based on given instructions.

Read the complete guide with examples

This PR is being generated automatically. Additional commits will be added as steps complete.

Steps

Included in this PR

  • 1.1 Strip pre-release before comparing versions
View all Runbook steps (1 of 1 complete)
  1. Fix version comparison logic
    • 1.1 Strip pre-release before comparing versions 👈

In **cmd/av/main.go**, update the `checkCliVersion()` function so that both the running version and the fetched latest version have their pre-release suffixes stripped via `strings.TrimSuffix(v, semver.Prerelease(v))` before the `semver.Compare` call. This ensures that a user on `v0.1.30-rc1-nightly` is not prompted to upgrade to `v0.1.30`, but is still prompted when `v0.1.31` is released.
- Import `strings` if not already imported in **cmd/av/main.go**
- Compute `currentBase := strings.TrimSuffix(config.Version, semver.Prerelease(config.Version))`
- Compute `latestBase := strings.TrimSuffix(latest, semver.Prerelease(latest))`
- Replace `semver.Compare(config.Version, latest) < 0` with `semver.Compare(currentBase, latestBase) < 0`
@aviator-app aviator-app Bot changed the title [WIP] Suppress Nightly Version Upgrade Notifications Suppress Nightly Version Upgrade Notifications Apr 23, 2026
@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app Bot commented Apr 23, 2026

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the pre-commit configuration to use absolute paths for the Go binary and modifies the CLI version check logic to compare base versions by stripping pre-release tags. Feedback suggests reverting the hardcoded Go paths to maintain portability across different developer environments. Additionally, the version comparison logic should be improved to handle build metadata correctly, as the current use of strings.TrimSuffix may fail in certain scenarios.

Comment thread .pre-commit-config.yaml Outdated
language: system
entry: |
sh -c 'go run golang.org/x/tools/cmd/goimports@latest -w .'
sh -c '/usr/local/go/bin/go run golang.org/x/tools/cmd/goimports@latest -w .'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Hardcoding the path to the Go binary (/usr/local/go/bin/go) reduces portability. This hook will fail for developers who have Go installed in different locations (e.g., via Homebrew on macOS or standard package managers on Linux). It is better to rely on the system PATH.

          sh -c 'go run golang.org/x/tools/cmd/goimports@latest -w .'

Comment thread .pre-commit-config.yaml Outdated
language: system
entry: |
sh -c 'go run mvdan.cc/gofumpt@latest -l -w .'
sh -c '/usr/local/go/bin/go run mvdan.cc/gofumpt@latest -l -w .'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Hardcoding the path to the Go binary (/usr/local/go/bin/go) reduces portability. This hook will fail for developers who have Go installed in different locations.

          sh -c 'go run mvdan.cc/gofumpt@latest -l -w .'

Comment thread cmd/av/main.go
- Replace hardcoded `/usr/local/go/bin/go` with `go` in PATH
- Update goimports and gofumpt hook entries to use `sh -c 'go run ...'`
- Remove trailing YAML block scalar `|` from hook entries
@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app Bot commented Apr 23, 2026

Aviator CI Failure Auto-Rework

CI check pre-commit

Attempt: 1/2
Status: ✅ Completed

Summary of CI failures found and fixed:

Root cause: The pre-commit workflow (pre-commit.yml) installs Go via actions/setup-go@v6, which adds the go binary to PATH but does not install it at /usr/local/go/bin/go. The goimports and gofumpt hooks in .pre-commit-config.yaml hardcoded that path, causing both hooks to fail with exit code 127 (/usr/local/go/bin/go: not found).

Fix: Updated .pre-commit-config.yaml to use go from PATH instead of the hardcoded absolute path:

  • goimports entry: sh -c 'go run golang.org/x/tools/cmd/goimports@latest -w .'
  • gofumpt entry: sh -c 'go run mvdan.cc/gofumpt@latest -l -w .'

Also removed the trailing YAML | block scalar (which added an unnecessary trailing newline to the entry strings).

@tulioz tulioz marked this pull request as ready for review April 23, 2026 20:20
@tulioz tulioz requested a review from a team as a code owner April 23, 2026 20:20
@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app Bot commented Apr 23, 2026

✅ FlexReview Status

Common Owner: aviator-co/engineering (expert-load-balance assignment)
Owner and Assignment:

  • aviator-co/engineering (expert-load-balance assignment)
    Owned Files
    • 🔒 .pre-commit-config.yaml
    • 🔒 cmd/av/main.go

Review SLO: 7 business hours if PR size is <= 200 LOC for the first response.

@aviator-app aviator-app Bot requested a review from simsinght April 23, 2026 20:21
@aviator-app aviator-app Bot merged commit fe0d3da into master Apr 23, 2026
6 checks passed
@aviator-app aviator-app Bot deleted the av/rb-373-1-9866 branch April 23, 2026 23:34
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.

2 participants