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

dev: add flag for extra docker args #101931

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

herkolategan
Copy link
Collaborator

@herkolategan herkolategan commented Apr 20, 2023

In order to support git alternates an additional volume must be supplied to the
bazel support docker. The TeamCity script already supplies a utility method
called run_bazel which supplies the volume to support git alternates.

This change allows for extra arguments to be passed via a command line argument
to the docker invocation that is utilised for cross builds by the dev utility.

Resolves: #101829

@herkolategan herkolategan requested a review from a team as a code owner April 20, 2023 17:52
@blathers-crl
Copy link

blathers-crl bot commented Apr 20, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@herkolategan herkolategan requested review from a team, srosenberg and smg260 and removed request for a team April 20, 2023 17:53
@rickystewart
Copy link
Collaborator

For dev we typically just use command-line arguments instead of environment variables. Any particular reason why we have not done that here?

Copy link
Collaborator Author

@herkolategan herkolategan left a comment

Choose a reason for hiding this comment

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

My reasoning was that it seems the docker invocation could form part of multiple commands now and in the future, thus an environment variable would ensure being able to always supply additional arguments to the invocation. But that said, I'm not opposed to sticking to command-line arguments to keep things uniform.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @smg260 and @srosenberg)

@herkolategan herkolategan force-pushed the hbl/dev-docker-env-args branch from 79238b0 to dc6aba8 Compare April 21, 2023 17:48
@herkolategan herkolategan changed the title dev: add env var for extra docker args dev: add flag for extra docker args Apr 21, 2023
@herkolategan herkolategan force-pushed the hbl/dev-docker-env-args branch 2 times, most recently from 4716ef9 to 0536a38 Compare April 25, 2023 09:08
Copy link
Collaborator Author

@herkolategan herkolategan left a comment

Choose a reason for hiding this comment

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

@rickystewart Updated my PR to take command-line arguments instead.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @smg260 and @srosenberg)

@herkolategan herkolategan force-pushed the hbl/dev-docker-env-args branch from 0536a38 to 9852ed3 Compare April 25, 2023 09:36
Copy link
Member

@srosenberg srosenberg left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rickystewart and @smg260)

Copy link
Collaborator

@rickystewart rickystewart left a comment

Choose a reason for hiding this comment

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

LGTM. Consider bumping the version number in the top-level ./dev script so people pick up the change.

In order to support git alternates an additional volume must be supplied to the
bazel support docker. The TeamCity script already supplies a utility method
called `run_bazel` which supplies the volume to support git alternates.

This change allows for extra arguments to be passed via a command line argument
to the docker invocation that is utilised for cross builds by the `dev` utility.
@herkolategan herkolategan force-pushed the hbl/dev-docker-env-args branch from 9852ed3 to 8eecff7 Compare April 26, 2023 17:41
@herkolategan
Copy link
Collaborator Author

TFTR!
bors r=srosenberg,rickystewart

@craig craig bot merged commit bc5e6fc into cockroachdb:master Apr 26, 2023
@craig
Copy link
Contributor

craig bot commented Apr 26, 2023

Build succeeded:

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.

dev: add flag for extra docker args
4 participants