baserevision

package
v0.3.0-20261120180237-... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Base Revision Extension

Vendor-agnostic source of the commit a queue's new batches are analyzed against.

Interfaces

Resolver

Returns the full commit SHA of the tip of a queue's target branch, as of the call. A queue without a target is an error, and so is any failure to read the tip. A caller must not fall back to an earlier value, because the revision names the code a batch is measured against. Implementations must be safe for concurrent use.

Implementations

  • git fetches the target branch into a clone through any gitworkspace.Factory, so where git runs is the deployment's choice. Calls that share a repository are serialized, because concurrent fetches into one clone can fail on a ref lock.
  • github reads the branch from the GitHub REST API, so it needs no clone. It takes an HTTP client that already carries the API root and credentials, as the GitHub change provider does.

A deployer can supply its own implementation, for example one backed by an internal source control service.

The Tango conflict analyzer is the only consumer today. The orchestrator wiring picks the implementation from the queue's change provider.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFullCommitSHA

func IsFullCommitSHA(s string) bool

IsFullCommitSHA reports whether s is a complete commit SHA. A base revision must be one, because the consumers of it reject an abbreviated SHA.

Types

type Resolver

type Resolver interface {
	// Resolve returns the full commit SHA of the tip of the queue's target
	// branch as of the call. An error means the tip could not be determined,
	// and a caller must not fall back to an earlier value. Implementations
	// must be safe for concurrent use.
	Resolve(ctx context.Context, queue string) (string, error)
}

Resolver returns the commit a queue's new batches are analyzed against.

Directories

Path Synopsis
Package git resolves the base revision of a queue by asking a git workspace for the tip of the queue's target branch.
Package git resolves the base revision of a queue by asking a git workspace for the tip of the queue's target branch.
Package github resolves the base revision of a queue by asking the GitHub REST API for the tip of the queue's target branch, so it needs no clone.
Package github resolves the base revision of a queue by asking the GitHub REST API for the tip of the queue's target branch, so it needs no clone.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL