Skip to content

Add "BCR Module Indexing"#416

Merged
lberki merged 1 commit intobazelbuild:mainfrom
jordan-bonser:main
Apr 22, 2026
Merged

Add "BCR Module Indexing"#416
lberki merged 1 commit intobazelbuild:mainfrom
jordan-bonser:main

Conversation

@jordan-bonser
Copy link
Copy Markdown
Contributor

Reviewed-by: jordan.bonser@arm.com # gatekeeper

Reviewed-by: <jordan.bonser@arm.com> # gatekeeper
@meteorcloudy meteorcloudy requested review from Wyverald and meteorcloudy and removed request for jin and lberki April 21, 2026 09:59

# Proposal

I propose we add an `index.json` under the `modules` directory of the registry, which will list the modules that exist in the registry.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO we should put this file in the root directory -- it should be possible for a module named index.json to exist.


As part of adding a module to the BCR, there needs to be a mechanism to ensure that a PR to add a module also has the addition of the module to the `index.json`. One approach to this would be to add logic to a script ran as part of the PR Pipeline, that would ensure the new module exists in the index. The `bcr_validate.py` may be a good candidate for this logic.

## Handling Merge Conflicts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is my biggest concern with a proposal like this, so thanks for devoting a sizeable chunk of text to it. I have just one question regarding the merge driver etc setup: would it allow multiple PRs touching index.json to be submitted without the PR authors needing to sync and resolve conflicts manually?

Say users A and B both submit a PR adding a new module, and both PRs change index.json accordingly. Both PRs are approved at around the same time. A's PR goes in first. When B's PR is about to be submitted, does B get an error, or does the PR submission process automatically run the merge driver? If B does get an error, can they somehow run the merge driver using GitHub's web UI, or will they actually have to resort to using the git CLI themselves?

Copy link
Copy Markdown
Contributor

@lberki lberki left a comment

Choose a reason for hiding this comment

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

Approving because the discussion about a design doc is not supposed to happen on this review but on a discussion or issue thread.

@lberki lberki merged commit f6f4399 into bazelbuild:main Apr 22, 2026
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.

3 participants