Simplify latesttag branch with early return, drop lifetime workaround#93
Merged
redpanda-f merged 2 commits intofeat/redpanda/latesttag-resolverfrom Mar 11, 2026
Merged
Conversation
Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update latesttag location resolver based on feedback
Simplify Mar 11, 2026
latesttag branch with early return, drop lifetime workaround
redpanda-f
approved these changes
Mar 11, 2026
redpanda-f
added a commit
that referenced
this pull request
Mar 13, 2026
* feat: add LatestTag location resolver for init-time tag discovery * makehappy: fmt * Update src/commands/init/latest_resolver.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/commands/init/repositories.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/config.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/config.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: decompose `fetch_latest_tag` into focused helpers with module-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> * fix: remove usage of deprecated methods * fix: new resolver * fixup: latesttag * fixup: clippy issues * Update src/config.rs Co-authored-by: Rod Vagg <rod@vagg.org> * Rename `_type` to `loc_type` in `resolve_with_default` (#91) * 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> * Simplify `latesttag` branch with early return, drop lifetime workaround (#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> * Fix invalid `v/*` glob example — replace with `v*` throughout (#92) * 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> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <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>
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.
The
latesttagspecial case incanonicalize_locationused a pre-declaredresolved_tagvariable (with a "must outlive the match below" comment) to work around borrow lifetimes — unnecessary since there's nomatchafter it, just a directOk(...)return.Changes
latesttagbranch: replaces mutation ofselector/location_typewith a directreturn Ok(("gittag".into(), url.into(), tag))mut:location_typeandselectorno longer need to be mutable✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.