-
Notifications
You must be signed in to change notification settings - Fork 173
CI: Use bazelrc_ci always on CI #3591
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @lukedirtwalker)
a discussion (no related file):
I personally find confusing so many BAZEL(RC)(CI) --bazel-rc --noworkspace
I would like maybe to have one global bazelrc for both local dev ci?
I suppose bazel ignores the localhost cache if does not exist.
I do no have strong opinion to block it, feel free to merge
Makefile, line 43 at r1 (raw file):
gazelle: bazel --bazelrc=${BAZELRC} run //:gazelle -- update -mode=$(GAZELLE_MODE) -index=false -external=external -exclude go/vendor -exclude docker/_build ./go
you can just hard code the BAZELRC value, or someone will overwrite it?
.buildkite/pipeline_buildlint.yml, line 32 at r1 (raw file):
command: - "cp go.mod go.sum go_deps.bzl $$TEST_ARTIFACTS/" - make godeps -B
BASELRC=x make godeps instead of env?
or maybe do directly bazel command
.buildkite/pipeline_buildlint.yml, line 39 at r1 (raw file):
key: go_deps_lint env: BAZELRC: ".bazelrc_ci --noworkspace_rc"
you insert argument in the the env (something like arg injection attack)
I would have global the --noworkspace and always use the --bazelrc argument
5fa3f37
to
10eefef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 7 files reviewed, 4 unresolved discussions (waiting on @karampok)
a discussion (no related file):
Previously, karampok (Konstantinos) wrote…
I personally find confusing so many
BAZEL(RC)(CI) --bazel-rc --noworkspace
I would like maybe to have one global bazelrc for both local dev ci?
I suppose bazel ignores the localhost cache if does not exist.I do no have strong opinion to block it, feel free to merge
Done.
Makefile, line 43 at r1 (raw file):
Previously, karampok (Konstantinos) wrote…
you can just hard code the BAZELRC value, or someone will overwrite it?
Done.
.buildkite/pipeline_buildlint.yml, line 32 at r1 (raw file):
Previously, karampok (Konstantinos) wrote…
BASELRC=x make godeps instead of env?
or maybe do directly bazel command
Done.
.buildkite/pipeline_buildlint.yml, line 39 at r1 (raw file):
Previously, karampok (Konstantinos) wrote…
you insert argument in the the env (something like arg injection attack)
I would have global the --noworkspace and always use the --bazelrc argument
Done.
By default bazel merges multiple bazelrc as described here: https://docs.bazel.build/versions/master/guide.html#where-are-the-bazelrc-files On CI we don't care about the diskcache, therefore we use --noworkspace_rc now. Also use it in more places.
10eefef
to
37c6a80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 8 of 10 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
It seems that if `--disk-cache` with a valid location is present, bazel will ignore `--remote-cache`. Thus we must override `--disk-cache` to the empty value in the `.bazelrc_ci` file, so that on the CI only the remote cache is used. Also switch to using the bazel cache via grpc. The problem was introduced by #3591
By default bazel merges multiple bazelrc as described here:
https://docs.bazel.build/versions/master/guide.html#where-are-the-bazelrc-files
Therefore we just move the CI bazelrc file into the home folder so the remote-cache is applied.
This change is