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

🌱 (ci): Add GH action to validate generated helm charts for tutorials #4472

Conversation

akagami-harsh
Copy link
Contributor

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

Welcome @akagami-harsh!

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
Copy link
Contributor

Hi @akagami-harsh. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 6, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch 2 times, most recently from 18fcd64 to 28d7925 Compare January 7, 2025 12:14
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 28d7925 to c451ce3 Compare January 7, 2025 12:49
@camilamacedo86
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 7, 2025
@camilamacedo86
Copy link
Member

HI @akagami-harsh
See that is failing: https://github.com/kubernetes-sigs/kubebuilder/actions/runs/12651921723/job/35270619225?pr=4472

You need to run make generate so that all under test data and docs samples will be generated within

/lgtm /approve cancel

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 7, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 1cc2116 to c451ce3 Compare January 7, 2025 23:38
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 7, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 7cdd469 to 12c4683 Compare January 8, 2025 21:24
@@ -137,6 +137,10 @@ func (sp *Sample) CodeGen() {
cmd = exec.Command("make", "build-installer")
_, err = sp.ctx.Run(cmd)
hackutils.CheckError("Failed to run make build-installer for cronjob tutorial", err)

cmd = exec.Command("kubebuilder", "edit", "--plugins=helm.kubebuilder.io/v1-alpha")
Copy link
Contributor

Choose a reason for hiding this comment

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

These commands should use this function instead, no?

// EditHelmPlugin is for running `kubebuilder edit --plugins=helm.kubebuilder.io/v1-alpha`
func (t *TestContext) EditHelmPlugin() error {
cmd := exec.Command(t.BinaryName, "edit", "--plugins=helm/v1-alpha")
_, err := t.Run(cmd)
return err
}

err := sp.ctx.EditHelmPlugin()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we can use that function, I've updated the code to use that function.

@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 10a1b60 to 1f2292f Compare January 14, 2025 12:15
@camilamacedo86
Copy link
Member

Hi @akagami-harsh

It is all great !!!
Sorry for the delay.
Could you please rebase it with the master so we can get it merged?

@camilamacedo86
Copy link
Member

camilamacedo86 commented Jan 17, 2025

If it passes in the CI, you do not need to do the rebase; if not, then it will be required.

/lgtm
/approve

Thank you a lot for your amazing work 🥇

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from a50ed75 to 4b8cf1d Compare January 17, 2025 20:40
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 4b8cf1d to d906d37 Compare January 17, 2025 21:07
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jan 17, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 8a65818 to 1f2292f Compare January 17, 2025 21:18
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jan 17, 2025
@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch 3 times, most recently from 88b398e to 69b2412 Compare January 17, 2025 21:37
@akagami-harsh
Copy link
Contributor Author

Testdata verification ci was failing so ran make generate, now everything seem fine

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.

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akagami-harsh, camilamacedo86, mateusoliveira43

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

@camilamacedo86
Copy link
Member

HI @akagami-harsh

For we move forward we need to fix [Testdata verification / Verify testdata directory (pull_request)](https://github.com/kubernetes-sigs/kubebuilder/actions/runs/12837254288/job/35801318191?pr=4472)

Could you please rebase with the master and run make generate to do so?

@akagami-harsh akagami-harsh force-pushed the create-Helm-Chart-for-Tutorials branch from 69b2412 to 5cca7b1 Compare January 20, 2025 13:15
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2025
@k8s-ci-robot
Copy link
Contributor

@akagami-harsh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubebuilder-e2e-k8s-1-32-0 5cca7b1 link true /test pull-kubebuilder-e2e-k8s-1-32-0

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@akagami-harsh
Copy link
Contributor Author

Hi @camilamacedo86, i have rebased with master ran make make generate

@camilamacedo86
Copy link
Member

/lgtm

/skip pull-kubebuilder-e2e-k8s-1-32-0

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 20, 2025
@camilamacedo86
Copy link
Member

/skip pull-kubebuilder-e2e-k8s-1-32-0

@camilamacedo86 camilamacedo86 merged commit 48db38c into kubernetes-sigs:master Jan 20, 2025
5 of 7 checks passed
@akagami-harsh akagami-harsh deleted the create-Helm-Chart-for-Tutorials branch January 21, 2025 08:19
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use the plugin to create a Helm Chart for Tutorials and Validate with them with GitHub action in the CI
4 participants