Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazci: fix output path computation #87117

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Conversation

rickystewart
Copy link
Collaborator

These updates were happening in-place so bazci was constructing big,
silly paths like backupccl_test/shard_6_of_16/shard_7_of_16/shard_13_of_16/...
We just need to copy the variable here.

Release justification: Non-production code changes
Release note: None

These updates were happening in-place so `bazci` was constructing big,
silly paths like `backupccl_test/shard_6_of_16/shard_7_of_16/shard_13_of_16/...`
We just need to copy the variable here.

Release justification: Non-production code changes
Release note: None
@rickystewart rickystewart requested a review from a team as a code owner August 30, 2022 16:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rickystewart rickystewart requested review from jlinder and rail August 30, 2022 16:11
@@ -185,6 +185,7 @@ func processBuildEventProtocolLog(action, bepLoc string) error {
outputDir = filepath.Join("bazel-testlogs", outputDir)
summary := event.GetTestSummary()
for _, testResult := range testResults[label] {
outputDir := outputDir
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like outputDir is just overwriting itself. What am I missing about how it works?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

outputDir := outputDir declares a new variable with the same name as the old one. It shadows the original variable in a new scope. That means we can update the value in the loop but each iteration will get the original value of outputDir.

@rickystewart
Copy link
Collaborator Author

Results in CI look good.

bors r=rail

@craig
Copy link
Contributor

craig bot commented Aug 30, 2022

Build succeeded:

@craig craig bot merged commit 716626e into cockroachdb:master Aug 30, 2022
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.

4 participants