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.
Following the previous work done in #214 and #210 we lack the sub-resource reference.
Current problem
If one has define a class with a reference to another service
Which points to this definition
And then want to override the type NodePool so it is also part of aro_hcp.
With the current approach this reference class (node_pools) will be pointing to the
cluster_mgmt/
instead ofaro_hcp/
. We wanted to preserve this links except if it was explicit defined. As this example shown that was not the case.Proposed solution
The types will had a new field, ExplicitDeclared. When a type is referenced as the NodePool shown in the example, this will be set to true. And it will go through the read tree to remove the references from the service where the resource is define and change them to the service that is reading the definition.
Additionally, when generating the rest of the reference tree it will look for ExplicitDeclared types and will change its ownership so it is the same as the version the reader is building.