这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@maggie-lou
Copy link
Collaborator

@maggie-lou maggie-lou commented Jun 10, 2024

Currently for remote runs, the generated binary will not be executed remotely, and will be fetched and run locally (See here for implementation). Add a configurable flag, because for CI people may want it to be executed remotely

Related issues: N/A

@maggie-lou maggie-lou requested review from bduffany and siggisim June 10, 2024 15:46
@maggie-lou maggie-lou marked this pull request as draft June 10, 2024 16:15
@maggie-lou maggie-lou requested review from bduffany and siggisim June 10, 2024 16:27
@maggie-lou maggie-lou marked this pull request as ready for review June 10, 2024 16:27
runOutput := false
bazelArgs := arg.GetBazelArgs(opts.Args)
if len(bazelArgs) > 0 && (bazelArgs[0] == "build" || bazelArgs[0] == "run") {
if *fetchRemoteOutputs && len(bazelArgs) > 0 && (bazelArgs[0] == "build" || bazelArgs[0] == "run") {
Copy link
Member

@bduffany bduffany Jun 10, 2024

Choose a reason for hiding this comment

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

IIUC this changes the default for bazel run from running locally to running remotely. For running webservers, running remotely isn't a great default because there's no way to access the VM network.

Should we force running locally* for now if the command is run?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll close this for now until we have a better idea of customer needs around this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bduffany Re-opening this. Currently I want this because it will be helpful for unit tests. But I could also see customers wanting this. For example if they're using remote bazel to build and publish a docker image, they might expect the target to run on the OS / arch / container image / with the compute resources that they've specified in their remote request

I think for a build it makes sense to default to downloading the outputs. For a run, I actually think it makes sense to default to running remotely, and of course there will still be the option to flip the flag. What do you think?

@maggie-lou maggie-lou requested a review from tylerwilliams June 13, 2024 20:21
@maggie-lou maggie-lou changed the title [RB] Support configuring whether to fetch remote outputs [RB] Support configuring whether to run targets on the local vs remote runner Jun 13, 2024
@maggie-lou maggie-lou merged commit 58f3b51 into master Jun 13, 2024
@maggie-lou maggie-lou deleted the rb_local_run branch June 13, 2024 22:31
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