You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/pkg/scorecard: access CRManifestOpt correctly with `… (#1711)
* internal/pkg/scorecard/scorecard.go: use viper.GetStringSlice() for getting and use []string when setting CRManifestOpt
* CHANGELOG.md: update with scorecard cr-manifests bug fix
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
- Fixes header file content validation when the content contains empty lines or centered text. ([#1544](https://github.com/operator-framework/operator-sdk/pull/1544))
14
14
- Generated CSV's that include a deployment install strategy will be checked for a reference to `metadata.annotations['olm.targetNamespaces']`, and if one is not found a reference will be added to the `WATCH_NAMESPACE` env var for all containers in the deployment. This is a bug because any other value that references the CSV's namespace is incorrect. ([#1396](https://github.com/operator-framework/operator-sdk/pull/1396))
15
15
- Build `-trimpath` was not being respected. `$GOPATH` was not expanding because `exec.Cmd{}` is not executed in a shell environment. ([#1535](https://github.com/operator-framework/operator-sdk/pull/1535))
16
+
- Running the [scorecard](https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#up) with `--olm-deployed` will now only use the first CR set in either the `cr-manifest` config option or the CSV's `metadata.annotations['alm-examples']` as was intended, and access manifests correctly from the config. ([#1565](https://github.com/operator-framework/operator-sdk/pull/1565))
log.Errorf("Could not delete temporary CR manifest file: (%v)", err)
204
+
}
205
+
}
206
+
}()
207
+
} else {
208
+
returnnil, errors.New("cr-manifest config option must be set if CSV has no metadata.annotations['alm-examples']")
209
+
}
210
+
} else {
211
+
// TODO: run scorecard against all CR's in CSV.
212
+
viper.Set(CRManifestOpt, []string{crMans[0]})
213
+
logCRMsg=len(crMans) >1
214
+
}
215
+
// Let users know that only the first CR is being tested.
216
+
iflogCRMsg {
217
+
log.Infof("The scorecard does not support testing multiple CR's at once when run with --olm-deployed. Testing the first CR %s", viper.GetStringSlice(CRManifestOpt)[0])
0 commit comments