Skip to main content
Soumaya ZAMMIT
Seasoned ⭐️⭐️
Seasoned ⭐️⭐️
August 7, 2026
Solved

cdf-tk deploy fails on fresh space due to unresolved requires constraints

  • August 7, 2026
  • 7 replies
  • 69 views

Hi

We've hit a bug in cdf-tk (reproduced on 0.8.147 and 0.8.155) when deploying containers to a brand new space.

We have 98 containers in a new space. One container has no constraints, but others reference it via a requires constraint pointing to the same space. cdf-tk sends all containers in a single batch. The CDF API seems to validates requires constraints against what already exists in CDF not against other items in the same batch so it rejects the entire batch with this error:

Cannot create requires constraint 'requireMetadata' in container
'sp_xxx:ContainerB'.
Target container 'sp_xxx:ContainerA' does not exist.

cdf-tk should sort containers by their requires dependencies before batching, so dependency free containers like containerA are sent before the containers that depend on them.

We'd appreciate a fix in an upcoming release, or any insights regarding this issue.

Thanks

Best answer by Magnus Schjølberg

Could you try with the newest version of toolkit, 0.8.156 which was released just now, and verify that it solves the issue for your data model?

7 replies

Mithila Jayalath
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
August 7, 2026

@Soumaya ZAMMIT the engineering team is looking into this issue. Will get back to you once I have an update from them.

Michael Bennett
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
August 8, 2026

Hello ​@Soumaya ZAMMIT Did you create separate files for the containers? Toolkit provides the capability to apply configurations in order of dependency, even with the same type. So you can add containerA to 01MyActivity.container.yaml, and then 02MyActivity.container.yaml with the containers that depend on containerA.

 

Here’s the link.

 

Regards,

Michael Bennett

MB
Soumaya ZAMMIT
Seasoned ⭐️⭐️
Seasoned ⭐️⭐️
August 8, 2026

Hi ​@Michael Bennett 

No all the containers are defined in the same file, and this setup has been running in prod for 2 years.

So does the toolkit actually require each container to be in a separate file for dependency ordering to work correctly? We have around 100 containers, so splitting them all into separate files would be a pretty significant maintenance overhead

Is there no way for toolkit to resolve the dependencies while keeping them in the same file?

Practitioner ⭐️⭐️⭐️
August 9, 2026

Hello ​@Soumaya ZAMMIT! Thanks for letting us know about this issue, we made some semi-recent changes to the approach for deploying DM resources which likely broke this for you on a newer version of toolkit, since these types of dependent containers have not been sorted in any particular order up until now (as they should). We will release a new version of toolkit tomorrow that fixes this for you by sorting any dependent containers automatically.

Soumaya ZAMMIT
Seasoned ⭐️⭐️
Seasoned ⭐️⭐️
August 10, 2026

Hi ​@Magnus Schjølberg 
thank you for the explanation !
please keep me posted when the fix is released 

Practitioner ⭐️⭐️⭐️
August 10, 2026

Could you try with the newest version of toolkit, 0.8.156 which was released just now, and verify that it solves the issue for your data model?

Soumaya ZAMMIT
Seasoned ⭐️⭐️
Seasoned ⭐️⭐️
August 10, 2026

It’s working fine now with the version 0.8.156
Thank you ​@Magnus Schjølberg for your reactivity!