Skip to content

Modified claim diffs show incorrect name, generateName, labels #56

@jcogilvie

Description

@jcogilvie

What happened?

Our test assertions have this, which is incorrect:

~~~ XDownstreamResource/test-claim-82crv
  apiVersion: nop.example.org/v1alpha1
  kind: XDownstreamResource
  metadata:
    annotations:
      crossplane.io/composition-resource-name: nop-resource
-   generateName: test-claim-82crv-
    labels:
      crossplane.io/claim-name: test-claim
      crossplane.io/claim-namespace: existing-namespace
-     crossplane.io/composite: test-claim-82crv
-   name: test-claim-82crv
+     crossplane.io/composite: test-claim
+   name: test-claim
  spec:
    forProvider:
-     configData: existing-value
+     configData: modified-value

---

It should instead have this:

~~~ XDownstreamResource/test-claim-82crv
  apiVersion: nop.example.org/v1alpha1
  kind: XDownstreamResource
  metadata:
    annotations:
      crossplane.io/composition-resource-name: nop-resource
    generateName: test-claim-82crv-
    labels:
      crossplane.io/claim-name: test-claim
      crossplane.io/claim-namespace: existing-namespace
      crossplane.io/composite: test-claim-82crv
    name: test-claim-82crv
  spec:
    forProvider:
-     configData: existing-value
+     configData: modified-value

---

How can we reproduce it?

Already a test case, ModifiedClaimShowsDiff.

What environment did it happen in?

Crossplane version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions