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

Make default version explicit #12

Merged
merged 2 commits into from Sep 15, 2021
Merged

Make default version explicit #12

merged 2 commits into from Sep 15, 2021

Conversation

amckinney
Copy link
Contributor

Now that we've gone through the exercise of releasing buf and all of the GitHub Actions to v1, we've realized that the implicit latest behavior is actually dangerous to use as a default value (which was introduced in #5).

If any breaking changes occur, the latest buf version might be incompatible with previous versions of the GitHub Actions. We can still give users the experience of "default to the latest version if you don't explicitly specify one", but it can instead be controlled by the buf release process so that buf-setup-action and buf are always released at the same time.

With all that said, users will still have access to the latest configuration value so that they can use a newer buf version than their version of buf-setup-action specifies. In this case, they can pin to an earlier version of buf-setup-action, but install the latest buf release, regardless of the action.yml's default value like so:

steps:
  - uses: actions/checkout@v2
  - uses: bufbuild/buf-setup-action@v0.4.0
    with:
      version: 'latest'

@@ -7,7 +7,7 @@ branding:
inputs:
version:
description: 'The version of buf to setup.'
default: 'latest'
default: '0.56.0'
Copy link
Member

Choose a reason for hiding this comment

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

So the approach here would be "maxing out the latest" to 0.56.0, for example, right? E.g. without upgrading the setup action, you're basically restricted to this maximum version, but users can explicitly set the version input to latest to go beyond this version, right? I am okay with this user experience, so I am going to stamp this, but we may want to call out setting latest explicitly as a supported behaviour in the README.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I agree that we should update the README.md with the ability to set latest. I'll include a note here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also to be clear, users aren't "maxed out" by the setting - they can still explicitly set a version that's higher than 0.56.0.

@amckinney amckinney merged commit e828f8f into main Sep 15, 2021
@amckinney amckinney deleted the explicit-version branch September 15, 2021 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants