Skip to content

Commit 183107f

Browse files
authored
chore(dev): update contribution guidelines, update dependencies for corp machines and update makefile to handle go version differences (google#5605)
- Add pyopenssl to gcp/website dependencies to resolve mTLS 'No module named OpenSSL' errors on corp machines. - Update CONTRIBUTING.md with local setup prerequisites and a workaround for installing firestore emulator when gcloud component manager is disabled. - Fix Makefile to use GOTOOLCHAIN=auto to prevent local Go version mismatch errors.
1 parent 6b4c85b commit 183107f

4 files changed

Lines changed: 32 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ You must install:
6161
1. [Yapf](https://github.com/google/yapf)
6262
1. [Make](https://www.gnu.org/software/make/)
6363
1. [Poetry](https://python-poetry.org/) >= 2.3.3
64-
2. [Google Cloud SDK](https://cloud.google.com/sdk)
65-
3. [Hugo](https://gohugo.io/installation/)
66-
4. [Node JS](https://nodejs.org/) >= 18.17.x
67-
5. [pnpm](https://pnpm.io/installation) (install via `npm install -g pnpm --prefix ~/.local` or `corepack enable pnpm`)
68-
6. [Terraform](https://developer.hashicorp.com/terraform/install) >= 1.5 (for infrastructure changes)
64+
1. [Google Cloud SDK](https://cloud.google.com/sdk)
65+
1. [Hugo](https://gohugo.io/installation/)
66+
1. [Node JS](https://nodejs.org/) >= 18.17.x
67+
1. [pnpm](https://pnpm.io/installation) (install via `npm install -g pnpm --prefix ~/.local` or `corepack enable pnpm`)
68+
1. [Terraform](https://developer.hashicorp.com/terraform/install) >= 1.5 (for infrastructure changes)
69+
1. [Go](https://go.dev/doc/install) >= 1.26
70+
1. `protobuf-compiler` (e.g. `protoc` command, install via `sudo apt install protobuf-compiler` on Debian/Ubuntu)
71+
1. `protoc-gen-go` and `protoc-gen-go-grpc` (Go proto plugins, install via `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest` and `go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest`. Ensure your Go bin directory, e.g. `~/go/bin`, is in your `PATH`)
6972

7073
Then you can set up the development environment by cloning the OSV repo and
7174
installing the Poetry dependencies.
@@ -94,6 +97,8 @@ gcloud auth application-default login
9497
gcloud components install cloud-firestore-emulator
9598
```
9699

100+
> If your `gcloud` installation has the component manager disabled (common for package manager installs like `apt` or `dnf` on Linux), you may need to install the emulator via your package manager (e.g., `sudo apt install google-cloud-cli-firestore-emulator` if available) or use a [user-space installation of the gcloud CLI](https://cloud.google.com/sdk/docs/install) to manage components.
101+
97102
To run tests:
98103
```shell
99104
make all-tests

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ update-api-snapshots:
5555
cd gcp/api && UPDATE_SNAPS=true ./run_tests_e2e.sh $(HOME)/.config/gcloud/application_default_credentials.json
5656

5757
lint:
58-
GOTOOLCHAIN=go1.26.3 $(run-cmd) tools/lint_and_format.sh
58+
GOTOOLCHAIN=auto $(run-cmd) tools/lint_and_format.sh
5959

6060
build-osv-protos:
6161
cd osv && $(run-cmd) python -m grpc_tools.protoc --python_out=. --mypy_out=. --proto_path=. --proto_path=osv-schema/proto vulnerability.proto importfinding.proto

gcp/website/poetry.lock

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gcp/website/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies = [
2020
"whitenoise==6.12.0",
2121
"cvss==3.6",
2222
"osv",
23+
"pyopenssl (>=26.3.0,<27.0.0)",
2324
]
2425

2526
[tool.poetry]

0 commit comments

Comments
 (0)