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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 (kustomize/v1,go/v4): Fix yamllint warnings in the scaffolds done under config. #3634

Merged
merged 1 commit into from Sep 25, 2023

Conversation

MaGaroo
Copy link
Contributor

@MaGaroo MaGaroo commented Sep 24, 2023

Hi!
This PR fixes #3599

Note: There are 5 warnings remaining in project-v2 testdata. It's root cause isn't the kubebuilder itself, but those yaml files are generated by controller-tools v0.3.0. I tried to increase its version, but the code didn't work with the newer versions of controller-tools. So, I just decided to leave those warnings unfixed and add project-v2 to yamllint's ignore config. Please tell me if you think we can solve this problem in a better way.

More Info: Those warnings are as follows. They're generated by running make manifest command in the testdata directory.

testdata/project-v2/config/webhook/manifests.yaml
  1:1       warning  too many blank lines (1 > 0)  (empty-lines)

testdata/project-v2/config/crd/bases/crew.testproject.org_admirals.yaml
  1:1       warning  too many blank lines (1 > 0)  (empty-lines)

testdata/project-v2/config/crd/bases/crew.testproject.org_firstmates.yaml
  1:1       warning  too many blank lines (1 > 0)  (empty-lines)

testdata/project-v2/config/crd/bases/crew.testproject.org_captains.yaml
  1:1       warning  too many blank lines (1 > 0)  (empty-lines)

testdata/project-v2/config/rbac/role.yaml
  1:1       warning  too many blank lines (1 > 0)  (empty-lines)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 24, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @MaGaroo!

It looks like this is your first PR to kubernetes-sigs/kubebuilder 馃帀. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubebuilder has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 馃槂

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 24, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @MaGaroo. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 24, 2023
Makefile Outdated
@@ -91,7 +91,7 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes

.PHONY: yamllint
yamllint:
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest testdata -d "{extends: relaxed, rules: {line-length: {max: 120}}}" --no-warnings
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest testdata -d "{extends: relaxed, rules: {line-length: {max: 120}}, ignore: /testdata/project-v2/}"
Copy link
Member

Choose a reason for hiding this comment

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

kustomize/v1 we should ignore as well
It is deprecated. So that we should no longer change
Could you please revert the changes made into common/kustomize/v1 and rerun make generate to update the samples to push another PR?

Copy link
Contributor Author

@MaGaroo MaGaroo Sep 25, 2023

Choose a reason for hiding this comment

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

Sure. I just applied your suggestions.
Does it work for you now?

P.S. If I didn't understand you correctly, just let me know.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Great work 馃

Just a few minor points:
1 - Please revert the changes made under kustomize/v1. This version is deprecated, so we should not make changes to it. You can also ignore it in the makefile target.
2 - After making the above change, please ensure that you squash the commits. We should have one commit per PR to get this merged.

P.S. This is a change that is relevant to the end users. You are fixing an issue in what is provided to them, so the appropriate emoji is 馃悰. I hope you don't mind; I updated the title according to the project's conventions for you to check out. However, please feel free to adjust as you see fit. Why does the title matter? We generate the release notes based on the titles of the PRs.

Again, well done. 馃帀

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 24, 2023
@camilamacedo86 camilamacedo86 changed the title 馃尡 Fix yamllint warnings 馃悰 (kustomize/v1,go/v4): Fix yamllint warnings in the scaffolds done under config. Sep 24, 2023
@MaGaroo
Copy link
Contributor Author

MaGaroo commented Sep 25, 2023

/retest

Since the e2e tests are passing in my local machine and 1.28 test has passed in my previous commit, I guess it's flake.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Great work

/lgtm
/approved

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, MaGaroo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 25, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2023
@MaGaroo
Copy link
Contributor Author

MaGaroo commented Sep 25, 2023

Oops... Sorry it was my fault. :(
I think we're gonna need your lgtm once more. @camilamacedo86

@MaGaroo
Copy link
Contributor Author

MaGaroo commented Sep 25, 2023

/retest

@camilamacedo86
Copy link
Member

/test pull-kubebuilder-e2e-k8s-1-26-6

@camilamacedo86
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2023
@k8s-ci-robot k8s-ci-robot merged commit 164b916 into kubernetes-sigs:master Sep 25, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Solve yaml warnings in the scaffolds
3 participants