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

Bugfix/2935 lakectl bug on not found html #2966

Merged
merged 10 commits into from
Feb 28, 2022
4 changes: 2 additions & 2 deletions cmd/lakectl/cmd/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ var tagCreateCmd = &cobra.Command{
force, _ := cmd.Flags().GetBool("force")
if force {
// checking validity of the commitRef before deleting the old one
resp, err := client.GetCommitWithResponse(ctx, tagURI.Repository, commitRef)
DieOnErrorOrUnexpectedStatusCode(resp, err, http.StatusOK)
res, err := client.GetCommitWithResponse(ctx, tagURI.Repository, commitRef)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for being unclear: I really liked this change, it's part of the res -> resp fix. It caused an issue with this PR, so I think we have no choice but to make this unrelated change here. (Technically we could have a preview PR that just fixed this, and then your PR. Too much effort for too little gain probably.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure how we can fix this in this case. We are trying to assign resp in l.84 with a different type. Maybe change res here to be _resp?

DieOnErrorOrUnexpectedStatusCode(res, err, http.StatusOK)

resp, err := client.DeleteTagWithResponse(ctx, tagURI.Repository, tagURI.Ref)
if err != nil && (resp == nil || resp.JSON404 == nil) {
Expand Down