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

Gerrit failing with Bazel@HEAD #8506

Closed
davido opened this issue May 29, 2019 · 3 comments
Closed

Gerrit failing with Bazel@HEAD #8506

davido opened this issue May 29, 2019 · 3 comments

Comments

@davido
Copy link
Contributor

davido commented May 29, 2019

On most recent Bazel version (b2fac74) and Gerrit@HEAD (039faeaa58e70d8adc5e81c37c02253529efd52b) the build is failing:

$ b10 build :release
INFO: Invocation ID: 82712434-7693-4d6a-8beb-299577ac363b
DEBUG: /home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/external/bazel_toolchains/rules/version_check.bzl:45:9: 
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '0.25.2'
DEBUG: /home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/external/bazel_toolchains/rules/version_check.bzl:45:9: 
Current running Bazel is not a release version and one was not defined explicitly in rbe_autoconfig target. Falling back to '0.25.2'
DEBUG: /home/davido/.cache/bazel/_bazel_davido/5c01f4f713b675540b8b424c5c647f63/external/bazel_skylib/lib/versions.bzl:96:13: Current Bazel is not a release version; cannot check for compatibility. Make sure that you are running at least Bazel 0.25.0.
INFO: Call stack for the definition of repository 'webcomponentsjs' which is a bower_archive (rule definition at /home/davido/projects/gerrit2/tools/bzl/js.bzl:120:17):
 - /home/davido/projects/gerrit2/lib/js/bower_archives.bzl:166:5
 - /home/davido/projects/gerrit2/WORKSPACE:1349:1
ERROR: An error occurred during the fetch of repository 'webcomponentsjs':
   Traceback (most recent call last):
	File "/home/davido/projects/gerrit2/tools/bzl/js.bzl", line 67
		_run_npm_binary_str(ctx, ctx.attr._bower_archive, [])
	File "/home/davido/projects/gerrit2/tools/bzl/js.bzl", line 51, in _run_npm_binary_str
		" ".join(([python_bin, ctx.path(ctx.attr....))
sequence element must be a string (got 'path')
ERROR: /home/davido/projects/gerrit2/polygerrit-ui/app/BUILD:7:1: no such package '@webcomponentsjs//': Traceback (most recent call last):
	File "/home/davido/projects/gerrit2/tools/bzl/js.bzl", line 67
		_run_npm_binary_str(ctx, ctx.attr._bower_archive, [])
	File "/home/davido/projects/gerrit2/tools/bzl/js.bzl", line 51, in _run_npm_binary_str
		" ".join(([python_bin, ctx.path(ctx.attr....))
sequence element must be a string (got 'path') and referenced by '//polygerrit-ui/app:polygerrit_ui'
ERROR: Analysis of target '//:release' failed; build aborted: no such package '@webcomponentsjs//': Traceback (most recent call last):
	File "/home/davido/projects/gerrit2/tools/bzl/js.bzl", line 67
		_run_npm_binary_str(ctx, ctx.attr._bower_archive, [])
	File "/home/davido/projects/gerrit2/tools/bzl/js.bzl", line 51, in _run_npm_binary_str
		" ".join(([python_bin, ctx.path(ctx.attr....))
sequence element must be a string (got 'path')
INFO: Elapsed time: 0.475s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (27 packages loaded, 126 targets configured)

The culprit seems to be this method in js.bzl:

# for use in repo rules.
def _run_npm_binary_str(ctx, tarball, args):
    python_bin = ctx.which("python")
    return " ".join([
        python_bin,
        ctx.path(ctx.attr._run_npm),
        ctx.path(tarball),
    ] + args)

To reproduce, clone recursively Gerrit Code Review and run: bazel-at-head build :release.

All is fine on Bazel 0.26.0.

@laurentlb, @philwo Any idea, why we have not noticed this breakage on Gerrit build on Bazel CI?

@laurentlb
Copy link
Contributor

It looks like Gerrit build is failing: https://buildkite.com/bazel/gerrit/builds/2821#f1c9b046-3e7a-4277-acfb-a06ff95c8dfe

On the Bazelisk pipeline, there's no failure. I think this is because we test at the last green commit.

The error you see is caused by the flag incompatible_string_join_requires_strings.

@laurentlb
Copy link
Contributor

fyi, we're going to improve the error message: #8507

@davido
Copy link
Contributor Author

davido commented May 29, 2019

Thanks for the quick reply! It would be definitely helpful if the error message would reference the relevant flag.

@davido davido closed this as completed May 29, 2019
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

No branches or pull requests

2 participants