Skip to content

List available updates#160

Open
DireMunchkin wants to merge 3 commits into
runtipi:developfrom
DireMunchkin:list-available-updates
Open

List available updates#160
DireMunchkin wants to merge 3 commits into
runtipi:developfrom
DireMunchkin:list-available-updates

Conversation

@DireMunchkin

@DireMunchkin DireMunchkin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes runtipi/runtipi#2490

Summary by CodeRabbit

New Features

  • Added an available-updates subcommand under the app command to show which installed apps have updates available.
  • Results are presented in a table with current vs latest TIPI and Docker versions; when nothing is available, it shows an “All apps are up to date” message.

Bug Fixes

  • Improved resilience of the update listing by providing clearer error output when API calls fail or returned data can’t be processed.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@DireMunchkin, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 33 minutes and 42 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 92278103-cdf0-418a-9837-ce9666b36ff4

📥 Commits

Reviewing files that changed from the base of the PR and between fd99a08 and 8adcd19.

📒 Files selected for processing (3)
  • cmd/runtipi/main.go
  • internal/commands/app.go
  • internal/types/args.go

Walkthrough

Adds a new available-updates CLI subcommand under the app command. The subcommand queries the apps/installed API endpoint, parses the JSON response, and prints a table of apps where the installed version differs from the latest version. Also changes the observer queue in ListenForMessage to be declared as exclusive.

Changes

available-updates subcommand

Layer / File(s) Summary
AppCommand constant and CLI subcommand registration
internal/types/args.go, cmd/runtipi/main.go
Adds AppCommandAvailableUpdates = "available-updates" constant, defines the Cobra appAvailableUpdatesCmd subcommand that sets the command and calls RunApp, and registers it with appCmd.
RunApp available-updates implementation
internal/commands/app.go
New response DTOs for the installed-apps API (InstalledAppsResponse, InstalledApp, AppInfo, AppDetails, AppMetadata), switch case in RunApp: GETs /apps/installed, validates the HTTP status, unmarshals the JSON response, filters apps where app.App.Version < app.Metadata.LatestVersion, and prints either an all-up-to-date message or a formatted table with App, Docker Version, Latest Docker, Tipi Version, and Latest Tipi columns.

Observer Queue Exclusive Flag Fix

Layer / File(s) Summary
Queue declared as exclusive
internal/utils/queue.go
Sets exclusive=true in QueueDeclare for the observer queue in ListenForMessage and adds inline comments documenting each boolean flag.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • runtipi/cli#111: Introduced the unified RunApp app-command dispatcher in internal/commands/app.go that this PR extends with the available-updates case.
  • runtipi/cli#120: Adds other app subcommands (backup/restore/list/delete) via the same CLI registration pattern in cmd/runtipi/main.go and RunApp switch-case structure.
  • runtipi/cli#159: Modifies the same ListenForMessage queue declaration in internal/utils/queue.go by changing exclusive to true.

Suggested labels

size/L

Suggested reviewers

  • nicotsx
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The queue.go changes appear out of scope; changing exclusive queue settings is unrelated to the available updates feature. Review the queue.go changes and remove them if unrelated to the available updates feature, or clarify their necessity in the PR description.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'List available updates' accurately and concisely describes the main change in the pull request.
Linked Issues check ✅ Passed The PR implements a CLI command to list available app updates with app names and version details as requested in issue #2490.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DireMunchkin DireMunchkin marked this pull request as draft June 23, 2026 08:43
@DireMunchkin DireMunchkin marked this pull request as ready for review June 23, 2026 15:57
@DireMunchkin

Copy link
Copy Markdown
Contributor Author

Here is an example of the output when there is an update:

Screenshot from 2026-06-23 17-56-52

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/commands/app.go`:
- Around line 159-166: The condition at line 159 checking only `app.App.Version
< app.Metadata.LatestVersion` fails to detect updates when the Tipi version is
unchanged but a newer Docker image version is available. Modify the if condition
to also check whether the current Docker version (app.Info.Version) differs from
the latest available Docker version (app.Metadata.LatestDockerVersion). Use a
logical OR operator to ensure the appUpdate struct gets populated whenever
either the Tipi version or the Docker version has a newer release available.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d50a40e6-906a-4bc8-bac1-35cd5dd11cf3

📥 Commits

Reviewing files that changed from the base of the PR and between f1597a8 and fd99a08.

📒 Files selected for processing (1)
  • internal/commands/app.go

Comment thread internal/commands/app.go
@DireMunchkin DireMunchkin force-pushed the list-available-updates branch from fd99a08 to 8adcd19 Compare June 23, 2026 16:24
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.

[REQUEST] CLI check if an update is available for an app

1 participant