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

-upatch and -u options does not work as expected; bring them back #95

Open
bwplotka opened this issue Jul 20, 2021 · 1 comment
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@bwplotka
Copy link
Owner

We had to skip test even:

	{
			name: "Use -u=patch to upgrade thanos package",
			do: func(t *testing.T, g *goEnv, p *testProject) {
				if !goVersion.LessThan(version.Go116) {
					// TODO(bwplotka): Fix. It's not critical feature though to block release.
					t.Skip("From Go 1.16 behavior changed: get: can't query version \"patch\" of module github.com/thanos-io/thanos/cmd/thanos: no existing version is required")
				}
				fmt.Println(g.ExecOutput(t, p.root, bingoPath, "get", "--upatch", "thanos"))
			},
			expectRows: []row{
				// TODO(bwplotka) This will be painful to maintain, but well... improve it
				{name: "thanos", binName: "thanos-v0.21.1", pkgVersion: "github.com/thanos-io/thanos/cmd/thanos@v0.21.1"},
			},
			expectBinaries: []string{"thanos-v0.21.1"},
		},

Next steps:

  • Potentially remove u and upatch options with something home-made that tries to get literally latest commit/tag of provided repo.
@bwplotka bwplotka added bug Something isn't working help wanted Extra attention is needed labels Jul 20, 2021
@bwplotka
Copy link
Owner Author

Removing -u test too for now as it's misleading most of the time.

{
			name: "Use -u to upgrade thanos package",
			do: func(t *testing.T, g *goEnv, p *testProject) {
				fmt.Println(g.ExecOutput(t, p.root, bingoPath, "get", "-u", "thanos"))
			},
			expectRows: []row{
				// TODO(bwplotka) This will be painful to maintain, but well... improve it
				{name: "thanos", binName: "thanos-v0.21.1", pkgVersion: "github.com/thanos-io/thanos/cmd/thanos@v0.21.1"},
			},
			expectBinaries: []string{"thanos-v0.21.1"},
		},

@bwplotka bwplotka changed the title -upatch and -u options does not work as expected -upatch and -u options does not work as expected; bring them back Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant