Skip to content

Commit

Permalink
load core schema last
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev committed Feb 19, 2024
1 parent 46e5509 commit 63f4544
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions providers/extensible_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,16 @@ func (x *extensibleSchema) unsafeRefresh() {
res := resources.Schema{
Resources: map[string]*resources.ResourceInfo{},
}
for _, schema := range x.loaded {
res.Add(schema)

for id, schema := range x.loaded {
if id != BuiltinCoreID {
res.Add(schema)
}
}

// Add the core schema last, so that it cannot be overridden by any other schema
if x.loaded[BuiltinCoreID] != nil {
res.Add(x.loaded[BuiltinCoreID])
}

// Note: This object is read-only and thus must be re-created to
Expand Down

0 comments on commit 63f4544

Please sign in to comment.