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

Ensure GitHub releases begin with v #1782

Closed
ecordell opened this issue Mar 5, 2024 · 2 comments · Fixed by #1783
Closed

Ensure GitHub releases begin with v #1782

ecordell opened this issue Mar 5, 2024 · 2 comments · Fixed by #1783
Labels
area/CLI Affects the command line kind/bug Something is broken or regressed

Comments

@ecordell
Copy link
Contributor

ecordell commented Mar 5, 2024

What platforms are affected?

linux, macos, windows

What architectures are affected?

amd64, arm64

What SpiceDB version are you using?

v1.29.2

Steps to Reproduce

  1. Make a SpiceDB release with a tag without a v prefix
  2. Run SpiceDB without the release check disabled

Expected Result

Observe:

goroutine 1 [running]:
github.com/authzed/spicedb/pkg/cmd/server.DefaultPreRunE.CheckAndLogRunE.func6(0x14000b3b200?, {0x100683ffc?, 0x16?, 0x0?})
	/home/runner/actions-runner/_work/spicedb/spicedb/pkg/releases/cli.go:51 +0x108
github.com/authzed/spicedb/pkg/cmd/server.DefaultPreRunE.CommandStack.func8(0x14000b3d600?, {0x1049fb120, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/jzelinskie/cobrautil/[email protected]/cobrautil.go:78 +0x78
github.com/spf13/cobra.(*Command).execute(0x14000b3b200, {0x1049fb120, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:968 +0x7e8
github.com/spf13/cobra.(*Command).ExecuteC(0x140003d3200)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
main.main()
	/home/runner/actions-runner/_work/spicedb/spicedb/cmd/spicedb/main.go:81 +0x4c0

Actual Result

Note that the underlying cause of the panic is fixed, but since we have other assumptions in the release process that the version begins with a v, we should validate this.

@ecordell ecordell added the kind/bug Something is broken or regressed label Mar 5, 2024
@nchepanov
Copy link

Why is this a default behavior?

I was just debugging some integration tests failing only to discover that a service failed to start spicedb because a new release of spicedb had a typo in the version name. I understand that there's a way to disable it, but I really question the value of this behavior being set by default for all users? It definitely caught me by surprise.

Have you considered changing the default behavior? I can only assume how many users were affected by this typo today.

@ecordell
Copy link
Contributor Author

ecordell commented Mar 5, 2024

Why is this a default behavior?

The goal is to provide information when the release you're running is out of date, since there may be important security updates in new versions (as there is in the latest release of SpiceDB!)

Note that this is supposed to fail gracefully and skip the check entirely if there is any issue with the GitHub API - the fact that it didn't is a bug (that is now fixed in head). This issue is just to follow up and make sure assumptions are always enforced by CD.

Have you considered changing the default behavior? I can only assume how many users were affected by this typo today.

That's always a discussion to have, though this feature exists with the best of intentions. The good news is that this only happens on startup, so no stably-running SpiceDB instances were affected.

@jzelinskie jzelinskie added the area/CLI Affects the command line label Mar 6, 2024
josephschorr added a commit to josephschorr/spicedb that referenced this issue Mar 6, 2024
josephschorr added a commit to josephschorr/spicedb that referenced this issue Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CLI Affects the command line kind/bug Something is broken or regressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants