Skip to content

Commit

Permalink
Support backlink attributes via the importer (#109)
Browse files Browse the repository at this point in the history
We're introducing backlink attributes, which allow you to say 'find all
the features that this team owns' or similar, based on another catalog
type.

This is challenging for the importer as this means attributes in an
importer config can reference each other. e.g. if I'm creating both
Teams and Features in my catalog, I need to wait until Features exists
before creating the backlink attribute in Teams.

To resolve this, we split the UpdateTypeSchema process into two parts:
1. Create/Update all the types and their schemas
2. Create any new backlinks that don't exist yet (as the other attribute
must now be present).

Note that to make the code sane, I've pulled the 'if dryRun' up one
level as dryRun doesn't have any of these concerns.

This will fail with a 422 until we release the feature and flip the
feature flag.
  • Loading branch information
paprikati authored Mar 26, 2024
1 parent bca67c5 commit 61ac371
Show file tree
Hide file tree
Showing 6 changed files with 19,331 additions and 9,545 deletions.
6,436 changes: 4,825 additions & 1,611 deletions client/client.gen.go

Large diffs are not rendered by default.

Loading

0 comments on commit 61ac371

Please sign in to comment.