feat: add Latesttag location resolver for init-time tag discovery#83
feat: add Latesttag location resolver for init-time tag discovery#83redpanda-f merged 15 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Location::LatestTag config variant intended to be resolved at init time into a concrete GitTag, enabling “latest release tag on branch” discovery while keeping config.toml pinned/reproducible.
Changes:
- Introduces
latesttag:<branch>parsing inLocationand documents it in CLI help + README. - Adds an init-time resolver (
latest_resolver) that probes the remote with git to convertLatestTag→GitTag. - Updates status/version/init/build codepaths to recognize
LatestTag(generally treating it as an error/unresolved outside init-time resolution).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main_app/version.rs | Displays LatestTag as “unresolved” in version/location output. |
| src/config.rs | Adds Location::LatestTag and parsing support for latesttag:<branch>. |
| src/commands/status/git/repo_paths.rs | Treats LatestTag like other git-based sources for repo path resolution. |
| src/commands/status/git/formatters.rs | Formats LatestTag as unresolved + marks it not ready. |
| src/commands/init/repositories.rs | Errors if LatestTag reaches repository download step. |
| src/commands/init/mod.rs | Registers the new latest_resolver module. |
| src/commands/init/latest_resolver.rs | Implements git-based discovery to resolve newest merged tag on a branch. |
| src/commands/init/config.rs | Resolves LatestTag to GitTag during config generation. |
| src/commands/build/repository.rs | Errors if LatestTag reaches build-time repo preparation. |
| src/cli.rs | Updates CLI docs to include latesttag:<branch> for init/config. |
| README_ADVANCED.md | Documents latesttag:<branch> behavior and intent. |
src/commands/init/config.rs
Outdated
| // Resolve any dynamic variants (LatestTag) by querying the remote. | ||
| // The resolved concrete tag is stored in config.toml for reproducibility. | ||
| config.lotus = resolve_location(config.lotus)?; | ||
| config.curio = resolve_location(config.curio)?; | ||
| config.filecoin_services = resolve_location(config.filecoin_services)?; |
There was a problem hiding this comment.
LatestTag resolution only runs when generating a new config. If a config already exists (or is updated via foc-devnet config ...), LatestTag can remain in config.toml, but later init/build paths error out with “should have been resolved at init time”. Consider resolving LatestTag when loading config (or when applying overrides / updating config) and writing back the resolved GitTag for reproducibility.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@redpanda-f I've opened a new pull request, #85, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…le-level constant (#85) * Initial plan * refactor: decompose fetch_latest_tag into focused helpers with module-level constant Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
|
@redpanda-f I've opened a new pull request, #91, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@redpanda-f I've opened a new pull request, #92, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@redpanda-f I've opened a new pull request, #93, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * rename _type to loc_type in resolve_with_default Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
…nd (#93) * Initial plan * Simplify latesttag handling with early return, drop lifetimes dance Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
* Initial plan * Replace invalid v/* glob pattern with v* in docs and code Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Part of #72