Skip to content

Commit 0e32e17

Browse files
update tag comparison for revision
1 parent 2705601 commit 0e32e17

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

pkg/apic/apiservicerevision.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,13 @@ func (c *ServiceClient) checkAndUpdateExistingRevision(serviceBody *ServiceBody,
211211
// different, return the updated tags
212212
func (c *ServiceClient) getUpdatedTagKeys(serviceBodyTags map[string]interface{}, revisionTags []string) []string {
213213
// Extract values from map and convert to []string
214-
mapValues := []string{}
215-
for _, v := range serviceBodyTags {
216-
if strVal, ok := v.(string); ok {
217-
mapValues = append(mapValues, strVal)
218-
}
219-
}
214+
tags := mapToTagsArray(serviceBodyTags, c.cfg.GetTagsToPublish())
220215

221216
// Compare
222-
if util.StringSlicesEqualUnordered(mapValues, revisionTags) {
217+
if util.StringSlicesEqualUnordered(tags, revisionTags) {
223218
return []string{} // return empty string slice if equal
224219
}
225220

226-
// If not equal, return the keys from serviceBodyTags
227-
tags := mapToTagsArray(serviceBodyTags, c.cfg.GetTagsToPublish())
228221
return tags
229222
}
230223

0 commit comments

Comments
 (0)