Skip to content

bazel: skip recompilation when using dev+bazel#71856

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:211021.dev-bazel-interop
Oct 22, 2021
Merged

bazel: skip recompilation when using dev+bazel#71856
craig[bot] merged 1 commit intocockroachdb:masterfrom
irfansharif:211021.dev-bazel-interop

Conversation

@irfansharif
Copy link
Copy Markdown
Contributor

Fixes #71835. When switching between using dev and bazel raw, I kept
seeing our C++ protobuf dependency getting recompiled (slowly).
It appears that the bazel build for protobuf has a dependency on $PATH
(see bazelbuild/intellij#1169 and bazelbuild/bazel#7095). Specifying
--incompatible_strict_action_env pins PATH and avoids the build cache
thrashing we were seeing before.

Release note: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@irfansharif irfansharif requested a review from a team October 22, 2021 02:29
.bazelrc Outdated
build --symlink_prefix=_bazel/ --ui_event_filters=-DEBUG --define gotags=bazel,crdb_test_off,gss --experimental_proto_descriptor_sets_include_source_info
test --config=test
build --symlink_prefix=_bazel/ --ui_event_filters=-DEBUG --define gotags=bazel,crdb_test_off,gss --experimental_proto_descriptor_sets_include_source_info --incompatible_strict_action_env
test --config=test --incompatible_strict_action_env
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is the extra --incompatible_strict_action_env here necessary? I think it should be "inherited" from the line above (tests inherit build flags).

@rickystewart
Copy link
Copy Markdown
Collaborator

Looking forward to switching over to buf. :)

Fixes cockroachdb#71835. When switching between using `dev` and `bazel` raw, I kept
seeing our C++ protobuf dependency getting recompiled (slowly).
It appears that the bazel build for protobuf has a dependency on $PATH
(see bazelbuild/intellij#1169 and bazelbuild/bazel#7095). Specifying
`--incompatible_strict_action_env` pins PATH and avoids the build cache
thrashing we were seeing before.

Release note: None
@irfansharif irfansharif force-pushed the 211021.dev-bazel-interop branch from 1b47263 to ff59b0d Compare October 22, 2021 21:38
Copy link
Copy Markdown
Contributor Author

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

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

😂 TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rickystewart)


.bazelrc, line 4 at r1 (raw file):

Previously, rickystewart (Ricky Stewart) wrote…

Is the extra --incompatible_strict_action_env here necessary? I think it should be "inherited" from the line above (tests inherit build flags).

TIL, removed.

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 22, 2021

Build succeeded:

@craig craig bot merged commit df06437 into cockroachdb:master Oct 22, 2021
@irfansharif irfansharif deleted the 211021.dev-bazel-interop branch November 3, 2021 17:08
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,bazel: actions/build cache partially discarded when switching between dev and bazel

3 participants