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

upgrade depguard to v2 #844

Merged
merged 5 commits into from
Jun 8, 2023
Merged

upgrade depguard to v2 #844

merged 5 commits into from
Jun 8, 2023

Conversation

zirain
Copy link
Member

@zirain zirain commented Jun 6, 2023

related to istio/tools#2490

@zirain zirain requested a review from a team as a code owner June 6, 2023 08:18
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 6, 2023
@zirain
Copy link
Member Author

zirain commented Jun 6, 2023

/hold

wait istio/tools#2490

desc: "operator should not be imported"
- pkg: istio.io/istio/istioctl
desc: "istioctl should not be imported"
# configuration for depguard
packages-with-error-message:
Copy link
Member Author

Choose a reason for hiding this comment

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

delete these lines after build-image upgraded

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks. I think this is close to what I test in the other repos. I'll give it a another try in them in the morning and if things work, I think we can try merging this.

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe we should add test for this,
checkout code from other repo then run make lint?

@ericvn ericvn mentioned this pull request Jun 8, 2023
10 tasks
Signed-off-by: hejianpeng <[email protected]>
@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 8, 2023
@ericvn
Copy link
Contributor

ericvn commented Jun 8, 2023

I believe the processing here is a little bit circular, and that's what we need to take into consideration. When a common-files PR merges, there are a number of post-submit jobs. One set is related to calling make update-common in the various repos updating their common-files to match the submitted PR. Another job updates the test-infra file job definitions to use the new image in the pipeline. Normally, we let the first set of jobs update the common-files to make sure everything seems OK, then we update the pipeline to use the new image.

Note that the first set of PRs across the repos still use the image called out in the pipeline, and I think this is one of the cases, we need to be a little different. Since the repo PRs will have the new .golangci.yml but using the existing pipeline image, those PRs will fail the lint-go. We can work around that by merging the image updating PR in test-infra right away. This should cause the pipeline jobs to use the new image and we will have the new .golangci.yml in common.

The question is if what we have here will work across all the repos.

@ericvn
Copy link
Contributor

ericvn commented Jun 8, 2023

Comments (with editing as the repos are tested)

Running IMG=gcr.io/istio-testing/build-tools:master-8fd7512ff351aebc342a7c6410dd4899811de4ef make lint-go after replacing common/config/.golangci.yml with changes from this PR.

test-infra: OK
bots: OK
community: OK
istio (will also have override changes):tested OK previously with test PR.
api: OK
tools: OK
release-builder: OK
client-go: OK
proxy: FAILED (but failed without change).

test/envoye2e/env/wasm.go:53:37: octalLiteral: use new octal literal style, 0o666 (gocritic)
		err = os.WriteFile(file, content, 0666)

ztunnel: OK

@ericvn
Copy link
Contributor

ericvn commented Jun 8, 2023

@howardjohn Any last minute thoughts on merging this and merging the test-infra right away so the lint test passes in the repos.

@howardjohn howardjohn added the do-not-merge Block automatic merging of a PR. label Jun 8, 2023
@howardjohn
Copy link
Member

TBH I don't really get the problem, lets just merge something :-)

@ericvn
Copy link
Contributor

ericvn commented Jun 8, 2023

OK. Removing DNM.

@ericvn ericvn removed the do-not-merge Block automatic merging of a PR. label Jun 8, 2023
@istio-testing istio-testing merged commit fcdedda into master Jun 8, 2023
3 checks passed
@istio-testing istio-testing deleted the depguard-v2 branch June 8, 2023 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
4 participants