Skip to content

Commit 9664662

Browse files
update project QA to show better info about channel namming
1 parent c7a02c8 commit 9664662

File tree

7 files changed

+35688
-37268
lines changed

7 files changed

+35688
-37268
lines changed

cmd/custom/qa/template.go.tmpl

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,7 @@
110110
<th>{{ .PackageName}}</th>
111111
<th>
112112
<p style="color: {{ .ChannelNamingColor}}"> {{ .ChannelNaming}} </p>
113-
<style>
114-
#channel-name-show{{ .PackageName}} {
115-
display: none;
116-
}
117-
118-
#channel-name-show{{ .PackageName}}:target {
119-
display: block;
120-
}
121-
</style>
122-
{{if ne .ChannelNaming "COMPLY"}}
123-
<a href="#channel-name-show{{ .PackageName}}">+Info to fix</a>
113+
{{if ne .ChannelNaming "PROBABLY COMPLY"}}
124114
<div class="html" id="channel-name-show{{ .PackageName}}">
125115
<p>Following the channels names which does not comply. For further information see <a href="https://olm.operatorframework.io/docs/best-practices/channel-naming/"> Channel Naming </a> doc. </p>
126116
<ul>
@@ -130,6 +120,16 @@
130120
</ul>
131121
</div>
132122
{{ end }}
123+
{{if gt (len .ChannelNamesComply) 0}}
124+
<div class="html" id="channel-name-show{{ .PackageName}}">
125+
<p>Following the channels which probably complies: </p>
126+
<ul>
127+
{{ range .ChannelNamesComply }}
128+
<li>{{ . }}</li>
129+
{{ end }}
130+
</ul>
131+
</div>
132+
{{ end }}
133133
</th>
134134
<th>
135135
<p style="color: {{ .DisconnectedAnnotationColor}}"> {{ .DisconnectedAnnotation }} </p>
@@ -253,18 +253,18 @@
253253
</style>
254254
{{ if gt (len .DeprecateAPI) 0 }}
255255
RBAC requested for the API(s):
256-
{{ end }}
257-
<ul>
256+
<ul>
258257
{{ range .DeprecateAPI }}
259258
<li> {{ . }}</li>
260259
{{ end }}
261-
</ul>
262-
<a href="#info-show{{ .PackageName}}">+Info</a>
263-
<div class="html" id="info-show{{ .PackageName }}">
264-
{{ if gt (len .DeprecateAPI) 0 }}
265-
<p style="color: orange" > ATTENTION: See the <a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/https://kubernetes.io/docs/reference/using-api/deprecation-guide/"> guide </a> and ensure that the Operator does not uses the versions that will be removed. </p>
266-
{{ end }}
267-
</div>
260+
</ul>
261+
<a href="#info-show{{ .PackageName}}">+Info</a>
262+
<div class="html" id="info-show{{ .PackageName }}">
263+
{{ if gt (len .DeprecateAPI) 0 }}
264+
<p style="color: orange" > ATTENTION: See the <a href="https://kubernetes.io/docs/reference/using-api/deprecation-guide/https://kubernetes.io/docs/reference/using-api/deprecation-guide/"> guide </a> and ensure that the Operator does not uses the versions that will be removed. </p>
265+
{{ end }}
266+
</div>
267+
{{ end }}
268268
</th>
269269
<th> <p style="color: {{ .SDKUsageColor}}"> {{ .SDKUsage}}</p></th>
270270
<th> <p style="color: {{ .ScorecardCustomImagesColor}}"> {{ .ScorecardCustomImages}}</p></th>

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/certified-operator-inde
6767

6868
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/multiarch_registry.redhat.io_redhat_certified_operator_index_v4.10_2022-03-18.html">[Multi-Arch] - Tag: 4.10</a></li>
6969

70-
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/qa_registry.redhat.io_redhat_certified_operator_index_v4.10_2022-03-18.html">[Projects QA] - Tag: 4.10</a></li>
70+
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/qa_registry.redhat.io_redhat_certified_operator_index_v4.10_2022-03-20.html">[Projects QA] - Tag: 4.10</a></li>
7171

7272
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis-1.22_registry.redhat.io_redhat_certified_operator_index_v4.10_2022-03-18.html">[Removed API(s) in 1.22/OCP 4.9] - Tag: 4.10</a></li>
7373

@@ -98,7 +98,7 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/community-operator-inde
9898

9999
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/multiarch_registry.redhat.io_redhat_community_operator_index_v4.10_2022-03-18.html">[Multi-Arch] - Tag: 4.10</a></li>
100100

101-
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/qa_registry.redhat.io_redhat_community_operator_index_v4.10_2022-03-18.html">[Projects QA] - Tag: 4.10</a></li>
101+
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/qa_registry.redhat.io_redhat_community_operator_index_v4.10_2022-03-20.html">[Projects QA] - Tag: 4.10</a></li>
102102

103103
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis-1.22_registry.redhat.io_redhat_community_operator_index_v4.10_2022-03-18.html">[Removed API(s) in 1.22/OCP 4.9] - Tag: 4.10</a></li>
104104

@@ -129,7 +129,7 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/redhat-marketplace-inde
129129

130130
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/multiarch_registry.redhat.io_redhat_redhat_marketplace_index_v4.10_2022-03-18.html">[Multi-Arch] - Tag: 4.10</a></li>
131131

132-
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/qa_registry.redhat.io_redhat_redhat_marketplace_index_v4.10_2022-03-18.html">[Projects QA] - Tag: 4.10</a></li>
132+
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/qa_registry.redhat.io_redhat_redhat_marketplace_index_v4.10_2022-03-20.html">[Projects QA] - Tag: 4.10</a></li>
133133

134134
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis-1.22_registry.redhat.io_redhat_redhat_marketplace_index_v4.10_2022-03-18.html">[Removed API(s) in 1.22/OCP 4.9] - Tag: 4.10</a></li>
135135

@@ -160,7 +160,7 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/redhat-operator-index</
160160

161161
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/multiarch_registry.redhat.io_redhat_redhat_operator_index_v4.10_2022-03-19.html">[Multi-Arch] - Tag: 4.10</a></li>
162162

163-
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/qa_registry.redhat.io_redhat_redhat_operator_index_v4.10_2022-03-18.html">[Projects QA] - Tag: 4.10</a></li>
163+
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/qa_registry.redhat.io_redhat_redhat_operator_index_v4.10_2022-03-20.html">[Projects QA] - Tag: 4.10</a></li>
164164

165165
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis-1.22_registry.redhat.io_redhat_redhat_operator_index_v4.10_2022-03-18.html">[Removed API(s) in 1.22/OCP 4.9] - Tag: 4.10</a></li>
166166

pkg/reports/custom/qa_report.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ type PackageQA struct {
107107
Validators string
108108
ValidatorsColor string
109109
ChannelNamesNotComply []string
110+
ChannelNamesComply []string
110111
BundlesWithoutDisconnect []string
111112
HeadOfChannels []BundleDeprecate
112113
Capabilities []string
@@ -272,10 +273,13 @@ func (p *PackageQA) checkRemovalAPIs1_25_26() {
272273

273274
func (p *PackageQA) checkChannelNamingScore() {
274275
var foundErrors []string
276+
var OK []string
275277
for _, v := range p.HeadOfChannels {
276278
for _, c := range v.BundleData.Channels {
277279
if !pkg.IsFollowingChannelNameConventional(c) {
278280
foundErrors = append(foundErrors, c)
281+
} else {
282+
OK = append(OK, c)
279283
}
280284
}
281285
}
@@ -286,8 +290,9 @@ func (p *PackageQA) checkChannelNamingScore() {
286290
p.ChannelNaming = "NOT COMPLY"
287291
} else {
288292
p.ChannelNamingColor = GREEN
289-
p.ChannelNaming = "COMPLY"
293+
p.ChannelNaming = "PROBABLY COMPLY"
290294
}
295+
p.ChannelNamesComply = pkg.GetUniqueValues(OK)
291296
}
292297

293298
func (p *PackageQA) checkScorecard() {

0 commit comments

Comments
 (0)