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

Add script to generate proto on known version of protoc #290

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ To run tests locally:
2.) `python setup.py develop`

3.) `python -m pytest tests/hypertrace`

### Generating Protobuf

If you need to upgrade the agent-config submodule, & therefor need to re-generate the python protobuf files, you should use the provided `proto.sh` script.

Example:

`./proto.sh <OS>`(osx, linux, win32 or win64) - this ensures that the python protobuf files are built on a consistent version of protoc

### Releases

In order to create a new release, you can run `make release VERSION=<version-number>` and this will change the version in the code appropriately and push the tags.
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ psycopg2
psycopg2-binary
pytest-postgresql
pytest-asyncio
httpx
10 changes: 10 additions & 0 deletions proto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# /bin/sh
PROTO_VERSION=3.13.0
OS=$1 #osx for local

rm -rf ./protoc
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTO_VERSION}/protoc-${PROTO_VERSION}-${OS}-x86_64.zip
unzip protoc-${PROTO_VERSION}-${OS}-x86_64.zip -d ./protoc
./protoc/bin/protoc --python_out=src/hypertrace/agent/config \
--proto_path=src/agent-config/proto/hypertrace/agent/config/v1/ \
./src/agent-config/proto/hypertrace/agent/config/v1/config.proto
Loading