Skip to content

WIP 🐛fix(alpha update): license boilerplate#5669

Open
camilamacedo86 wants to merge 1 commit into
kubernetes-sigs:masterfrom
camilamacedo86:fix-bollerplate-alphagenerate
Open

WIP 🐛fix(alpha update): license boilerplate#5669
camilamacedo86 wants to merge 1 commit into
kubernetes-sigs:masterfrom
camilamacedo86:fix-bollerplate-alphagenerate

Conversation

@camilamacedo86
Copy link
Copy Markdown
Member

@camilamacedo86 camilamacedo86 commented Apr 30, 2026

When we run alpha generate, it warns because the license has not been used.

Problem

When I was testing it out I saw:

INFO Writing scaffold for you to edit... 
WARN unable to find boilerplate file. This file is used to generate the license header in the project..
Note that controller-gen will also use this. Ensure that you add the license file or configure your project accordingly file_path=hack/boilerplate.go.txterror=open hack/boilerplate.go.txt: no such file or director

Example: https://github.com/camilamacedo86/test-operator/actions/runs/25160729772/job/73754189181

The file should be found.

So, this PR fix it for alpha generate.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 30, 2026
@camilamacedo86 camilamacedo86 requested a review from Copilot April 30, 2026 14:41
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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

The pull request process is described here

Details 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 30, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses alpha generate warnings during the internal update flow by preserving the existing license boilerplate (hack/boilerplate.go.txt) across the branch cleanup/regeneration cycle.

Changes:

  • Preserve hack/boilerplate.go.txt before cleanup and restore it before running alpha generate during both ancestor and upgrade branch preparation.
  • Add integration tests covering boilerplate preservation/restoration behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
internal/cli/alpha/internal/update/update.go Adds boilerplate preserve/restore helpers and wires them into ancestor/upgrade branch preparation.
internal/cli/alpha/internal/update/update_test.go Adds integration tests validating boilerplate preservation and restore behavior.

Comment thread internal/cli/alpha/internal/update/update_test.go Outdated
Comment thread internal/cli/alpha/internal/update/update.go Outdated
Comment thread internal/cli/alpha/internal/update/update.go Outdated
Comment thread internal/cli/alpha/internal/update/update.go Outdated
@camilamacedo86 camilamacedo86 force-pushed the fix-bollerplate-alphagenerate branch from 1771550 to 2c443c0 Compare April 30, 2026 14:47
@camilamacedo86 camilamacedo86 changed the title 🐛 fix(alpha generate): license boilerplate WIP 🐛 fix(alpha generate): license boilerplate Apr 30, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 30, 2026
@camilamacedo86 camilamacedo86 force-pushed the fix-bollerplate-alphagenerate branch from 2c443c0 to d49b8b4 Compare April 30, 2026 16:31
@camilamacedo86 camilamacedo86 changed the title WIP 🐛 fix(alpha generate): license boilerplate 🐛 fix(alpha generate): license boilerplate Apr 30, 2026
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 30, 2026
@camilamacedo86 camilamacedo86 reopened this May 7, 2026
@camilamacedo86 camilamacedo86 changed the title 🐛 fix(alpha generate): license boilerplate 🐛fix(alpha generate): license boilerplate May 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@camilamacedo86: 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-36-0 d49b8b4 link true /test pull-kubebuilder-e2e-k8s-1-36-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.

Details

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.

@camilamacedo86 camilamacedo86 changed the title 🐛fix(alpha generate): license boilerplate WIP 🐛fix(alpha update): license boilerplate May 7, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2026
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants