Raise an error when a component uses another component's name as library prefix#1320
Merged
Raise an error when a component uses another component's name as library prefix#1320
Conversation
94d7a17 to
c057381
Compare
…ary prefix Until now, Commodore's component library name validation only checked that each library is prefixed with the component's name. This isn't sufficient in some cases: for example if we have components `foo` and `foo-operator`, component foo was allowed to deploy a library `foo-operator.libsonnet` which could cause non-deterministic symlinking if component `foo-operator` also deployed the library `foo-operator.libsonnet`. This commit introduces an additional check in the component library name validation which raises an error if a component deploys a library which is prefixed with another component's name.
c057381 to
8a9fe85
Compare
DebakelOrakel
approved these changes
Mar 16, 2026
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.
Until now, Commodore's component library name validation only checked that each library is prefixed with the component's name. This isn't sufficient in some cases: for example if we have components
fooandfoo-operator, component foo was allowed to deploy a libraryfoo-operator.libsonnetwhich could cause non-deterministic symlinking if componentfoo-operatoralso deployed the libraryfoo-operator.libsonnet.This PR introduces an additional check in the component library name validation which raises an error if a component deploys a library which is prefixed with another component's name.
Checklist
bug,enhancement,documentation,change,breaking,dependency,internalas they show up in the changelog