Repository navigation
feat(form): support spec.dependencies parsing and chain resolution - #29
Merged
colinjlacy merged 1 commit intoDec 3, 2026
Conversation
Part 1 of runtimeconditions#16 (chained extensions): adds ExtensionDependency types, allows additive extensions with spec.dependencies to omit spec.kinds and spec.interfaceTypes, and adds resolveExtensionChain for base-first topological ordering with missing-dependency and cycle detection. Multi-extension schema merging in extractConditionForms will follow in a separate PR. Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
colinjlacy
reviewed
Dec 3, 2026
colinjlacy
reviewed
Dec 3, 2026
colinjlacy
left a comment
Member
There was a problem hiding this comment.
This looks right. Still somewhat incomplete, which I think we knew was going to be the case, so that's not a problem. The big thing that's missing in schema compilation, and you said that would come next, so all good there 👍
I see this function being extremely important to how Backstage and any other form host will handle extension management.
I just had on question. If you can respond to that - even if just to say that we'll address it in the next PR - I think we'll be good to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of #16 (chained extensions). This is the groundwork for letting an extension like
env-configurationbuild on top ofcommon-integrations.What and why
ExtensionDependencytype (a bare extension ID or{ id, version? }).parseExtensionDefinitionnow accepts extensions that declarespec.dependenciesbut leave outspec.kinds/spec.interfaceTypes, since additive extensions inherit those from their base. Standalone extensions still need both.resolveExtensionChain, which returns an extension and its transitive dependencies base-first, and throws a clear error on a missing dependency or a cycle.Two things worth knowing:
versionin a dependency is parsed but not used yet. Dependencies are matched byidonly.resolveExtensionChainyet. Merging schemas across the chain inextractConditionFormscomes in the next PR, to keep this one small.How it was tested
Added 3 tests: additive parsing, rejecting a standalone extension without
kinds, and chain order / missing dependency / cycle detection.tscpasses for both tsconfigs and Jest is 20/20.npm testpasses in the root and inbackend/The README is updated if behavior or the API changed