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

Remove copyright YEAR from generated Go files #10520

Merged

Conversation

bmelbourne
Copy link
Contributor

@bmelbourne bmelbourne commented Jan 3, 2021

What this PR does / why we need it:
Fixes the following issue in kops CI test make quick-ci related to the change to Copyright 2021 in the Go boilerplate headers.

k8s.io/code-generator/cmd/client-gen
# These code-generator tools still depend on the kops repo being in GOPATH
# ref: https://github.com/kubernetes/gengo/issues/64
/home/runner/work/kops/kops/go/src/k8s.io/kops/_output/bin/conversion-gen --verify-only --skip-unsafe=true --input-dirs k8s.io/kops/pkg/apis/kops/v1alpha2 --v=0  --output-file-base=zz_generated.conversion \
	 --go-header-file "hack/boilerplate/boilerplate.go.txt"
F0101 13:16:16.689939   18295 main.go:134] Error: Failed executing generator: some packages had errors:
errors in package "k8s.io/kops/pkg/apis/kops/v1alpha2":
output for "v1alpha2/zz_generated.conversion.go" differs; first existing/expected diff: 
  "0 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may n"
  "1 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may n"

Similar issue kubernetes/kubernetes#59172 already addressed in Kubernetes project back in 2018.

Which issue(s) this PR fixes
Fixes #10515

Special notes for your reviewer:
hack/boilerplate/boilerplate.py has been copied from Kubernetes as this project uses a similar approach to re-generating Go boilerplate headers and has been well tested for several years.

https://github.com/kubernetes/kubernetes/blob/master/hack/boilerplate/boilerplate.py

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

Hi @bmelbourne. Thanks for your PR.

I'm waiting for a kubernetes 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/api labels Jan 3, 2021
@k8s-ci-robot k8s-ci-robot requested review from drekle and hakman January 3, 2021 18:05
@k8s-ci-robot k8s-ci-robot added area/provider/alicloud Issues or PRs related to alicloud provider area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/digitalocean Issues or PRs related to digitalocean provider area/provider/openstack Issues or PRs related to openstack provider size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/provider/spotinst Issues or PRs related to spotinst provider labels Jan 3, 2021
@bmelbourne
Copy link
Contributor Author

/assign @KashifSaadat

@bmelbourne
Copy link
Contributor Author

@rifelpet
Can you provide an /ok-to-test please?

@hakman
Copy link
Member

hakman commented Jan 3, 2021

/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 Jan 3, 2021
@rifelpet
Copy link
Member

rifelpet commented Jan 4, 2021

Thanks for fixing this! I'm glad that python script will be more in line with k/k https://github.com/kubernetes/kubernetes/blob/cea1d4e20b4a7886d8ff65f34c6d4f95efcb4742/hack/boilerplate/boilerplate.py

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bmelbourne, rifelpet

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 Jan 4, 2021
@k8s-ci-robot k8s-ci-robot merged commit c5658e1 into kubernetes:master Jan 4, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Jan 4, 2021
k8s-ci-robot added a commit that referenced this pull request Jan 4, 2021
…20-origin-release-1.19

Automated cherry pick of #10520: Remove copyright YEAR from generated Go files
@bmelbourne bmelbourne deleted the remove-year-generated-go-files branch January 4, 2021 20:20
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. area/api area/provider/alicloud Issues or PRs related to alicloud provider area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/digitalocean Issues or PRs related to digitalocean provider area/provider/openstack Issues or PRs related to openstack provider area/provider/spotinst Issues or PRs related to spotinst provider 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/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.

Remove copyright year from generated go files
5 participants