-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
110735: dev: avoid re-generating logictest files if unnecessary r=rickystewart a=liamgillies Beforehand, running `dev testlogic` would always run all tests regardless if they were modified, which wastes time. This PR will check to see if logic test folders were modified and only re-generates them if they are modified. It also introduces a new flag, `--force-gen`, which will force generate the logic tests. Fixes: #94845 Release note: None 110867: build/release: let `go_version` check be more flexible r=healthy-pod a=healthy-pod This code change lets the check confirm that `go_version` contains `fips`. Previously, it required that `fips` is a suffix of `go_version`. Epic: none Release note: None 110872: kv: ignore {exclusive,shared} locks in QueryResolvedTimestamp r=nvanbenschoten a=nvanbenschoten Informs #100193. The resolved timestamp is a function of the intents in a range, but not of the other locks in a range. This commit updates the QueryResolvedTimestamp evaluation method to use a LockTableIterator configured to ignore Exclusive or Shared locks. Release note: None Co-authored-by: Liam Gillies <[email protected]> Co-authored-by: healthy-pod <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information
Showing
6 changed files
with
77 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -249,3 +249,27 @@ func (d *dev) warnAboutChangeInStressBehavior(timeout time.Duration) { | |
log.Printf("Set DEV_I_UNDERSTAND_ABOUT_STRESS=1 to squelch this message") | ||
} | ||
} | ||
|
||
// This function retrieves the merge-base hash between the current branch and master | ||
func (d *dev) getMergeBaseHash(ctx context.Context) (string, error) { | ||
// List files changed against `master` | ||
remotes, err := d.exec.CommandContextSilent(ctx, "git", "remote", "-v") | ||
if err != nil { | ||
return "", err | ||
} | ||
var upstream string | ||
for _, remote := range strings.Split(strings.TrimSpace(string(remotes)), "\n") { | ||
if (strings.Contains(remote, "github.com/cockroachdb/cockroach") || strings.Contains(remote, "github.com:cockroachdb/cockroach")) && strings.HasSuffix(remote, "(fetch)") { | ||
upstream = strings.Fields(remote)[0] | ||
break | ||
} | ||
} | ||
if upstream == "" { | ||
return "", fmt.Errorf("could not find git upstream, run `git remote add upstream [email protected]:cockroachdb/cockroach.git`") | ||
} | ||
baseBytes, err := d.exec.CommandContextSilent(ctx, "git", "merge-base", fmt.Sprintf("%s/master", upstream), "HEAD") | ||
if err != nil { | ||
return "", err | ||
} | ||
return strings.TrimSpace(string(baseBytes)), nil | ||
} |
This file contains 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
This file contains 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