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

New grpcadapter package to transcode connect and gRPC-Web #527

Closed
wants to merge 401 commits into from
Closed
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
401 commits
Select commit Hold shift + click to select a range
b574f42
Pool buffers per handler and client (#192)
bufdev Apr 9, 2022
cfcee6f
Mark repository as a work in progress
bufdev Apr 18, 2022
87a8793
Use CodeInternal when user-supplied Codecs can't marshal Status (#201)
akshayjshah Apr 19, 2022
4151ebe
Improve error when clients try bidi over HTTP/1.x (#203)
akshayjshah Apr 19, 2022
08e995b
Fix Make dependency (#202)
akshayjshah Apr 19, 2022
dea5933
Do not return error from Client constructor (#204)
bufdev Apr 20, 2022
8a73466
Cleanup (#206)
bufdev Apr 22, 2022
fd9ace4
Update names in CONTRIBUTING.md (#207)
timostamm May 2, 2022
9161c3d
Rename Specification -> Spec (#208)
akshayjshah May 6, 2022
c35ee25
Factor enveloping and compression out of gRPC (#209)
akshayjshah May 12, 2022
316a3a0
Fix server-side timeout handling (#210)
akshayjshah May 14, 2022
eaacdf5
Returns a more intuitive Connect error if the underlying request is u…
smaye81 May 18, 2022
532e99d
Revert "Returns a more intuitive Connect error if the underlying requ…
akshayjshah May 18, 2022
bba59af
Move gRPC timeout encoding into NewStream
akshayjshah May 12, 2022
5abed41
Improve error message
akshayjshah May 15, 2022
7aefcea
Factor out duplex HTTP client call
akshayjshah May 15, 2022
b35b2ca
Embed instead of copying
akshayjshah May 15, 2022
8f935d0
Rename & move gRPC-specific HTTP mappings
akshayjshah May 15, 2022
4334b8c
Rename & move gRPC-specific error unmarshaling
akshayjshah May 15, 2022
729b6c2
Rename & move gRPC handler and marshaler
akshayjshah May 15, 2022
27d90b0
Rename & move gRPC-specific timeout code
akshayjshah May 15, 2022
b187dcd
Rename & move gRPC utilities
akshayjshah May 15, 2022
3eb41b2
Move header keys to constants, prefix utilities
akshayjshah May 15, 2022
f6aa67a
Factor request URL validation out of gRPC
akshayjshah May 15, 2022
b272a7c
Clean up gRPC protocol receivers
akshayjshah May 15, 2022
8c52c92
Change Code.String() to match Connect protocol
akshayjshah May 15, 2022
fc51508
Factor compression negotiation out of gRPC
akshayjshah May 15, 2022
ce583d9
Factor fallback error-coding wrappers out of gRPC
akshayjshah May 15, 2022
72a923a
Fix lint config for moved code
akshayjshah May 15, 2022
74c75e6
More compact switch in protocol_grpc.go
akshayjshah May 16, 2022
b2b0ec6
Simplify gRPC content-type handling
akshayjshah May 16, 2022
f363c8a
Make it impossible for clients to send trailers
akshayjshah May 16, 2022
cdbd11a
Make it impossible for handlers to read trailers
akshayjshah May 17, 2022
2d55dcc
Pass StreamType to Protocol.WriteRequestHeader
akshayjshah May 17, 2022
cc10761
Use Error.Message() when writing gRPC error data
akshayjshah May 17, 2022
ffcaba1
Factor error detail type conversion out of gRPC
akshayjshah May 17, 2022
28095ae
Move gRPC variable closer to usage
akshayjshah May 17, 2022
383950f
net/http response bodies can't return *Error
akshayjshah May 18, 2022
1aba865
Use CodeUnavailable if host is invalid
akshayjshah May 18, 2022
a1533f6
Rename & move gRPC percent encoding functions
akshayjshah May 18, 2022
e3f15bc
Clarify some gRPC comments
akshayjshah May 18, 2022
2f71b56
No trailers in handler-side senders
akshayjshah May 18, 2022
b8e3cde
Factor http.ResponseWriter flushing out of gRPC
akshayjshah May 18, 2022
a354489
Attach metadata to errors less liberally
akshayjshah May 18, 2022
873b2a4
Improve gRPC error codes and messages
akshayjshah May 18, 2022
dba8bf0
Miscellaneous gRPC cleanups
akshayjshah May 18, 2022
a4bac4e
Add Error protobuf message for Connect protocol
akshayjshah May 15, 2022
73de72a
Add the Connect protocol
akshayjshah May 18, 2022
83fffe2
Switch to Connect in tests and examples
akshayjshah May 18, 2022
948ecbf
Clarify cautionary comments
akshayjshah May 19, 2022
93b578e
Leverage embedding more (#214)
akshayjshah May 19, 2022
f574e7a
Export AsError (#215)
akshayjshah May 19, 2022
3e88d5c
Rename compression options, unexport defaults (#216)
akshayjshah May 19, 2022
e4f4f54
Rename client stream types (#217)
akshayjshah May 19, 2022
ed44973
go get -u ./... (#218)
bufdev May 19, 2022
df55eca
Properly code context errors from HTTPClient.Do (#219)
cyinma May 19, 2022
94b04e0
Revert "Rename client stream types (#217)" (#220)
akshayjshah May 20, 2022
2b3d344
Update golangci-lint (#221)
akshayjshah May 20, 2022
056cb3a
Update CONTRIBUTING.md to include CLA (#224)
buildbreaker May 24, 2022
b6c5859
Revert "Export AsError (#215)" (#223)
akshayjshah May 25, 2022
b79148b
Use streaming Content-Type from protocol (#226)
akshayjshah May 25, 2022
159c801
Improve client streaming ergonomics (#227)
akshayjshah May 27, 2022
c617628
Move connect-go generation to internal/gen (#228)
bufdev May 27, 2022
b710a5e
Special-case errors where h2c is not configured and where connect.Wit…
bufdev May 29, 2022
ddc4b79
Docs & README (#230)
akshayjshah May 29, 2022
8d1aca6
Add automated release notes config (#231)
akshayjshah May 30, 2022
61c6ee6
More links in README (#232)
akshayjshah May 30, 2022
13559b8
Even more links in README (#233)
akshayjshah May 30, 2022
a12a4e2
Add dependabot for GH actions (#235)
akshayjshah May 31, 2022
78eb997
Support old cURL (#234)
akshayjshah May 31, 2022
53cf9e2
Bump actions/checkout from 2 to 3 (#237)
dependabot[bot] May 31, 2022
0b2d75a
Bump actions/cache from 2 to 3 (#236)
dependabot[bot] May 31, 2022
45cb8e9
Change blog link (#239)
bufdev May 31, 2022
9911732
Prep for v0.1.0 (#238)
akshayjshah May 31, 2022
d352270
Update README.md (#240)
bufdev May 31, 2022
5bfc7a1
Make README examples copyable (#242)
bufdev Jun 1, 2022
32691bb
Back to development (#245)
akshayjshah Jun 1, 2022
a05f302
WithInterceptors: Improve ASCII diagram (#246)
abhinav Jun 1, 2022
d1a8867
readme: fix links (#247)
mfridman Jun 2, 2022
7937575
Stencil fewer functions (#253)
akshayjshah Jun 3, 2022
e8c3776
Add basic pull request template (#251)
bufdev Jun 3, 2022
9f157f2
Add issue templates (#250)
bufdev Jun 3, 2022
e62fd97
Fix pull request template (#261)
bufdev Jun 3, 2022
49d8666
Delete "Anything Else" issue template (#260)
bufdev Jun 3, 2022
2196226
Remove comment after "behavior change" in grpc-go (#263)
akshayjshah Jun 3, 2022
4cc2f07
guard against panics in client_stream (#265)
pkwarren Jun 6, 2022
45f8420
fix minCode constant (#266)
pkwarren Jun 6, 2022
3eb51f4
ensure consistent nil response handling (#267)
pkwarren Jun 6, 2022
5327a2a
Fix Connect header constant (#268)
akshayjshah Jun 6, 2022
a6c0ca9
Use registration order to prioritize client Accept-Encoding (#269)
akshayjshah Jun 6, 2022
23f7ce0
Prepare for v0.1.1 (#270)
akshayjshah Jun 6, 2022
0d88c49
Back to development (#273)
akshayjshah Jun 6, 2022
108eb83
improve test coverage in handler (#271)
pkwarren Jun 6, 2022
6442b1a
add tests for WithCompressMinBytes (#278)
pkwarren Jun 7, 2022
38baeb3
add test for custom handler/client compression (#280)
pkwarren Jun 7, 2022
bd37523
add tests for connect timeout handling (#281)
pkwarren Jun 7, 2022
e7fd24b
add tests for client init failures (#282)
pkwarren Jun 7, 2022
871250f
Fix two small Godoc mix-ups (#286)
timostamm Jun 8, 2022
c9b9bcb
fix examples in README (#289)
pkwarren Jun 9, 2022
698e1f1
verify error when interceptor returns wrong response (#291)
pkwarren Jun 10, 2022
9b02200
add timeout test to streaming client call (#292)
pkwarren Jun 10, 2022
ae60446
Replace ioutil.Discard with io.Discard (#294)
bufdev Jun 10, 2022
8be1a7c
Always use unix-style paths for CodeGeneratorResponses (#298)
bufdev Jun 18, 2022
86fbc21
add CI github actions build for Windows (#303)
pkwarren Jun 20, 2022
996a02b
attempt to fix flaky timeout tests (#305)
pkwarren Jun 20, 2022
299be22
add test for gRPC call responses without Trailers
lixin9311 Jun 8, 2022
c5c90f9
Require grpc-status trailer
pkwarren Jun 9, 2022
9037234
fix race condition caught by unit tests (#306)
pkwarren Jun 22, 2022
172b9af
skip large ping tests with -short (#307)
pkwarren Jun 22, 2022
9d48732
Dedupe compression algorithm names (#308)
mattrobenolt Jun 23, 2022
a23eba2
remove unused no-op stream code paths (#290)
pkwarren Jun 23, 2022
5f1c21e
add support for ReadMaxBytes option (#311)
pkwarren Jul 7, 2022
c4893ff
enable ci/windows testing on go 1.19rc1 (#315)
pkwarren Jul 8, 2022
fa42a99
Rework streaming interceptors (#316)
akshayjshah Jul 12, 2022
84b2b2f
Update to Go 1.19 RC2 (#317)
akshayjshah Jul 13, 2022
ac4b4ee
fix issues on 32-bit platforms (#318)
pkwarren Jul 14, 2022
2450ea2
improve decompress signature (#319)
pkwarren Jul 14, 2022
3e6fbb6
Add an option for panic-recovering interceptor (#320)
akshayjshah Jul 14, 2022
1030d2e
Map HTTP/2 RST_STREAM codes back to RPC codes (#321)
akshayjshah Jul 15, 2022
169a45d
Prepare for v0.2.0 (#322)
akshayjshah Jul 18, 2022
571fe9c
Back to development (#325)
akshayjshah Jul 18, 2022
7131996
Send binary data with error details (#329)
akshayjshah Jul 26, 2022
6feed3e
Prepare for v0.3.0 (#332)
akshayjshah Aug 1, 2022
029a175
Back to development (#336)
akshayjshah Aug 1, 2022
1053a52
add permission block to ci job (#338)
rubensf Aug 2, 2022
d3ae856
Add Studio and connect-web to README (#339)
akshayjshah Aug 4, 2022
7af3bd4
update ci actions to use go 1.19 (#340)
pkwarren Aug 5, 2022
a9df143
add SendMaxBytes option for clients and handlers (#341)
pkwarren Aug 10, 2022
6de8c03
Handle Go keywords in Protobuf definitions (#348)
akshayjshah Aug 16, 2022
bb13b7a
Update dependencies (incl. golangci-lint) (#347)
akshayjshah Aug 17, 2022
398f155
In iterators, allocate new msg for each Receive (#350)
akshayjshah Aug 17, 2022
b2db5b9
Add option to disable gzip grpc-accept-encoding (#349)
alexandrem Aug 17, 2022
98d4580
add a test for concurrent bidi streams (#352)
pkwarren Aug 22, 2022
edbc6ba
Add helper to write RPC errors from HTTP middleware (#337)
rhbuf Aug 29, 2022
1732051
Shorten stability section of README (#353)
akshayjshah Aug 29, 2022
89b4d66
Fix error code for ReadMaxBytes (#354)
akshayjshah Sep 1, 2022
ffe5175
Add support for http.MaxBytesHandler (#355)
akshayjshah Sep 3, 2022
cce7065
Add support for JSON with an explicit UTF-8 charset (#358)
buildbreaker Sep 14, 2022
19c93b8
Add bypass approval github workflow (#365)
rubensf Sep 23, 2022
062122c
Expose peer information to handlers and clients (#364)
akshayjshah Sep 23, 2022
de88976
Update dependencies
akshayjshah Oct 4, 2022
7a16944
Prepare for v1.0
akshayjshah Oct 4, 2022
8df2a0b
Back to development (#371)
akshayjshah Oct 4, 2022
113e192
Disable abandoned linters (#372)
akshayjshah Oct 4, 2022
455a225
Bump hmarr/auto-approve-action from 2.4.0 to 3.0.0 (#375)
dependabot[bot] Oct 17, 2022
773ad30
Example of a possible fix for indicating server errors (#374)
joshcarp Oct 17, 2022
73c4d70
Rename IsWireErr -> IsWireError (#376)
akshayjshah Oct 18, 2022
c2104c6
Prepare for v1.1.0 (#377)
akshayjshah Oct 18, 2022
f2017b1
Return to development (#379)
akshayjshah Oct 19, 2022
0d1a648
Update Github Actions outputs to new format (#382)
rubensf Oct 25, 2022
67b6179
Bump hmarr/auto-approve-action from 3.0.0 to 3.1.0 (#381)
dependabot[bot] Oct 25, 2022
ddd4bd7
Update bypass approval github workflow (#384)
rubensf Oct 26, 2022
a366d93
Update Buf CLI to latest (#387)
akshayjshah Nov 5, 2022
52877cf
Add SendHeaders to BidiStreamForClient
Linniem Nov 3, 2022
7991753
Make client.Send(nil) send request headers
akshayjshah Nov 5, 2022
40a2428
Add RPC protocol to Peer (#394)
akshayjshah Nov 18, 2022
c6b5562
Bump test coverage to 90% (#395)
joshcarp Nov 18, 2022
8e45b51
Fix panic on zero send from server (#398)
joshcarp Nov 18, 2022
241768d
Format imports with GCI (#407)
akshayjshah Nov 29, 2022
9a4d409
Ensure streaming ResponseWriters implement Flush (#406)
akshayjshah Nov 30, 2022
7a79704
Close conn when HTTP/1.1 clients call bidi methods (#408)
akshayjshah Nov 30, 2022
c16c8c9
add API to make it easier to work with ErrorDetail if you have/want a…
jhump Dec 1, 2022
63d5a8d
Send gRPC error metadata only as HTTP trailers (#410)
akshayjshah Dec 5, 2022
63b817f
Improve panic message on invalid handler returns (#415)
akshayjshah Dec 8, 2022
4ab1190
Add support for Connect-Protocol-Version header (#416)
akshayjshah Dec 8, 2022
528158c
Import base go file even if there are no base types required (#418)
joshcarp Dec 9, 2022
4c75d85
Don't clobber custom User-Agents (#423)
akshayjshah Dec 19, 2022
eab7f2a
Prepare for v1.4.1 (#425)
akshayjshah Dec 20, 2022
40c8086
Back to development (#428)
akshayjshah Dec 20, 2022
fecf044
Document reserved headers more prominently (#431)
akshayjshah Dec 22, 2022
0654729
Update copyright year to 2023 (#434)
joshcarp Jan 4, 2023
bddd2f9
Add NewWireError (#437)
akshayjshah Jan 13, 2023
0a3bfe3
Add PR Title Linter (#439)
rubensf Jan 18, 2023
15a843b
Match Content-Type charset case-insensitively (#440)
ichizero Jan 26, 2023
8d3aaed
Prepare for v1.5.0 (#441)
akshayjshah Jan 26, 2023
cb460f1
Back to development (#442)
akshayjshah Jan 26, 2023
4c2c9a9
Minimize allocations writing User-Agent header (#446)
mattrobenolt Jan 27, 2023
e488bce
Minimize allocations parsing Content-Type (#444)
mattrobenolt Jan 27, 2023
5999752
Minimize allocations on header access (#445)
mattrobenolt Jan 28, 2023
e0629a7
Optimize Peer lookups (#447)
mattrobenolt Jan 28, 2023
4f16fe0
Prepare for v1.5.1 (#448)
akshayjshah Feb 1, 2023
b4f3795
Back to development (#449)
akshayjshah Feb 1, 2023
81974b9
Update to Go 1.20 (#454)
bufdev Feb 9, 2023
dfa669e
More explicit error on empty JSON bodies (#459)
akshayjshah Feb 14, 2023
0b3c43c
Use lowercase keys for gRPC-web trailers appended to the response bod…
timostamm Feb 15, 2023
994cf42
Prepare for v1.5.2 (#463)
akshayjshah Feb 15, 2023
08a4acf
Back to development (#464)
akshayjshah Feb 15, 2023
651016d
Improve errors for outdated protobuf runtimes (#465)
akshayjshah Feb 18, 2023
4711715
Clarify purpose of handler_stream_test.go (#472)
Hirochon Mar 6, 2023
6118a20
Parse the url only once per Client (#467)
mattrobenolt Mar 6, 2023
d7a251e
Switch README to buf curl (#474)
akshayjshah Mar 14, 2023
7f83f19
Check protobuf formatting in make lint (#476)
akshayjshah Mar 18, 2023
01c75ca
Bump actions/setup-go from 3 to 4 (#481)
dependabot[bot] Mar 21, 2023
d9a1ba3
StreamType constants should not be untyped numerics (#486)
jhump Mar 24, 2023
1b446af
Client.CallServerStream should populate spec and peer of Request (#487)
jhump Mar 24, 2023
c1c69ea
Improve comments & add procedure consts to generated code (#480)
akshayjshah Mar 25, 2023
b6c185f
Prepare for v1.6.0 (#489)
akshayjshah Apr 3, 2023
64dbe18
Back to development (#490)
akshayjshah Apr 3, 2023
c80677b
Connect HTTP Get support (#478)
jchadwick-buf Apr 6, 2023
c241c0e
Fix WithCompression to behave like WithAcceptCompression (#493)
jhump Apr 11, 2023
6b6a0b8
Add APIs to make and handle conditional GETs (#494)
akshayjshah Apr 18, 2023
3ee0869
Prepare for v1.7.0 (#496)
jchadwick-buf Apr 19, 2023
b41ccea
Back to development (#497)
jchadwick-buf Apr 19, 2023
e04e4bd
Prefix comments with correct identifier name (#498)
cuishuang Apr 21, 2023
acc59cb
Implement fmt.Stringer interface for StreamType (#495)
svrana May 10, 2023
783d367
Move asMaxBytesError to error.go (#504)
bufdev May 10, 2023
555c1c0
Upgrade tool dependencies (#505)
bufdev May 12, 2023
d82d472
Fix Makefile quotes (#508)
bufdev May 12, 2023
17eb88d
Expose request method of unary requests to clients and server handler…
jhump May 17, 2023
b16fbd1
Expose HTTP method in unary handlers (#509)
akshayjshah May 17, 2023
43a6f83
Always close response body in CloseRead (#515)
pkwarren May 30, 2023
728fde3
Prepare for v1.8.0 (#516)
jchadwick-buf May 31, 2023
aaa215c
Back to development (#517)
jchadwick-buf May 31, 2023
c99bd5a
Discard unknown JSON fields by default (#518)
akshayjshah Jun 5, 2023
e0fed67
Lint for explicit import aliases (#520)
zchee Jun 15, 2023
29a06c7
Allow clients to set Host in headers (#522)
emcfarlane Jun 16, 2023
3d7bd74
Use switch based HTTP router rather than ServeMux (#519)
mattrobenolt Jun 16, 2023
513111c
Cache mapping of methods to protocol handlers (#525)
emcfarlane Jun 20, 2023
af933dc
Init connect transcoding handler
emcfarlane Jun 19, 2023
cc73fb9
Fixes for connect transcoding
emcfarlane Jun 19, 2023
824d696
Handle unary limits and GET requests
emcfarlane Jun 21, 2023
3147f5f
Support Te trailers for gRPC spec
emcfarlane Jun 21, 2023
8421582
Cleanup linting issues
emcfarlane Jun 21, 2023
24ca24b
Drop gRPC WebText support
emcfarlane Jun 21, 2023
20c3d45
Add MiddlewareOption to reduce option scope
emcfarlane Jun 21, 2023
416d971
Canonicalize Connect Streaming Trailer names (#528)
jchadwick-buf Jun 21, 2023
a482526
Fix canonicalize trailer headers
emcfarlane Jun 21, 2023
2ba61a8
Fix gRPC-web no headers with trailers
emcfarlane Jun 22, 2023
2fc50de
Update types to NewGRPCAdapter with AdapterOptions
emcfarlane Jun 22, 2023
a2a922c
DEBUG: GRPCAdapter fails on unary proxy calls
emcfarlane Jun 22, 2023
c417d65
Skip GRPC Adapter testing
emcfarlane Jun 22, 2023
1e9d418
Fix connect unary buffered writes
emcfarlane Jun 23, 2023
a88b0b7
Use GRPCAdapterOption for NewGRPCAdapter config
emcfarlane Jun 23, 2023
291e3d3
Export max URL size option (#529)
jhump Jun 23, 2023
ece2e2b
Address feedback comments
emcfarlane Jun 23, 2023
a93cd05
Use strings.Builder for gRPC percent methods (#531)
emcfarlane Jun 26, 2023
c019158
Create grpcadapter package
emcfarlane Jun 26, 2023
46ff1ed
Reduce marshaling allocations with MarshalAppend (#503)
emcfarlane Jun 27, 2023
daa0efc
Simplify code when pooled buffers aren't returned (#532)
pkwarren Jun 27, 2023
5e1046d
Prepare for v1.9.0 (#534)
jchadwick-buf Jun 27, 2023
131bbc8
Back to development (#537)
jchadwick-buf Jun 27, 2023
7406ad6
Capture unexpected io.EOF errors as io.ErrUnexpectedEOF (#533)
emcfarlane Jun 28, 2023
0849a37
Surface io.EOF errors as io.ErrUnexpectedEOF for gRPC (#539)
emcfarlane Jun 30, 2023
bd0172f
Feedback fix code layout
emcfarlane Jun 30, 2023
574b6cb
Merge branch 'main' into edward/transcode-handler
emcfarlane Jun 30, 2023
06777b1
Stream unary if Content-Length is set
emcfarlane Jul 3, 2023
6b7c01d
Add buffer pool
emcfarlane Jul 3, 2023
47028aa
Move to grpcadapt package
emcfarlane Jul 3, 2023
1644a53
Document Resource Exhausted errors
emcfarlane Jul 3, 2023
070beda
Fix formatting
emcfarlane Jul 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

5 changes: 2 additions & 3 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand Down Expand Up @@ -61,8 +60,8 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
akshay@akshayshah.org. All complaints will be reviewed and investigated
promptly and fairly.
conduct@buf.build. All complaints will be reviewed and investigated promptly
and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
Expand Down
74 changes: 74 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Contributing
============

We'd love your help making Connect better!

If you'd like to add new exported APIs, please [open an issue][open-issue]
describing your proposal — discussing API changes ahead of time makes
pull request review much smoother. In your issue, pull request, and any other
communications, please remember to treat your fellow contributors with
respect!

Note that you'll need to sign [Buf's Contributor License Agreement][cla]
before we can accept any of your contributions. If necessary, a bot will remind
you to accept the CLA when you open your pull request.

## Setup

[Fork][fork], then clone the repository:

```
mkdir -p $GOPATH/src/github.com/bufbuild
cd $GOPATH/src/github.com/bufbuild
git clone git@github.com:your_github_username/connect-go.git
cd connect-go
git remote add upstream https://github.com/bufbuild/connect-go.git
git fetch upstream
```

Make sure that the tests and the linters pass (you'll need `bash` and the
latest stable Go release installed):

```
make
```

## Making Changes

Start by creating a new branch for your changes:

```
cd $GOPATH/src/github.com/bufbuild/connect-go
git checkout main
git fetch upstream
git rebase upstream/main
git checkout -b cool_new_feature
```

Make your changes, then ensure that `make` still passes. (Unless you're
changing `protoc-gen-connect-go`, you can use the standard `go build ./...` and
`go test ./...` while you're coding.) When you're satisfied with your changes,
push them to your fork.

```
git commit -a
git push origin cool_new_feature
```

Then use the GitHub UI to open a pull request.

At this point, you're waiting on us to review your changes. We *try* to respond
to issues and pull requests within a few business days, and we may suggest some
improvements or alternatives. Once your changes are approved, one of the
project maintainers will merge them.

We're much more likely to approve your changes if you:

* Add tests for new functionality.
* Write a [good commit message][commit-message].
* Maintain backward compatibility.

[fork]: https://github.com/bufbuild/connect-go/fork
[open-issue]: https://github.com/bufbuild/connect-go/issues/new
[cla]: https://cla-assistant.io/bufbuild/connect-go
[commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Bug report
about: Let us know about a bug
title: ''
labels: bug
assignees: ''

---

**Describe the bug**

As clearly as you can, please tell us what the bug is.

**To Reproduce**

Help us to reproduce the buggy behavior. Ideally, you'd provide a
self-contained test that shows us the bug:

```bash
mkdir tmp && cd ./tmp
go mod init example
go get github.com/bufbuild/connect-go
touch example_test.go
```

And in `example_test.go`:

```go
package bugreport

func TestThatReproducesBug(t *testing.T) {
// your reproduction here
}
```

**Environment (please complete the following information):**
- `connect-go` version or commit: (for example, `v0.1.0` or `5bfc7a1b440ebffdc952d813332e3617ca611395`)
- `go version`: (for example, `go version go1.18.3 darwin/amd64`)
- your complete `go.mod`:

```go
```

**Additional context**
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest a new feature or improvement
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
What's the problem? For example, "I'm always frustrated when..."

**Describe the solution you'd like**
What would you like to have `connect-go` do? How should we solve the problem?

**Describe alternatives you've considered**
If you've proposed a solution, are there any alternatives? Why are they worse
than your preferred approach?

**Additional context**
Add any other context or screenshots about the feature request here.
72 changes: 0 additions & 72 deletions .github/codeql-analysis.disabled.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Before submitting your PR:** Please read through the contribution guide at https://github.com/bufbuild/connect-go/blob/main/.github/CONTRIBUTING.md
16 changes: 16 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: Enhancements
labels:
- enhancement
- title: Bugfixes
labels:
- bug
- title: Other changes
labels:
- "*"
42 changes: 42 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ci
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
schedule:
- cron: '15 22 * * *'
workflow_dispatch: {} # support manual runs
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-connect-ci-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-connect-ci-
- name: Test
run: make test
- name: Lint
# Often, lint & gofmt guidelines depend on the Go version. To prevent
# conflicting guidance, run only on the most recent supported version.
# For the same reason, only check generated code on the most recent
# supported version.
if: matrix.go-version == '1.20.x'
run: make checkgenerate && make lint
12 changes: 12 additions & 0 deletions .github/workflows/emergency-review-bypass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Bypass review in case of emergency
on:
pull_request:
types:
- labeled
permissions:
pull-requests: write
jobs:
approve:
if: github.event.label.name == 'Emergency Bypass Review'
uses: bufbuild/base-workflows/.github/workflows/emergency-review-bypass.yaml@main
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/notify-approval-bypass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR Approval Bypass Notifier
on:
pull_request:
types:
- closed
branches:
- main
permissions:
pull-requests: read
jobs:
approval:
uses: bufbuild/base-workflows/.github/workflows/notify-approval-bypass.yaml@main
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/pr-title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint PR Title
# Prevent writing to the repository using the CI token.
# Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
pull-requests: read
on:
pull_request:
# By default, a workflow only runs when a pull_request's activity type is opened,
# synchronize, or reopened. We explicity override here so that PR titles are
# re-linted when the PR text content is edited.
types:
- opened
- edited
- reopened
- synchronize
jobs:
lint:
uses: bufbuild/base-workflows/.github/workflows/pr-title.yaml@main
33 changes: 0 additions & 33 deletions .github/workflows/test.yml

This file was deleted.

Loading
Loading