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

make generate can not be run more than once #5738

Closed
jbw976 opened this issue May 26, 2024 · 0 comments · Fixed by #5739
Closed

make generate can not be run more than once #5738

jbw976 opened this issue May 26, 2024 · 0 comments · Fixed by #5739
Assignees
Labels
bug Something isn't working build
Milestone

Comments

@jbw976
Copy link
Member

jbw976 commented May 26, 2024

What happened?

Running make generate more than once results in the following error:

20:50:21 [ .. ] patching generated CRDs
mkdir: /Users/jared/dev/go/src/github.com/crossplane/crossplane/.work/patch: File exists
make[1]: *** [crds.patch] Error 1
make: *** [generate] Error 2

This also leaves a side effect of the cluster/crds/pkg.crossplane.io_deploymentruntimeconfigs.yaml file being modified with the following diff:

diff --git a/cluster/crds/pkg.crossplane.io_deploymentruntimeconfigs.yaml b/cluster/crds/pkg.crossplane.io_deploymentruntimeconfigs.yaml
index 35a599ab7..f876d0e55 100644
--- a/cluster/crds/pkg.crossplane.io_deploymentruntimeconfigs.yaml
+++ b/cluster/crds/pkg.crossplane.io_deploymentruntimeconfigs.yaml
@@ -4211,8 +4211,6 @@ spec:
                                     ip:
                                       description: IP address of the host file entry.
                                       type: string
-                                  required:
-                                  - ip
                                   type: object
                                 type: array
                                 x-kubernetes-list-map-keys:
@@ -4267,8 +4265,6 @@ spec:
                                         More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                                         TODO: Add other useful fields. apiVersion, kind, uid?
                                       type: string
-                                  required:
-                                  - name
                                   type: object
                                   x-kubernetes-map-type: atomic
                                 type: array

This looks related to recently added build logic in 355ba7a

How can we reproduce it?

Run make generate two times in a row.

Workaround: rm -fr .work/patch and then run make generate again.

What environment did it happen in?

Crossplane version: v1.17.0-rc.0.120.g914b83a3c, corresponding to 914b83a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant