Fix missing git info for bundles deployed from in-workspace Git folders#5709
Open
ilyakuz-db wants to merge 2 commits into
Open
Fix missing git info for bundles deployed from in-workspace Git folders#5709ilyakuz-db wants to merge 2 commits into
ilyakuz-db wants to merge 2 commits into
Conversation
Co-authored-by: Isaac
Contributor
Approval status: pending
|
Co-authored-by: Isaac
Collaborator
Integration test reportCommit: 804d517
20 interesting tests: 13 SKIP, 7 RECOVERED
Top 6 slowest tests (at least 2 minutes):
|
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.
Changes
When a bundle is deployed from inside the workspace and its source lives in a Git folder, the CLI reads git provenance from
get-status?return_git_info=true. The new in-workspace Git-folder model returns onlyidandpaththere (no branch/commit/url), so the CLI recorded empty git info (origin URL, branch, commit).This parses the git folder
idand, when the origin URL is missing, falls back toRepos.GetByRepoIdto fill in branch/commit/url. Classic Repos return these inline from get-status and skip the extra call. A failed lookup degrades to best-effort, matchingFetchRepositoryInfo's existing contract.Why
On dataplanes with the new in-workspace Git folders,
get-statusreturnsgit_info: { id, path }only, while classic Repos return the full object — so in-workspace deploys from a Git folder recorded blank git provenance (including in the deployment metadata service version). The Repos API still returns full provenance for these folders by id. (Reading on-disk.gitis not an option here — workspace Repos don't expose a usable.giton the dataplane, which is why the API path exists.)Tests
Unit tests in
libs/git/info_test.go(testserver +dbr.MockRuntime): new Git folder → provenance recovered via Repos API; classic Repo → Repos API not called; Repos lookup failure → graceful degradation.go test ./libs/git/passes; lint clean.This PR was written by Claude Code.