Skip to content

feat(autodiscovery): bazel support#7568

Merged
olblak merged 24 commits intoupdatecli:mainfrom
josill:feat/bazel-mod-support
Feb 5, 2026
Merged

feat(autodiscovery): bazel support#7568
olblak merged 24 commits intoupdatecli:mainfrom
josill:feat/bazel-mod-support

Conversation

@josill
Copy link
Contributor

@josill josill commented Jan 17, 2026

Fix #6682

Summary

Implements Bazel Mod (Bzlmod) support for Updatecli with three new components:

  • bazelmod resource plugin - Read/update versions in MODULE.bazel files
  • bazelregistry source plugin - Query Bazel Central Registry for versions
  • bazel autodiscovery plugin - Auto-generate manifests for Bazel dependencies

Tests

cd pkg/plugins/resources/bazelmod && go test -v
cd pkg/plugins/resources/bazelregistry && go test -v
cd pkg/plugins/autodiscovery/bazel && go test -v

Additional Information

  • Custom parser handles multi-line bazel_dep() calls using parenthesis counting
  • Semantic version comparison in condition operations
  • HTTP timeout (30s) and User-Agent with Updatecli version

Checklist

  • Documentation updated
  • All tests pass
  • Follows Updatecli conventions

@josill josill marked this pull request as ready for review January 17, 2026 11:05
@josill josill marked this pull request as draft January 17, 2026 12:45
@josill josill marked this pull request as ready for review January 17, 2026 17:55
@olblak
Copy link
Member

olblak commented Jan 18, 2026

Wow that was fast :D
I didn't have the time to answer on the issue :D

Thanks for the pull request, I am going to need some time to review it

@olblak olblak added enhancement New feature or request autodiscovery All things related to the autodiscovery feature resource-bazel labels Jan 20, 2026
@olblak olblak requested a review from Copilot January 20, 2026 20:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements comprehensive Bazel Mod (Bzlmod) support for Updatecli, adding the ability to manage and auto-update Bazel module dependencies defined in MODULE.bazel files.

Changes:

  • Added bazelregistry source/condition plugin to query the Bazel Central Registry for available module versions
  • Added bazelmod source/condition/target plugin to read and update MODULE.bazel files
  • Added bazel autodiscovery plugin to automatically generate update manifests for Bazel module dependencies

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/plugins/resources/bazelregistry/*.go Implements querying Bazel Central Registry with version filtering, yanked version handling, and HTTP timeout configuration
pkg/plugins/resources/bazelmod/*.go Implements reading/updating MODULE.bazel files with custom parser supporting multi-line bazel_dep() calls and semantic version comparison
pkg/plugins/autodiscovery/bazel/*.go Implements automatic discovery of MODULE.bazel files with matching rules for ignore/only patterns and manifest generation
pkg/core/pipeline/resource/main.go Registers bazelmod and bazelregistry resource plugins
pkg/core/pipeline/autodiscovery/main.go Registers bazel autodiscovery plugin

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@josill
Copy link
Contributor Author

josill commented Jan 26, 2026

Completed the code review

@olblak
Copy link
Member

olblak commented Feb 4, 2026

I had another round and after some testing, I noticed that the Bazel autodiscovery wouldn't work due to the generated condition. I added a commit to remove them.
I need another round of testing, but I think we are getting there

@olblak
Copy link
Member

olblak commented Feb 5, 2026

Thanks, @josill, for the pull request.
It looks good

@olblak olblak merged commit c1199fd into updatecli:main Feb 5, 2026
5 checks passed
@loeffel-io
Copy link

amazing ❤️

@olblak olblak changed the title feat: bazel support feat(autodiscovery): bazel support Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autodiscovery All things related to the autodiscovery feature enhancement New feature or request resource-bazel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: bazel mod support

3 participants