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 @maven//: despite repository-name: enola_maven #419

Open
vorburger opened this issue Mar 4, 2025 · 4 comments
Open

bazel query @maven//: despite repository-name: enola_maven #419

vorburger opened this issue Mar 4, 2025 · 4 comments

Comments

@vorburger
Copy link
Contributor

#401 related follow-up:

E.g. this has:

[DefaultDispatcher-worker-2] INFO org.virtuslab.bazelsteward.core.common.CommandRunner - bazel query @maven//:outdated.repositories --output xml --noshow_progress
[main] ERROR org.virtuslab.bazelsteward.maven.MavenDependencyKind - Failed to extract used maven dependencies. Bazel Steward supports rules_jvm_external 4.0 or newer
[main] WARN org.virtuslab.bazelsteward.app.App - Error happened during detecting available versions for maven. Skipping this dependency kind...
[main] WARN org.virtuslab.bazelsteward.app.App - Error details: bazel query @maven//:outdated.repositories --output xml --noshow_progress
ERROR: No repository visible as '@maven' from main repository

despite repository-name: enola_maven here.

Might this have been an oversight in #402 ?

@vorburger
Copy link
Contributor Author

Actually, this worked great locally; but it's for some strange reason is not working (only) on the GitHub Action (for me).

Perhaps it's for some reason not reading my .bazel-steward.yaml when running on the GitHub Action?!

Perhaps it's someone running an older version of it when running on the GitHub Action?!

vorburger added a commit to vorburger/bazel-steward that referenced this issue Mar 4, 2025
Just to be able to see on logs what version it has actually resolved to.

Because of VirtusLab#419 (comment).
@vorburger
Copy link
Contributor Author

Perhaps it's for some reason not reading my .bazel-steward.yaml when running on the GitHub Action?!

That's it! Here it says:

"By default, Bazel Steward looks for the configuration file in the root of the git repository under one of the following names:"

but then here it starts with --config-path '${{ inputs.configuration-path }}' which here defaults to ./bazel-steward.yaml. But mine is named .bazel-steward.yaml here. Subtle but important difference.

This can probably be worked around by explicitly setting that configuration-path. But in a perfect world, it should probably be more consistent.

IMHO, it should probably better fail when started with a --config-path that it's not actually able to read from.

lukaszwawrzyk pushed a commit that referenced this issue Mar 4, 2025
Just to be able to see on logs what version it has actually resolved to.

Because of
#419 (comment).
@lukaszwawrzyk
Copy link
Collaborator

Indeed it should fail if path is passed explicitly, I fixed that. The default value for github action is not ideal. I think we should leave it empty and the action, if config value is empty, should not pass the flag at all.

@vorburger
Copy link
Contributor Author

👉 #434

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