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

Indent missmatches after running .hack/update-codegen.sh #5771

Closed
XinruZhang opened this issue Nov 17, 2022 · 5 comments · Fixed by tektoncd/plumbing#1369
Closed

Indent missmatches after running .hack/update-codegen.sh #5771

XinruZhang opened this issue Nov 17, 2022 · 5 comments · Fixed by tektoncd/plumbing#1369
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@XinruZhang
Copy link
Member

Feature request

./hack/update-codegen.sh should avoid using tab to indent.

Use case

In #5765, I updated Custom Task API Spec by adding new fields. Per https://github.com/tektoncd/pipeline/blob/main/hack/README.md, I ran ./hack/update-codegen.sh to generate corresponding client code and pushed the PR.

However, our CI failed to build (pull-tekton-pipeline-build-tests failed) because of indent mismatches, see the result.

@XinruZhang XinruZhang added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 17, 2022
@abayer
Copy link
Contributor

abayer commented Nov 22, 2022

Yeah, I've seen this pop up but haven't reproduced it myself (though I'm running update-codegen.sh on my new M1 for the first time as we speak, so maybe I'll see it now?) and have never been able to figure out what's causing it.

@lbernick
Copy link
Member

lbernick commented Jan 4, 2023

@XinruZhang did you find a workaround here? Running into the same issue on #5945

@XinruZhang
Copy link
Member Author

@lbernick Unfortunately no, I tried to trace back to https://github.com/kubernetes/kubernetes/blob/ea0764452222146c47ec826977f49d7001b0ea8c/staging/src/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go#L157, but nothing wrong with it (it uses spaces instead of tabs)

Since we have a workaround -- manually replace tabs with spaces, I decided not to invest more time on this issue.

@lbernick lbernick added kind/bug Categorizes issue or PR as related to a bug. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Feb 7, 2023
@wlynch
Copy link
Member

wlynch commented Feb 22, 2023

Pretty sure this is caused by the gofmt changes in Go 1.19. We're still using 1.18 https://github.com/tektoncd/plumbing/blob/244a3ab6ae4b64f05d3dfb2fd152fcd98232e543/prow/config.yaml#L1183
which is EOL - we should bump

@vdemeester
Copy link
Member

@wlynch ah.. I updated the image but not the jobs 🤦🏼

pritidesai added a commit to pritidesai/pipeline that referenced this issue Feb 23, 2023
The golang linting was upgraded in our CI to accomodate gofmt changes in Go
1.19.

Please refer to the related PRs/issues:

tektoncd#5944
tektoncd#5771

Signed-off-by: pritidesai <pdesai@us.ibm.com>
pritidesai added a commit to pritidesai/pipeline that referenced this issue Feb 23, 2023
The golang linting was upgraded in our CI to accomodate gofmt changes in Go
1.19.

Please refer to the related PRs/issues:

tektoncd#5944
tektoncd#5771

Signed-off-by: pritidesai <pdesai@us.ibm.com>
tekton-robot pushed a commit that referenced this issue Feb 23, 2023
The golang linting was upgraded in our CI to accomodate gofmt changes in Go
1.19.

Please refer to the related PRs/issues:

#5944
#5771

Signed-off-by: pritidesai <pdesai@us.ibm.com>
Yongxuanzhang added a commit to Yongxuanzhang/pipeline that referenced this issue Feb 23, 2023
The golang linting was upgraded in our CI to accomodate gofmt changes in Go
1.19.

Please refer to the related PRs/issues:

tektoncd#5944
tektoncd#5771

Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
Yongxuanzhang added a commit to Yongxuanzhang/pipeline that referenced this issue Feb 23, 2023
The golang linting was upgraded in our CI to accomodate gofmt changes in Go
1.19.

Please refer to the related PRs/issues:

tektoncd#5944
tektoncd#5771

Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
tekton-robot pushed a commit that referenced this issue Feb 27, 2023
The golang linting was upgraded in our CI to accomodate gofmt changes in Go
1.19.

Please refer to the related PRs/issues:

#5944
#5771

Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants