Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

ace validator: fix app annotations validation. #649

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions ace/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,10 @@ func validatePodMetadata(metadataURL string, pm *schema.PodManifest) results {
func validateAppAnnotations(metadataURL string, pm *schema.PodManifest, app *schema.RuntimeApp, img *schema.ImageManifest) results {
r := results{}

// build a map of expected annotations by merging app.Annotations
// build a map of expected annotations by merging img.Annotations
// with PodManifest overrides
expectedAnnots := app.Annotations
a := pm.Apps.Get(app.Name)
if a == nil {
panic("could not find app in manifest!")
}
for _, annot := range a.Annotations {
expectedAnnots := img.Annotations
for _, annot := range app.Annotations {
expectedAnnots.Set(annot.Name, annot.Value)
}
if len(expectedAnnots) == 0 {
Expand Down