Skip to content

Commit 3316cc8

Browse files
kevinlnewgithub-actions[bot]
authored andcommitted
refactor(runway): use "merge target" terminology consistently
Replace "target branch" and "landing target" with "merge target" throughout runway's merger extension, message queue contract, proto definitions, and documentation. "Branch" is git-specific; the system is VCS-neutral.
1 parent 3aef74e commit 3316cc8

5 files changed

Lines changed: 23 additions & 23 deletions

File tree

api/runway/messagequeue/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The shared field types `Change` and `MergeStrategy` come from `api/base/change`
88

99
## Merge strategy
1010

11-
Each `MergeStep` carries a `Strategy` (from `api/base/mergestrategy`) naming how that step is integrated into the target branch. `REBASE`, `SQUASH_REBASE`, and `MERGE` *transform* the change onto the branch tip and produce new revisions. `PROMOTE` is different: it integrates the exact revision **as-is**, advancing the target branch to an already-existing commit with no content transform and no new revision. Each backend realizes `PROMOTE` natively — git fast-forward, Mercurial bookmark advance, Subversion/Perforce copy — so for `PROMOTE` a step's `StepOutput.id` is the same revision the request named rather than a freshly created one. It is the strategy a post-merge verifier (e.g. Stovepipe) uses to advance a verified branch like `verified/main` to an already-landed, already-verified commit. `DEFAULT` lets the server pick per queue configuration.
11+
Each `MergeStep` carries a `Strategy` (from `api/base/mergestrategy`) naming how that step is integrated into the merge target. `REBASE`, `SQUASH_REBASE`, and `MERGE` *transform* the change onto the branch tip and produce new revisions. `PROMOTE` is different: it integrates the exact revision **as-is**, advancing the merge target to an already-existing commit with no content transform and no new revision. Each backend realizes `PROMOTE` natively — git fast-forward, Mercurial bookmark advance, Subversion/Perforce copy — so for `PROMOTE` a step's `StepOutput.id` is the same revision the request named rather than a freshly created one. It is the strategy a post-merge verifier (e.g. Stovepipe) uses to advance a verified branch like `verified/main` to an already-landed, already-verified commit. `DEFAULT` lets the server pick per queue configuration.
1212

1313
## Topic keys
1414

@@ -19,11 +19,11 @@ The binding between a topic key and its payload lives in each message's `topic_k
1919
| `MergeRequest` | client → Runway | `merge-conflict-check`, `merge` |
2020
| `MergeResult` | Runway → client | `merge-conflict-check-signal`, `merge-signal` |
2121

22-
One message serves a queue pair because a merge-conflict check is a dry run of a merge: Runway applies the same ordered steps onto the same target branch, and the topic key the request arrives on decides whether it commits the result and reports the produced revisions. A request on `merge-conflict-check` is a dry run; a request on `merge` commits.
22+
One message serves a queue pair because a merge-conflict check is a dry run of a merge: Runway applies the same ordered steps onto the same merge target, and the topic key the request arrives on decides whether it commits the result and reports the produced revisions. A request on `merge-conflict-check` is a dry run; a request on `merge` commits.
2323

2424
## Result shape
2525

26-
`MergeResult.outcome` is an `Outcome` enum (`OUTCOME_UNSPECIFIED`/`SUCCEEDED`/`FAILED`): `SUCCEEDED` means mergeable (check) or merged (commit), `FAILED` a conflict or a failed apply; `reason` carries the explanation when `FAILED`. Per-step detail is in `steps` (request order): each `StepResult.outputs` is the list of `StepOutput`s the step produced on the target branch, **in application order** (the order they were created). A committing merge populates `outputs`; a dry-run check, an already-present change, or a failed step leaves them empty. `StepOutput.id` is the VCS-neutral revision identifier (git SHA, Mercurial hash, Subversion revision, Perforce changelist, …), with room to grow (author, timestamp, …).
26+
`MergeResult.outcome` is an `Outcome` enum (`OUTCOME_UNSPECIFIED`/`SUCCEEDED`/`FAILED`): `SUCCEEDED` means mergeable (check) or merged (commit), `FAILED` a conflict or a failed apply; `reason` carries the explanation when `FAILED`. Per-step detail is in `steps` (request order): each `StepResult.outputs` is the list of `StepOutput`s the step produced on the merge target, **in application order** (the order they were created). A committing merge populates `outputs`; a dry-run check, an already-present change, or a failed step leaves them empty. `StepOutput.id` is the VCS-neutral revision identifier (git SHA, Mercurial hash, Subversion revision, Perforce changelist, …), with room to grow (author, timestamp, …).
2727

2828
## Evolution
2929

api/runway/messagequeue/merge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type (
5656
MergeResult = protopb.MergeResult
5757
// StepResult reports what happened to a single MergeStep.
5858
StepResult = protopb.StepResult
59-
// StepOutput is a single revision a merge step produced on the target branch.
59+
// StepOutput is a single revision a merge step produced on the merge target.
6060
StepOutput = protopb.StepOutput
6161
)
6262

api/runway/messagequeue/proto/merge.proto

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ option java_package = "com.uber.submitqueue.runway.messagequeue";
2727

2828
// MergeStep is one step of an ordered merge: a single set of change(s) applied
2929
// with a strategy. Runway applies the steps of a request in order on top of the
30-
// target branch; the ordering encodes the base-layering (earlier steps are the
30+
// merge target; the ordering encodes the base-layering (earlier steps are the
3131
// in-flight base, the last step is the candidate).
3232
message MergeStep {
3333
// step_id is an opaque, caller-assigned identifier for this step. Runway
@@ -37,7 +37,7 @@ message MergeStep {
3737
string step_id = 1;
3838
// changes are the code change(s) to apply for this step.
3939
repeated uber.base.change.Change changes = 2;
40-
// strategy is how this step's changes are integrated into the target branch.
40+
// strategy is how this step's changes are integrated into the merge target.
4141
uber.base.mergestrategy.Strategy strategy = 3;
4242
}
4343

@@ -54,16 +54,16 @@ message MergeRequest {
5454
// Runway echoes it back on the result unchanged.
5555
string id = 1;
5656
// queue_name is the caller-provided queue name the request belongs to.
57-
// Runway resolves the target branch and provider config per-queue from this
57+
// Runway resolves the merge target and provider config per-queue from this
5858
// name; no target ref is passed.
5959
string queue_name = 2;
6060
// steps is the ordered application sequence: in-flight steps first, the
61-
// candidate last. A single-element list expresses "candidate vs target
62-
// branch".
61+
// candidate last. A single-element list expresses "candidate vs merge
62+
// target".
6363
repeated MergeStep steps = 3;
6464
}
6565

66-
// StepOutput is a single output a merge step produced on the target branch.
66+
// StepOutput is a single output a merge step produced on the merge target.
6767
message StepOutput {
6868
// id is the VCS-neutral revision identifier -- a git commit SHA, a Mercurial
6969
// changeset hash, a Subversion revision number, a Perforce changelist, and so
@@ -77,7 +77,7 @@ message StepOutput {
7777
message StepResult {
7878
// step_id echoes the step_id of the step this result is for.
7979
string step_id = 1;
80-
// outputs are the revisions this step produced on the target branch, in
80+
// outputs are the revisions this step produced on the merge target, in
8181
// application order (the order the step created them on the target). Empty
8282
// for a dry-run check, for a change already present on the target, or for a
8383
// step that failed to apply.

api/runway/messagequeue/protopb/merge.pb.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runway/extension/merger/merger.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// Package merger defines the pluggable interface for version-control merge
1616
// operations that Runway performs on behalf of its callers. Implementations
17-
// resolve change URIs, apply changes to a target branch, and (for a committing
17+
// resolve change URIs, apply changes to a merge target, and (for a committing
1818
// merge) push the result and finalize the change lifecycle (e.g. close PRs).
1919
package merger
2020

@@ -32,7 +32,7 @@ import (
3232
// result), not an infrastructure error.
3333
var ErrConflict = errors.New("merge conflict")
3434

35-
// Merger performs version-control operations against a single landing target.
35+
// Merger performs version-control operations against a single merge target.
3636
// Both methods accept the same MergeRequest payload; the behavioral difference
3737
// is whether the result is committed to the remote.
3838
type Merger interface {
@@ -44,15 +44,15 @@ type Merger interface {
4444
Merge(ctx context.Context, req *runwaymq.MergeRequest) (*runwaymq.MergeResult, error)
4545
}
4646

47-
// Config identifies the landing target a Merger instance operates on. The factory
47+
// Config identifies the merge target a Merger instance operates on. The factory
4848
// resolves deployment-specific details (remote URL, credentials) from this.
4949
type Config struct {
5050
// QueueName is the caller-provided queue name from the MergeRequest.
5151
QueueName string
5252
}
5353

54-
// Factory creates Merger instances bound to a landing target.
54+
// Factory creates Merger instances bound to a merge target.
5555
type Factory interface {
56-
// For returns a Merger instance configured for the given landing target.
56+
// For returns a Merger instance configured for the given merge target.
5757
For(cfg Config) (Merger, error)
5858
}

0 commit comments

Comments
 (0)