Skip to content

make --experimental_repo_remote_exec compatible with rbe_autconfig - #11029

Closed
buchgr wants to merge 1 commit into
bazelbuild:masterfrom
buchgr:support-override-exec_properties
Closed

buchgr wants to merge 1 commit into
bazelbuild:masterfrom
buchgr:support-override-exec_properties

Conversation

@buchgr

@buchgr buchgr commented Mar 26, 2020

Copy link
Copy Markdown
Contributor

rbe_autoconfig has an attribute 'exec_properties' of type string_dict [1].
As do all repository rules if --experimental_repo_remote_exec is set.
Bazel reports an error if both are used together. This change fixes this
so if a repository_rule declares an attribute 'exec_properties' of type
string_dict Bazel no longer tries to add its own.

[1] https://github.com/bazelbuild/bazel-toolchains/blob/b5928f980c79cbdbfd0b5c5a924aeb2cd61eb4f9/rules/rbe_repo.bzl#L758

rbe_autoconfig has an attribute 'exec_properties' of type string_dict [1].
As do all repository rules if --experimental_repo_remote_exec is set.
Bazel reports an error if both are used together. This change fixes this
so if a repository_rule declares an attribute 'exec_properties' of type
string_dict Bazel no longer tries to add its own.

[1] https://github.com/bazelbuild/bazel-toolchains/blob/b5928f980c79cbdbfd0b5c5a924aeb2cd61eb4f9/rules/rbe_repo.bzl#L758
@buchgr

buchgr commented Mar 26, 2020

Copy link
Copy Markdown
Contributor Author

FYI @GMNGeoffrey

@GMNGeoffrey

Copy link
Copy Markdown
Contributor

Yay, thank you!

buchgr added a commit to buchgr/iree that referenced this pull request Mar 26, 2020
This is a workaround to use rbe_autoconfig with
--experimental_repo_remote_exec. It had to be disabled before due
to a naming conflict [1]. More information at [2].

[1] iree-org@b5331d2
[2] bazelbuild/bazel#11029
buchgr added a commit to buchgr/iree that referenced this pull request Mar 26, 2020
This is a workaround to use rbe_autoconfig with
--experimental_repo_remote_exec. It had to be disabled before due
to a naming conflict [1]. More information at [2].

[1] iree-org@b5331d2
[2] bazelbuild/bazel#11029
buchgr added a commit to buchgr/iree that referenced this pull request Mar 26, 2020
This is a workaround to use rbe_autoconfig with
--experimental_repo_remote_exec. It had to be disabled before due
to a naming conflict [1]. More information at [2].

[1] iree-org@b5331d2
[2] bazelbuild/bazel#11029
buchgr added a commit to buchgr/iree that referenced this pull request Mar 26, 2020
This is a workaround to use rbe_autoconfig with
--experimental_repo_remote_exec. It had to be disabled before due
to a naming conflict [1]. More information at [2].

[1] iree-org@b5331d2
[2] bazelbuild/bazel#11029
copybara-service Bot pushed a commit to iree-org/iree that referenced this pull request Mar 30, 2020
This is a workaround to use rbe_autoconfig with
--experimental_repo_remote_exec. It had to be disabled before due
to a naming conflict [1]. More information at [2].

[1] b5331d2
[2] bazelbuild/bazel#11029

Closes #1275

COPYBARA_INTEGRATE_REVIEW=#1275 from buchgr:fix-rbe b4a7d3a
PiperOrigin-RevId: 303836625
@dslomov dslomov added team-Remote-Exec Issues and PRs for the Execution (Remote) team untriaged Has not yet been seen by appropriate subteam labels Apr 3, 2020
attr(RuleClass.EXEC_PROPERTIES, STRING_DICT).defaultValue(ImmutableMap.of()));
Builder<Map<String, String>> attr =
attr(RuleClass.EXEC_PROPERTIES, STRING_DICT).defaultValue(ImmutableMap.of());
if (builder.contains(RuleClass.EXEC_PROPERTIES)) {

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.

What if the existing EXEC_PROPERTIES doesn't have the type string_dict? Should we throw an error here? Otherwise, it could be confusing to user.

@GMNGeoffrey

Copy link
Copy Markdown
Contributor

Any progress on getting this merged? We're still using a hacky local patch and I would love to fix that and close that out.

@GMNGeoffrey

Copy link
Copy Markdown
Contributor

Ping on this? I'm in the process of updating our bazel version and am going to have to update our hacky patch as well

@meteorcloudy

Copy link
Copy Markdown
Member

@buchgr Can you resolve the comment and conflict of this PR?

@buchgr

buchgr commented Jul 13, 2020

Copy link
Copy Markdown
Contributor Author

Forgot about it. I ll look into this today. Thanks for the ping.

@agluszak

agluszak commented Sep 8, 2020

Copy link
Copy Markdown
Contributor

Fixed by bazelbuild/bazel-toolchains#912

@agluszak agluszak closed this Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes team-Remote-Exec Issues and PRs for the Execution (Remote) team untriaged Has not yet been seen by appropriate subteam

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants