Conversation
Signed-off-by: Sri Krishna <skrishna@buf.build>
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
|
Tbh I'm not sure this will work, there is a check in the BSR backend that makes sure only the BSR syncer (and may be BSR admin, I will check) can push to modules marked as managed. Could you do a test on an ephemeral BSR first? I'll ping you internally with details. |
|
This feature is allowed and enabled in the public MT BSR now, please retry. One important note: this is allowed for all labels in both I'd recommend to disable manual pushes to |
We want |
Ok yes, in that case you'd want to keep
Correct, if someone depends on
Correct, but if/when
But I think that's ok for your needs? |
Yeah, we should be good. We can ask people to pin to a release version if depending on main is causing an issue. |
unmultimedio
left a comment
There was a problem hiding this comment.
Before merging, you might wanna update the branch, so it retries again and this PR branch is pushed?
https://buf.build/bufbuild/protovalidate/docs/sk/buf-push-ci |
I do not think we can push commits to the BSR's Let's say a new rule is added to We have to expect that users start using the new rule, but protovalidate implementations will not validate the new rule as expected: Most will raise an error for the unknown rule, but some will not (a silent correctness bug). Until we cut corresponding implementation releases, the only possible fix for the user is to pin to older version in buf.yaml. This problem already exists today, but only for the short window in time between protovalidate release and implementation releases. If we make this window bigger, the problem will become bigger. |
Good point. You could tweak this repo that if the Git's repo is |
unmultimedio
left a comment
There was a problem hiding this comment.
That's fine, but don't you want to push Git's main to a non-default BSR label so you're able to test your other implementations?
Signed-off-by: Sri Krishna <skrishna@buf.build>
I'll do this in a separate PR. |
| push: false | ||
| archive: false | ||
| token: ${{ secrets.BUF_TOKEN }} | ||
| push: ${{ github.ref != 'refs/heads/main' && github.event_name == 'push' }} |
There was a problem hiding this comment.
On every push in a PR the workflow was triggered twice. Once by the push event and also by the pull_request event. The way checkout worked in both the cases was different. While push did checkout a branch. The pull_request event checked out in detached head state. This resulted in the buf cli unable to determine the branch.
There was a problem hiding this comment.
cc @emcfarlane you're a bit more familiar with the Github action settings, do you see something in here that can be fixed in these settings?
There was a problem hiding this comment.
This goes into label behaviour. A github checkout is not the current commit, but the commit merged onto main. This is very useful for testing as it will capture any regressions that would otherwise be missed once merged into main. But this fails in buf because the we don't take a label argument but resolve it using the remote URL. This will always fail to resolve the detached state as this commit does not exist on the remote. So if you must push on the "pull_request" event we have to disable the git resolution feature of buf. I think there may also be other events that could be used.
This enables pushing to the BSR. Managed modules only push releases. This will make it so that every commit is available on the BSR. This helps with developing/testing features as they are added to protovalidate between releases. For example, the protovalidate-go uses generated SDKs and without the intermediate commits on BSR, it is impossible to get the updated gen code.