Skip to main content
Gathering Interest

Cognite Toolkit Resource Types to compile like CSS Stylesheets to enable mixin properties across CDF Modules

Related products:Toolkit
  • February 21, 2025
  • 1 reply
  • 37 views

We are running into merge conflicts when multiple teams are adding to features that touch the same files.

 

An example, two teams working on different modules might need to both scaffold permissions in the same user groups, but deploy at different times.

 

It would be really helpful if when defining a CDF TK Module, we could have different configurations defined for the same resource, but spread across different modules so that if one team needed to add dataset permissions to a common persona, they could do so within the module and that module would not interfere or conflict with another module adding to the same common persona.

 

Similar to how in CSS if you have a base style, and apply styles overtop, they are added / overwritten.  

 

 

Hi ​@Jesse Jenken, thanks for bringing this up. I agree we have to find a way to avoid conflicts when multiple teams work async on the same resource. You mention (scoped) groups specifically, are there other resources that also tend to create conflicts? Also, it sounds to me what you need is additive, as in if datasets are added to the same group from different modules, all of them are deployed (as opposed to being overwritten)?

What I’m most concerned about is replacing one type of user complexity (Git merge conflicts) with another. Sorry for the lengthy explanation that follows, but maybe you can tell me if the reasoning makes sense based on your experience.

If we introduced a concept of base + overlay (borrowing terms from Terraform), we also need a way for the user to designate some files as base and others as overlays. This is what CSS does (by convention) with the concept of cascading and where specificity and order determine the outcome.

Or, we could decide that all resources with the same externalId by convention should be combined, so there isn’t a need for base + overlay. For Groups the rule is relatively simple: combine ACLs from submodules, and scopes (like data sets) in ACLs. But wouldn’t a user expect that all resource types support the same additive behaviour? For other compound resources like Workflows or Extraction Pipelines, it is unclear how to combine, as they have internal dependencies to consider.

Bottom line, we recognize the problem and want to find a clean fix. Please bear with us while we try to figure it out.

 

P.S. I like your idea of being inspired by CSS, but I also know that the CSS concept of cascade/specificity often frustrates new users. It requires discipline and transparency to understand which style will actually come into effect when you have deep layers of CSS.



Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings