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

Update bzlmod and go deps #46

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Update bzlmod and go deps #46

merged 1 commit into from
Jan 22, 2025

Conversation

mortenmj
Copy link
Collaborator

@mortenmj mortenmj commented Sep 29, 2024

Updating so that this repo also consumes remote-apis from bzlmod

github.com/bazelbuild/buildtools v0.0.0-20240918101019-be1c24cc9a44
github.com/bazelbuild/remote-apis v0.0.0-20240926071355-6777112ef7de
github.com/buildbarn/bb-storage v0.0.0-20240928104605-8abbcfab01bc
github.com/golang/mock v1.7.0-rc.1
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably migrate to go.uber.org/mock like in bb-storage here

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mortenmj what do you think? ^

Copy link
Collaborator

Choose a reason for hiding this comment

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

(no one asked, but) I think it'd be OK to do this in a separate change - what do you all think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think fixing that separately makes sense

Copy link
Collaborator

@minor-fixes minor-fixes left a comment

Choose a reason for hiding this comment

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

Only concern is on branch naming (we should pick a policy and be consistent) but the updates look great! Really glad to see the patches start to evaporate :)

@@ -197,6 +197,7 @@
"on": {
"push": {
"branches": [
"main",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does adding main fix? I thought this repo is only using master as the SoT branch

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For this repo it fixes nothing. The pipelines are generated by code that is shared among the Buildbarn components, and at least one (bb-portal) uses main for its primary branch.

github.com/bazelbuild/buildtools v0.0.0-20240918101019-be1c24cc9a44
github.com/bazelbuild/remote-apis v0.0.0-20240926071355-6777112ef7de
github.com/buildbarn/bb-storage v0.0.0-20240928104605-8abbcfab01bc
github.com/golang/mock v1.7.0-rc.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

(no one asked, but) I think it'd be OK to do this in a separate change - what do you all think?

@@ -37,11 +37,11 @@
},
{
"name": "Protobuf generation",
"run": "find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\nbazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\nfind bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\ndone\n"
"run": "if [ -d bazel-bin/pkg/proto ]; then\n find . bazel-bin/pkg/proto -name '*.pb.go' -delete || true\n bazel build $(bazel query --output=label 'kind(\"go_proto_library\", //...)')\n find bazel-bin/pkg/proto -name '*.pb.go' | while read f; do\n cat $f > $(echo $f | sed -e 's|.*/pkg/proto/|pkg/proto/|')\n done\nfi\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

(not for this change, but) this is getting a bit hard to read, and I'd love to send a follow-on to fix that. What direction do you all prefer?

  • moving contents into a dedicated script; workflow calls the script
  • moving workflows to be generated from Jsonnet (since I guess they aren't already); the script can be inlined in a readable way

I'd prefer the first, so that humans can use the same scripts to re-generate proto files easily, but I think other buildbarn repos take the latter approach

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As mentioned above, this is generated by code that is shared among the Buildbarn components. We could fix this, but that fix would happen in bb-storage.

@mortenmj mortenmj merged commit 1a2b94f into master Jan 22, 2025
1 check passed
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.

4 participants