Skip to content

feat: add Latesttag location resolver for init-time tag discovery#83

Merged
redpanda-f merged 15 commits intomainfrom
feat/redpanda/latesttag-resolver
Mar 13, 2026
Merged

feat: add Latesttag location resolver for init-time tag discovery#83
redpanda-f merged 15 commits intomainfrom
feat/redpanda/latesttag-resolver

Conversation

@redpanda-f
Copy link
Contributor

Part of #72

@redpanda-f redpanda-f requested a review from rvagg March 9, 2026 09:21
@redpanda-f redpanda-f self-assigned this Mar 9, 2026
Copilot AI review requested due to automatic review settings March 9, 2026 09:21
@FilOzzy FilOzzy added this to FOC Mar 9, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Mar 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 in Location and documents it in CLI help + README.
  • Adds an init-time resolver (latest_resolver) that probes the remote with git to convert LatestTagGitTag.
  • 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.

Comment on lines +74 to +78
// 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)?;
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
redpanda-f and others added 2 commits March 9, 2026 11:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Mar 9, 2026

@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.

redpanda-f and others added 4 commits March 9, 2026 17:30
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>
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Mar 10, 2026
@BigLep BigLep requested a review from rvagg March 10, 2026 21:23
Co-authored-by: Rod Vagg <rod@vagg.org>
Copy link
Contributor

Copilot AI commented Mar 11, 2026

@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.

Copy link
Contributor

Copilot AI commented Mar 11, 2026

@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.

Copy link
Contributor

Copilot AI commented Mar 11, 2026

@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.

Copilot AI and others added 3 commits March 11, 2026 18:45
* 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>
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Mar 12, 2026
@redpanda-f redpanda-f merged commit 3164e17 into main Mar 13, 2026
5 of 6 checks passed
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Mar 13, 2026
@redpanda-f redpanda-f deleted the feat/redpanda/latesttag-resolver branch March 13, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants