Skip to content

Commit

Permalink
Sync one more gofeatures reference (#822)
Browse files Browse the repository at this point in the history
Backend BSR currently does not respect `buf.yaml` dependency pins and
instead it uses the latest synced dependency reference, as [stated in
the
README](https://github.com/bufbuild/modules?tab=readme-ov-file#how-we-handle-dependencies),
which means:

- All `gofeatures` synced references always depended at the latest
`wellknowntypes` available at the moment, not specifically `v27.0` (as
its synced `buf.yaml` suggested). Right now it depends on `v29.1`.
- Latest `gofeatures` reference `v1.36.1` is currently stuck and
unsyncable in BSRs because it does not build, due to a duplicate proto
path: `go_features.proto` file, [recently added to `wellknowntypes`
module in
`v29.2`](https://buf.build/protocolbuffers/wellknowntypes/compare/v29.1..v29.2).

Fix plan is:
- [x] Make sure this is the only `buf.yaml` that pins to a specific
dependency.
- [x] Mark `[email protected]` reference as _skippable_, so it skips to
`v1.36.2` from this PR.
- [x] Set the BSR to respect the pinned deps (as long as they're synced
references/labels). We don't want to do this step before, because the
`gofeatures` dependency to `wellknowntypes` would jump backwards from
`v29.1` (what currently depends on), to `v27.0` (what's synced in the
central bucket).


Then we can merge this PR and release `modules`, so BSR picks up this
new reference and syncs it.
  • Loading branch information
unmultimedio authored Jan 9, 2025
1 parent 74e6984 commit 3f5cbd2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ First, we sync standalone modules. After they succeed, we then sync the modules
which use the latest pushed dependency commit. As long as the dependencies don’t have any breaking
change in the source code, this should be sufficient and stable for upstream modules.

For special cases, we can pin a dependency in the static `buf.yaml` that we control, to force a
managed module depend on a specific synced reference from another managed module. To know if a
managed module has pinned dependencies for a specific reference, take a look at the `buf.yaml` in
that reference's manifest in the `sync` directory.

## Community

For help and discussion regarding Protobuf managed modules, join us on
Expand Down
2 changes: 1 addition & 1 deletion modules/static/protocolbuffers/gofeatures/buf.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: v1
name: buf.build/protocolbuffers/gofeatures
deps:
- buf.build/protocolbuffers/wellknowntypes:v27.0
- buf.build/protocolbuffers/wellknowntypes:v29.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions modules/sync/protocolbuffers/gofeatures/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
{
"name": "v1.36.1",
"digest": "e24c074714bbfe83a51ec4930388d0b3e24c0052f390c92d4fcd8640ac7c67b7017f6d0643e3fb3d63e9bd359040661270cf51d1404fbea7e535cdc83d187d43"
},
{
"name": "v1.36.2",
"digest": "650ee5667b57eaff1cb461cd60994346af0df31632dfb05fc719120d45582c6677ea90cd8fb68c20241ff041b34993a5bbcc1bca4302ed323036da9277d19699"
}
]
}
2 changes: 1 addition & 1 deletion modules/sync/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
{
"module_name": "protocolbuffers/gofeatures",
"latest_reference": "v1.36.1"
"latest_reference": "v1.36.2"
},
{
"module_name": "protocolbuffers/wellknowntypes",
Expand Down

0 comments on commit 3f5cbd2

Please sign in to comment.