Repository navigation
feat(updates): urbex updates lists newer images of the applications from published images - #119
Merged
Merged
Conversation
…rom published images Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
stefanoghinelli
approved these changes
Nov 18, 2026
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The first part of #113:
urbex updates [<env>].internal/imageref/tags.go(new):Resolver.Tags: an image's tags from the registry'stags/list, following its pages, with the anonymous token flowResolvealready 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 samev, the same suffix. So1.29is compared with1.30and2.0, never with1.30.1,1.30-alpineorlatest, and the tag stays as precise asurbex.yamlasks.internal/provision/updates.go(new):Updateschecks, 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, whatdeploy --updatewould 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".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 thecliskill'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 --updateand--allow-major.Tests I ran
go test ./...,mise run lint: pass.Resolver.TagsandNeweragainst real registries (a throwaway test, removed after):postgres(Docker Hub, 1469 tags over several pages):17.6→ minor17.12, major18.7;valkey/valkey:8→ major9;codeberg.org/forgejo/forgejo:15.0.11→ major17.0.1;ghcr.io/urbforge/urbex-op: 3 tags, nothing newer for0.1.0-rc.1.Checklist before review
Part of #113.
🤖 Generated with Claude Code
https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA