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

Bazel query should specify --output #2712

Merged
merged 1 commit into from
Aug 28, 2019
Merged

Bazel query should specify --output #2712

merged 1 commit into from
Aug 28, 2019

Conversation

morozov
Copy link
Contributor

@morozov morozov commented Aug 23, 2019

If .bazelrc specifies any non-default query output format, skaffold will fail.

The issue has been originally reported as #1322 but then was mistakenly resolved by #1339 which was not merged and in turn was mistakenly closed by 5a519d3.

Expected behavior

Skaffold works regardless of the default output format.

Actual behavior

Skaffold cannot parse the output of bazel query since every source file is prefixed with its kind:

$ skaffold build -v debug
...
source file @go_image_base//image:000.tar.gz
source file @go_debug_image_base//image:config.json
source file @go_debug_image_base//image:001.tar.gz

Information

  • Skaffold version: v0.36.0
  • Operating system: Linux

Steps to reproduce the behavior

$ cd examples/bazel
$ echo "query --output=label_kind" >> .bazelrc

$ skaffold version
v0.36.0

$ skaffold build
Generating tags...
 - gcr.io/k8s-skaffold/skaffold-bazel -> gcr.io/k8s-skaffold/skaffold-bazel:v0.36.0-55-gde10d4a6-dirty
Tags generated in 17.425754ms
Checking cache...
 - gcr.io/k8s-skaffold/skaffold-bazel: FATA[0000] checking cache: getting hash for artifact gcr.io/k8s-skaffold/skaffold-bazel: getting hash for source file /BUILD: lstat source file /BUILD: no such file or directory 

Note that in the output above, "source file" is displayed as part of the name of the files which do not exist.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@morozov
Copy link
Contributor Author

morozov commented Aug 23, 2019

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@morozov
Copy link
Contributor Author

morozov commented Aug 27, 2019

The kokoro job seems stuck. Is there a way to restart it?

@nkubala nkubala added the kokoro:run runs the kokoro jobs on a PR label Aug 27, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Aug 27, 2019
@dgageot dgageot merged commit 9cbc539 into GoogleContainerTools:master Aug 28, 2019
@morozov morozov deleted the issues/1322 branch August 28, 2019 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants