Skip to content

feat(updates): urbex updates lists newer images of the applications from published images - #119

Merged
Teg79 merged 1 commit into
mainfrom
feat/urbex-updates
Nov 18, 2026
Merged

Teg79 merged 1 commit into
mainfrom
feat/urbex-updates

Conversation

@Teg79

@Teg79 Teg79 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The first part of #113: urbex updates [<env>].

  • internal/imageref/tags.go (new):
    • Resolver.Tags: an image's tags from the registry's tags/list, following its pages, with the anonymous token flow Resolve already uses.
    • Newer(current, tags): the newest tag of the same major (Minor) and of a higher major (Major). Only tags of the same shape count: as many numbers, the same v, the same suffix. So 1.29 is compared with 1.30 and 2.0, never with 1.30.1, 1.30-alpine or latest, and the tag stays as precise as urbex.yaml asks.
  • internal/provision/updates.go (new): Updates checks, for each application from a published image applied in an environment (or both), what it runs, whether the asked tag now points to another image (newDigest, what deploy --update would move to), and the newer tags. It refreshes the GitOps repo and changes nothing.
  • internal/cli/updates.go (new): urbex updates [<env>] [--output json]. Each line says what to run: urbex deploy <env> --update, urbex deploy <env> --app <app> --version <tag>. A new major is listed, "read its release notes first; not proposed".
  • Tests: TestNewer (two images' tag sets: majors, suffixes, v, latest), TestTags_FollowsPages (fake registry with a token and two pages), TestUpdates (newer digest, minor and major, per environment, an app not in prod, nothing changed).

Companion docs: urbforge/urbex#92.

Still to do for #113 (next PR): the scheduled check on the platform that opens a pull request in the project's repo bumping urbex.yaml; notifications (#95); the platform's images listed as information. Also the cli skill's line for "what's newer?", with the plugin's next version.

Why

#113: 47% of self-hosters update by hand. Seeing what's newer is the first step; it reuses the same rules as deploy --update and --allow-major.

Tests I ran

  • go test ./..., mise run lint: pass.
  • Resolver.Tags and Newer against real registries (a throwaway test, removed after):
    • postgres (Docker Hub, 1469 tags over several pages): 17.6 → minor 17.12, major 18.7;
    • valkey/valkey: 8 → major 9;
    • codeberg.org/forgejo/forgejo: 15.0.11 → major 17.0.1;
    • ghcr.io/urbforge/urbex-op: 3 tags, nothing newer for 0.1.0-rc.1.
  • Not run: the command on the lab (no project with an image runs there right now), the e2e (no change to existing commands).

Checklist before review

Part of #113.

🤖 Generated with Claude Code

https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA

…rom published images

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
@Teg79 Teg79 mentioned this pull request Nov 17, 2026
2 tasks done
@Teg79
Teg79 marked this pull request as ready for review November 17, 2026 19:49
@Teg79
Teg79 merged commit 8b896b1 into main Nov 18, 2026
1 check passed
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