Skip to content
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

[misc] buf cli proto lint, format and generate #3470

Open
wants to merge 99 commits into
base: main
Choose a base branch
from
Open

Conversation

pnmcosta
Copy link
Contributor

@pnmcosta pnmcosta commented Mar 9, 2025

Describe your changes

This PR introduces the buf cli tool.

It offers various features, including code generation, breaking change detection, linting, and formatting, to assist with Protobuf development and maintenance.

Source: https://buf.build/docs/cli/

One of the challenges with Protobuf code generation is the complexity of working with protoc and plugins. Managing and maintaining a stable environment locally on a single machine is hard enough given the complex web of different compiler and plugin versions. The problem is compounded as you scale out code generation across many developers, and often results in a series of ugly bash scripts shared between team members.

Source: https://buf.build/docs/generate/overview/

Buf's remote plugins remove a key obstacle to generating code from Protobuf files—protoc plugins are developed across many languages, and manual installation is inconsistent as a result. Managing and maintaining a stable environment on a single machine is hard enough, and the problem is compounded as you scale out code generation across many developers.

Source: https://buf.build/docs/bsr/remote-plugins/overview/

Quickstart: https://buf.build/docs/cli/quickstart/#generate-go-and-connect-stubs
Generate Tutorial: https://buf.build/docs/generate/tutorial/
Breaking Tutorial: https://buf.build/docs/breaking/tutorial/
Lint Tutorial: https://buf.build/docs/lint/tutorial/#inspect-the-workspace

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

pascal-fischer and others added 30 commits January 27, 2025 17:47
Client-side forward handling

Co-authored-by: Viktor Liu <[email protected]>

---------

Co-authored-by: Viktor Liu <[email protected]>
* add peers manager

* Extend peers manager to support retrieving all peers

Signed-off-by: bcmmbaga <[email protected]>

* add network map calc

* move integrations interface

* update management-integrations

* merge main and fix

* go mod tidy

* [management] port forwarding add peer manager fix network map (#3264)

* [management] fix testing tools (#3265)

* Fix net.IPv4 conversion to []byte

* update test to check ipv4

---------

Signed-off-by: bcmmbaga <[email protected]>
Co-authored-by: bcmmbaga <[email protected]>
Co-authored-by: Zoltán Papp <[email protected]>
Add new package ipfwdstate that implements reference counting for IP forwarding
state management. This allows multiple usage to safely request IP forwarding
without interfering with each other.
* add peers ip and name filters

Signed-off-by: bcmmbaga <[email protected]>

* add get peers filter

Signed-off-by: bcmmbaga <[email protected]>

* fix get account peers

Signed-off-by: bcmmbaga <[email protected]>

* Extend GetAccountPeers store to support filtering by name and IP

Signed-off-by: bcmmbaga <[email protected]>

* Fix get peers references

Signed-off-by: bcmmbaga <[email protected]>

---------

Signed-off-by: bcmmbaga <[email protected]>
The nhooyr.io/websocket package was renamed to github.com/coder/websocket when
the project was transferred to "coder" as the new maintainer.

Use the new import path and update go.mod and go.sum accordingly.

Signed-off-by: Christian Stewart <[email protected]>
* fix tag for get endpoint

* update labels
# Conflicts:
#	client/cmd/testutil_test.go
#	client/firewall/iptables/router_linux.go
#	client/firewall/nftables/router_linux.go
#	client/firewall/uspfilter/allow_netbird.go
#	client/firewall/uspfilter/allow_netbird_windows.go
#	client/firewall/uspfilter/uspfilter_test.go
#	client/internal/engine.go
#	client/internal/engine_test.go
#	client/server/server_test.go
#	go.mod
#	go.sum
#	management/client/client_test.go
#	management/cmd/management.go
#	management/proto/management.pb.go
#	management/proto/management.proto
#	management/server/account.go
#	management/server/account_test.go
#	management/server/dns_test.go
#	management/server/http/handler.go
#	management/server/http/testing/testing_tools/tools.go
#	management/server/integrations/port_forwarding/controller.go
#	management/server/management_proto_test.go
#	management/server/management_test.go
#	management/server/nameserver_test.go
#	management/server/peer.go
#	management/server/peer_test.go
#	management/server/route_test.go
Base automatically changed from feature/flow to main March 20, 2025 16:05
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.

8 participants