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

Install buf with go #439

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Install buf with go #439

merged 3 commits into from
Aug 20, 2024

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Aug 19, 2024

Why this should be merged

We currently have an issue where the buf version needs to be updated in multiple locations, and it is tricky for users to install the correct version.

This PR creates a single source of truth, and removed the need for the install step in the github workflows.

@geoff-vball geoff-vball marked this pull request as ready for review August 19, 2024 15:41
@geoff-vball geoff-vball requested a review from a team as a code owner August 19, 2024 15:41
Copy link
Contributor

@feuGeneA feuGeneA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this!! a few minor comments but overall excited to see the positive iteration here!

scripts/lint.sh Outdated Show resolved Hide resolved
@@ -49,8 +49,5 @@ jobs:
with:
submodules: recursive

- name: Install buf
uses: bufbuild/buf-setup-action@v1.36.0

- name: Run E2E Tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm my understanding, this actually wasn't being used anymore here, since we removed the buf usage from the build script, right?

go.mod Outdated
@@ -86,19 +86,19 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why there are any go.{mod,sum} changes in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not sure what I did lol

Comment on lines -17 to -22
## ensure the correct version of "buf" is installed
BUF_VERSION='1.36.0'
if [[ $(buf --version | cut -f2 -d' ') != "${BUF_VERSION}" ]]; then
echo "could not find buf ${BUF_VERSION}, is it installed + in PATH?"
exit 255
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still keep this no? Otherwise calling this script on its own has no guarantee that the code is generated using the expected version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just added an install step here as well, which is basically a no-op if it's already there.

@geoff-vball geoff-vball merged commit 5e4e2e9 into main Aug 20, 2024
7 checks passed
@geoff-vball geoff-vball deleted the go-install-buf branch August 20, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants