Skip to content

roachprod,roachtest: use roachprod stage for older cockroach binaries#56163

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
thoszhang:roachprod-stage
Nov 6, 2020
Merged

roachprod,roachtest: use roachprod stage for older cockroach binaries#56163
craig[bot] merged 1 commit intocockroachdb:masterfrom
thoszhang:roachprod-stage

Conversation

@thoszhang
Copy link
Copy Markdown

@thoszhang thoszhang commented Oct 30, 2020

Previously, the version upgrade roachtests used binfetcher to fetch
older cockroach binaries, which doesn't work as-is with the geos
libraries that are now included with our releases. This was blocking
mixed version 20.2/21.1 testing.

This PR replaces all the uses of binfetcher with roachprod stage to
download older cockroach releases in roachtests. It also adds an
optional--dir flag to roachprod stage to specify the directory to
stage the binary and libraries to, which is needed for the mixed-version
tests because they need to keep the old binaries and libraries around in
order to downgrade.

Closes #55706.

Release note: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@thoszhang thoszhang marked this pull request as draft October 30, 2020 20:52
@thoszhang thoszhang marked this pull request as ready for review October 30, 2020 21:31
@thoszhang thoszhang requested review from otan and tbg October 30, 2020 21:31
@thoszhang
Copy link
Copy Markdown
Author

This could use some cleanup, and there's a TODO about supporting the --dir flag for stage cockroach and stage workload, but I wanted to get some feedback first. This is a prerequisite for #55520 and adding a v21.1.0-alpha.00000000 tag on master.

Copy link
Copy Markdown
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

Haven't reviewed in-depth, but that approach looks good. Ping me when you are ready for a closer look.

Previously, the version upgrade roachtests used binfetcher to fetch
older cockroach binaries, which doesn't work as-is with the geos
libraries that are now included with our releases. This was blocking
mixed version 20.2/21.1 testing.

This PR replaces all the uses of binfetcher with `roachprod stage` to
download older cockroach releases in roachtests. It also adds an
optional`--dir` flag to `roachprod stage` to specify the directory to
stage the binary and libraries to, which is needed for the mixed-version
tests because they need to keep the old binaries and libraries around in
order to downgrade.

Release note: None
@thoszhang thoszhang changed the title [wip] roachprod,roachtest: use roachprod stage for older cockroach binaries roachprod,roachtest: use roachprod stage for older cockroach binaries Nov 5, 2020
@thoszhang
Copy link
Copy Markdown
Author

@tbg this is RFAL.

return err
}
c.Put(ctx, b, "./cockroach", c.Node(i))
if err := c.Stage(ctx, c.l, "release", "v"+binaryVersion, "", c.Node(i)); err != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't this download the same binary in a loop? Can c.Stage or even roachprod stage do the caching so we don't have to be smart about each invocation of c.Stage?

@tbg
Copy link
Copy Markdown
Member

tbg commented Nov 6, 2020

As of this PR, there are two remaining uses of binfetcher:

b, err := binfetcher.Download(ctx, binfetcher.Options{
Component: "rubrik",
Binary: app,
Version: "LATEST",
GOOS: "linux",
GOARCH: "amd64",
})
if err != nil {
t.Fatal(err)
}

// This binary has been manually compiled using
// './build/builder.sh go build ./pkg/cmd/smithcmp' and uploaded to S3
// bucket at cockroach/smithcmp. The binary shouldn't change much, so it is
// acceptable.
smithcmp, err := binfetcher.Download(ctx, binfetcher.Options{
Component: tpchVecSmithcmp,
Binary: tpchVecSmithcmp,
Version: smithcmpSHA,
GOOS: "linux",
GOARCH: "amd64",
})

Can both be converted to use roachprod stage instead? Then we can delete the binfetcher package, which seems like the easier option - the alternative is fixing it.

@thoszhang
Copy link
Copy Markdown
Author

I'm on board with these proposed improvements, but how would you feel about merging this now and opening some issues for later? I'm eager to unblock, e.g., #56190.

@tbg
Copy link
Copy Markdown
Member

tbg commented Nov 6, 2020 via email

@thoszhang
Copy link
Copy Markdown
Author

@tbg would you mind stamping this with an approval?

@thoszhang
Copy link
Copy Markdown
Author

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 6, 2020

Build succeeded:

@craig craig bot merged commit 7b85c57 into cockroachdb:master Nov 6, 2020
@otan
Copy link
Copy Markdown
Contributor

otan commented Nov 6, 2020

nice

@thoszhang thoszhang deleted the roachprod-stage branch November 6, 2020 16:18
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.

util: binfetcher can't handle lib directory

4 participants