Giter VIP home page Giter VIP logo

Comments (9)

y4ri avatar y4ri commented on May 28, 2024 2

@xoanmi just like in "test-comp-one" composition above, you need to add

policy:
  fromFieldPath: Required

to any patches of XRs/MRs in composition that patch in the value required by schema.

With an example of VPC Managed Resource from aws provider you would need that policy for a patch responsible for value of spec.forProvider.cidrBlock

from crossplane.

xoanmi avatar xoanmi commented on May 28, 2024 1

We have the same problem. We have not been able to work around it. Did you do it @y4ri ?

from crossplane.

xoanmi avatar xoanmi commented on May 28, 2024 1

@xoanmi just like in "test-comp-one" composition above, you need to add

policy:
  fromFieldPath: Required

to any patches of XRs/MRs in composition that patch in the value required by schema.

With an example of VPC Managed Resource from aws provider you would need that policy for a patch responsible for value of spec.forProvider.cidrBlock

Thanks! I misread your previous message. We have applied the workaround and it works! 🚀

from crossplane.

phisco avatar phisco commented on May 28, 2024 1

@negz, pretty sure, the example here is extremely complicated, but the core issue is the same, patches to the xr not being executed because of a failure applying a composed resource.

from crossplane.

negz avatar negz commented on May 28, 2024

@y4ri Do you see any errors or warnings when this is happening? If so, could you let us know what they are.

from crossplane.

y4ri avatar y4ri commented on May 28, 2024

1.14.5 - On XR level just a bunch of

Warning  ComposeResources         13s                defined/compositeresourcedefinition.apiextensions.crossplane.io  cannot compose resources: cannot apply composed resource: cannot create object: XDummy.example.org "test-qksw8-dlpcx" is invalid: spec.exampleField: Required value

ending with

Warning  ComposeResources         9s (x14 over 13s)  defined/compositeresourcedefinition.apiextensions.crossplane.io  (combined from similar events): cannot compose resources: cannot apply composed resource: cannot create object: XDummy.example.org "test-qksw8-m96gr" is invalid: spec.exampleField: Required value

On 1.13.2 I only get 1 warrning:

Warning  ComposeResources         21s                defined/compositeresourcedefinition.apiextensions.crossplane.io  composed resource "second-xdummy": cannot use dry-run create to name composed resource: XDummy.example.org "test-jf7q7-5nswr" is invalid: spec.exampleField: Required value

from crossplane.

phisco avatar phisco commented on May 28, 2024

I think this is because we used to dry run here to get the generated name and the code below still assumes the resources to be valid, which in case of a missing required field is not the case anymore and therefore we exit erroring here.
This applies to all 1.14 releases and to v1.15.0-rc.1 too.

from crossplane.

phisco avatar phisco commented on May 28, 2024

I think this is a duplicate of #5114

from crossplane.

negz avatar negz commented on May 28, 2024

I think this is a duplicate of #5114

@phisco How sure are you? At a glance it sounds like the described behaviour is different.

from crossplane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.