-
Notifications
You must be signed in to change notification settings - Fork 286
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
Add support for running remote check plugins #3524
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR adds support for invoking of remote Wasm plugins locally. Remote plugins Refs are resolved using the buf.lock file in the input's v2 workspace.
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
doriable
reviewed
Dec 10, 2024
@@ -321,6 +322,7 @@ func testNewWorkspaceProvider(t *testing.T, testModuleDatas ...bufmoduletesting. | |||
bsrProvider, | |||
bsrProvider, | |||
bsrProvider, | |||
bufplugin.NopPluginKeyProvider, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could address this in a follow-up PR, or it might give us a little more confidence here, but we may want to implement something similar to the bufmoduletesting.OmniProvider
stubs.
emcfarlane
commented
Dec 10, 2024
emcfarlane
force-pushed
the
ed/pluginInokeRemote
branch
from
December 13, 2024 18:27
f5c9529
to
457ca75
Compare
doriable
approved these changes
Dec 19, 2024
bufdev
approved these changes
Dec 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for running remote check plugins in
buf lint
andbuf breaking
commands. These plugins are specified as references (<remote/owner/plugin>
) in thebuf.yaml
file and must be pinned to specific versions in thebuf.lock
file.To pin plugin versions, users can run
buf plugin update
command, which updates thebuf.lock
file with the necessary metadata to resolve the plugin version when run. If a plugin reference inbuf.yaml
is not pinned in thebuf.lock
an error is returned prompting the user to pin the plugin version by runningbuf plugin update
. This allows for running checks offline and avoids network access when all plugin data is cached.Arguments can be provided to both local and remote plugins by specifying any space separated commands after the path or reference (e.g.
buf.build/myorg/myplugin --debug
). These args are passed as command line arguments on every run.