* chore: update to Golang 1.23
* chore: configure cci to build with 1.23
Signed-off-by: Or Shachar <orchoock@gmail.com>
* Update config.yml
---------
Signed-off-by: Or Shachar <orchoock@gmail.com>
Co-authored-by: Scott Blum <dragonsinth@gmail.com>
* Add functionality to export proto files
Added a new function, `WriteProtoFiles` in `desc_source.go` which is used to generate .proto files. The process involves resolving symbols from the descriptor source and writing their definitions to a designated output directory. The corresponding flag `--proto-out` has been included in `grpcurl.go` to allow users to specify the directory path.
* Refactor file creation error handling
The code for file creation and error handling in desc_source.go has been refactored. Previously, the file closure operation was executed irrespective of whether the file was created successfully or not. Now, the file will only be closed if it was successfully created, improving error handling.
* Update 'proto-out' command to 'proto-out-dir'
The command for exporting proto files and setting the output directory has been updated from 'proto-out' to 'proto-out-dir'. This change has been made both in the README and the grpcurl go file. This makes the command name more descriptive, accurately reflecting its functionality.
* fix import sort
* Reorder file close operation in error handling
The file close operation has been moved within the error handling of the 'PrintProtoFile' function. Previously, it was being executed before this function, now it's executed immediately after. Moreover, an additional close operation has been added after the function success ensuring the file is properly closed in all scenarios.
* Update grpcurl commands in README
The grpcurl commands for exporting proto files and protoset files in the README are updated. The IP address has been changed to localhost and port number to '8787'. Also, the service name is adjusted to 'my.custom.server.Service'. Instructions for use of specific command options are added for enhanced clarity.
* Refactor error handling in file creation
The code responsible for error handling during file creation in the desc_source.go file has been streamlined. This modification simplifies the code by reducing unnecessary condition checks and redundant file closure action after an error has occurred.
* Refactor proto file writing into separate function
The file writing process for protobuf files has been extracted into a new function called writeProtoFile(). This refactoring simplifies the main function. The code is cleaner and more manageable this way, improving maintainability and readability.
* Refactor writeProtoFile function for better error handling
Streamlined the writeProtoFile function in desc_source.go file. Simplified path calculations and improved error messages for file-creation functions, making it easier to trace the exact point of failure and enhance the debugging process.
* update to latest jhump/protoreflect
* be lenient when possible if server cannot furnish all dependencies
* move linting back to go 1.21 instead of latest go 1.22
* make staticcheck happy
* Enable xDS credentials
This change should be relatively straightforward. It is a noop outside of the
context of xDS (as demonstrated by the fact that the tests all pass), but it
enables xDS-provided certificates (i.e. the ones that would be
provided/specified in GRPC_XDS_BOOTSTRAP). See proposal
[A29](https://github.com/grpc/proposal/blob/master/A29-xds-tls-security.md#go)
for additional detail.
* Only enable xds credentials if the target is an xDS target
* Update after merge
* Added initial support for -t flag to show timings
Shows very basic timing data for the Dial stage (TLS setup and
BlockingDial) and InvokeRPC method as well as the total time.
* Made timing data part of the very verbose functionality
* cleanup
* fix
---------
Co-authored-by: Scott Blum <dragonsinth@gmail.com>
* SIGSEGV: panic: runtime error: invalid memory address
- Executed the updatedeps make target
- protoreflect upgraded to v1.15.3, which addresses this panic.
* Reverted. Only updated protoreflect.
* Run tests on Go 1.21
For the most part, there are no breaking changes.
However, the expired certificate is now showing "expired certificate"
although previously it showed a simpler "bad certificate" which was
hard-coded into the TLS settings test scenario.
* Simplify condition for certificate error
Instead of two `expired certificate` and `bad certificate` comparisons, we can just check for `certificate` in error output. This satisfies us when checking there is something wrong with the certificate.
Co-authored-by: Scott Blum <dragonsinth@gmail.com>
---------
Co-authored-by: Scott Blum <dragonsinth@gmail.com>
The proposal already exists by Dependabot, but the version bump pulls
in `grpc.reflection.v1.ServerReflection` resulting in minor test change
being required.
Transient dependency `github.com/bufbuild/protocompile` is now added,
and requires at least Go 1.18. This PR includes the version removal.
The proper `v1` gRPC reflection has been around for a bit.
The "client auto" mechanism still supports falling back to `v1alpha`.
Not many support the `v1`, but we should default to it when possible.