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

Document the use of platform properties #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cphang99
Copy link

@cphang99 cphang99 commented Aug 15, 2020

Add this to the README, to identify how platform properties
in bazel are expressed and how buildbarn workers are configured.

Closes #20

README.md Outdated Show resolved Hide resolved
For clients to be able to use buildbarn, clients need to send actions with platform properties that
match the platform properties that buildbarn workers register themselves with.

For Bazel clients, platform properties can be set in the `.bazelrc` or as command line parameters:
Copy link
Member

Choose a reason for hiding this comment

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

Though I guess you normally never set those, because bazel-toolchains sets those for you, right?

Copy link
Author

Choose a reason for hiding this comment

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

Mm that's fair. Related to the comment about the `try a build section' being a bit lost, maybe this needs to be its own section, distinct from the remote-execution section?

Copy link
Author

Choose a reason for hiding this comment

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

Moved it, let me know if that works for you.

Copy link
Member

Choose a reason for hiding this comment

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

That place seems better. Thanks! Do make sure to explicitly mention that this isn’t needed for bazel-toolchain users.

Copy link
Author

Choose a reason for hiding this comment

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

Yeh. I think that it would be helpful for bazel-toolchain users to document how the bazel platform referenced in rbe_autoconfig relates to the platform defined in the runner configuration, so I've just expanded that out a bit.

README.md Outdated Show resolved Hide resolved
For clients to be able to use buildbarn, clients need to send actions with platform properties that
match the platform properties that buildbarn workers register themselves with.

For Bazel clients, platform properties can be set in the `.bazelrc` or as command line parameters:
Copy link
Member

Choose a reason for hiding this comment

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

That place seems better. Thanks! Do make sure to explicitly mention that this isn’t needed for bazel-toolchain users.

README.md Outdated Show resolved Hide resolved
Add this to the README, to identify how platform properties
in bazel are expressed and how buildbarn workers are configured.
--remote_default_exec_properties=container-image=docker://marketplace.gcr.io/google/rbe-ubuntu16-04@sha256:b516a2d69537cb40a7c6a7d92d0008abb29fba8725243772bdaf2c83f1be2272
```

Note this is only necessary when the [bazel-toolchains](https:/bazelbuild/bazel-toolchains) repository is not being used. Otherwise, platform properties are set via the [bazel platform](https:/bazelbuild/bazel-toolchains/blob/master/configs/ubuntu16_04_clang/11.0.0/bazel_3.1.0/config/BUILD#L43) selected in [`rbe_autoconfig`](https:/buildbarn/bb-deployments/blob/master/WORKSPACE#L93), and referenced using the [`--extra_execution_platforms`](https:/buildbarn/bb-deployments/blob/master/bazelrc#L4) parameter.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe good to mention also that rbe_autoconfig is only available on Linux? (see also #19)

--remote_default_exec_properties=container-image=docker://marketplace.gcr.io/google/rbe-ubuntu16-04@sha256:b516a2d69537cb40a7c6a7d92d0008abb29fba8725243772bdaf2c83f1be2272
```

Note this is only necessary when the [bazel-toolchains](https:/bazelbuild/bazel-toolchains) repository is not being used. Otherwise, platform properties are set via the [bazel platform](https:/bazelbuild/bazel-toolchains/blob/master/configs/ubuntu16_04_clang/11.0.0/bazel_3.1.0/config/BUILD#L43) selected in [`rbe_autoconfig`](https:/buildbarn/bb-deployments/blob/master/WORKSPACE#L93), and referenced using the [`--extra_execution_platforms`](https:/buildbarn/bb-deployments/blob/master/bazelrc#L4) parameter.
Copy link
Member

Choose a reason for hiding this comment

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

When I see links to files in Git repositories, I'm always worried that the links become broken over time. Especially when line number anchors are used. Could you please replace the word master in all these URLs with the commit hash or a tag? Thanks!

README.md Show resolved Hide resolved
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.

Document how to use platform properties
3 participants