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

Explicitly set the manifests' license header year #1400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Camila-B
Copy link
Contributor

@google-oss-prow google-oss-prow bot requested review from karlkfi and sdowell August 22, 2024 16:54
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tiffanny29631 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@@ -42,7 +42,7 @@ configsync-crds: "$(CONTROLLER_GEN)" "$(KUSTOMIZE)" "$(ADDLICENSE)"
&& rm ./manifests/configmanagement.gke.io_namespaceconfigs.yaml \
&& rm ./manifests/configmanagement.gke.io_repoes.yaml \
&& rm ./manifests/configmanagement.gke.io_syncs.yaml \
&& "$(ADDLICENSE)" ./manifests
&& "$(ADDLICENSE)" -y 2024 ./manifests
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this really addresses the issue as described - this will just set all CRDs to always have a 2024 license.

  • If a new CRD is added in 2025 (for example), it should use 2025 as the year
  • I assume we also want previously created CRDs to match the year they were introduced

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. The add-license code always picks the latest year, which is correct for new files. The problem is that they're only marked as new because we're deleting and re-generating them.

We might need a more advanced solution that "fixes" the copyright year after generation if the file already existed beforehand, maybe by using a git diff --name-only --exit-code path/to/file in a bash script or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants