Skip to content

feat(conflict): Resolve the Tango base revision from a git workspace - #910

Open
manjari25 wants to merge 1 commit into
mainfrom
manjari/tango-base-revision
Open

manjari25 wants to merge 1 commit into
mainfrom
manjari/tango-base-revision

Conversation

@manjari25

@manjari25 manjari25 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Why?

The tango analyzer needs the commit a new batch is analyzed against, and nothing supplies it. The queue has no branch of its own, and deployments run git in different places.

What?

  • Adds baserevision.FromGit(factory, targets), which returns the function Params.BaseRevision already takes. It works over any gitworkspace.Factory, so where git runs is the deployment's choice.
  • Each call fetches the queue's target branch and returns FETCH_HEAD as a full commit SHA. FETCH_HEAD is used rather than <remote>/<branch>, because a clone whose fetch refspec doesn't cover the branch would leave the tracking ref stale.
  • Fails closed: an unknown queue, a failed fetch, or output that isn't a full SHA is an error.
  • Calls sharing a repo are serialized, since concurrent fetches into one clone can fail on a ref lock and overwrite each other's FETCH_HEAD.

Test Plan

  • Unit tests added
  • CI

Issue

@manjari25
manjari25 marked this pull request as ready for review October 22, 2026 00:44
@manjari25
manjari25 requested review from a team, behinddwalls and sbalabanov as code owners October 22, 2026 00:44
@manjari25
manjari25 added this pull request to stack #912 October 22, 2026 00:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants