Skip to content

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

Merged
manjari25 merged 1 commit into
mainfrom
manjari/tango-base-revision
Oct 27, 2026
Merged

manjari25 merged 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
@manjari25
manjari25 added this pull request to the merge queue Oct 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@manjari25
manjari25 added this pull request to the merge queue Oct 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 27, 2026
@manjari25
manjari25 added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 7767175 Oct 27, 2026
37 checks passed
@manjari25
manjari25 deleted the manjari/tango-base-revision branch October 27, 2026 19:46
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