Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,15 @@ generate-samples: install
go run ./hack/samples/generate_samples.go

.PHONY: generate-testdata ## Generate the full testdata directory
generate-testdata: generate-samples
generate-testdata:
docker login https://registry.redhat.io
make generate-samples
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this not working as a prerequisite? Is there something different/better about calling it explicitly? I think calling it this way will launch a 2nd make as a sub-task to run it.

Copy link
Collaborator Author

@camilamacedo86 camilamacedo86 Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add the docker login there to make it easier for others to understand and to force that is a pre-requirement for the makefile target. The go mod will try to log in as well but not the sample. The motivation here is:

  • I do not know how it works
  • I know that I need to run this target
  • Then, it will fail immediately if the person has not the login and will be easier to get this requirement

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those seem like reasonable justifications to doing it this way. 👍

go run ./hack/report/bundles/generate.go
make generate-dashboards
make generate-index

.PHONY: generate-index ## Generate index.html
generate-index:
go run ./hack/index/generate.go

.PHONY: generate-dashboards ## Generate the testdata custom dashboards
generate-dashboards:
go run ./hack/deprecate-api/generate.go
go run ./hack/grade/generate.go
go run ./hack/index/generate.go
16 changes: 5 additions & 11 deletions hack/grade/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,11 @@ func main() {
pathToWalk := filepath.Join(fullReportsPath, dir)
dashboardPath := filepath.Join(fullReportsPath, dir, "dashboards")

//command := exec.Command("rm", "-rf", dashboardPath)
//_, err = pkg.RunCommand(command)
//if err != nil {
// log.Errorf("running command :%s", err)
//}

//command = exec.Command("mkdir", dashboardPath)
//_, err = pkg.RunCommand(command)
//if err != nil {
// log.Errorf("running command :%s", err)
//}
command := exec.Command("mkdir", dashboardPath)
_, err = pkg.RunCommand(command)
if err != nil {
log.Warnf("running command :%s", err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like ERROR level not WARN, kinda dead in the water if it can't mkdir.

Copy link
Collaborator Author

@camilamacedo86 camilamacedo86 Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We call that in chan and should no fail. If the dir exist then, it does not need to be created.

These silly fixes are for you folks to be able to run the audit as well in a straightforward way. If we remove the dir or raise an error here the reports will not be gen when you call the make testdata-generate for that. Note that it was a comment before.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, okay, got it. sounds reasonable

}

if _, err := os.Stat(pathToWalk); err != nil && os.IsNotExist(err) {
continue
Expand Down
52 changes: 26 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ <h1>Available Dashboards</h1>
<h4 class="display-12 fw-bold">quay.io/operatorhubio/catalog</h4>
<ul>

<li><a href="testdata/reports/operatorhubio_catalog/dashboards/deprecate-apis_quay.io_operatorhubio_catalog_latest_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: latest</a></li>
<li><a href="testdata/reports/operatorhubio_catalog/dashboards/deprecate-apis_quay.io_operatorhubio_catalog_latest_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: latest</a></li>

<li><a href="testdata/reports/operatorhubio_catalog/dashboards/grade_quay.io_operatorhubio_catalog_latest_2021-07-05.html">[Grade - Experimental] - Tag: latest</a></li>
<li><a href="testdata/reports/operatorhubio_catalog/dashboards/grade_quay.io_operatorhubio_catalog_latest_2021-07-13.html">[Grade - Experimental] - Tag: latest</a></li>

</ul>
</div>
Expand All @@ -59,17 +59,17 @@ <h4 class="display-12 fw-bold">quay.io/operatorhubio/catalog</h4>
<h4 class="display-12 fw-bold">registry.redhat.io/redhat/certified-operator-index</h4>
<ul>

<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_certified_operator_index_v4.6_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_certified_operator_index_v4.6_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_certified_operator_index_v4.7_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_certified_operator_index_v4.7_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>

<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/grade_registry.redhat.io_redhat_certified_operator_index_v4.6_2021-07-05.html">[Grade - Experimental] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/grade_registry.redhat.io_redhat_certified_operator_index_v4.6_2021-07-13.html">[Grade - Experimental] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/grade_registry.redhat.io_redhat_certified_operator_index_v4.7_2021-07-05.html">[Grade - Experimental] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/grade_registry.redhat.io_redhat_certified_operator_index_v4.7_2021-07-13.html">[Grade - Experimental] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/grade_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-07-05.html">[Grade - Experimental] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_certified_operator_index/dashboards/grade_registry.redhat.io_redhat_certified_operator_index_v4.8_2021-07-13.html">[Grade - Experimental] - Tag: 4.8</a></li>

</ul>
</div>
Expand All @@ -78,17 +78,17 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/certified-operator-inde
<h4 class="display-12 fw-bold">registry.redhat.io/redhat/community-operator-index</h4>
<ul>

<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_community_operator_index_v4.6_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_community_operator_index_v4.6_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_community_operator_index_v4.7_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_community_operator_index_v4.7_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_community_operator_index_v4.8_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_community_operator_index_v4.8_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>

<li><a href="testdata/reports/redhat_community_operator_index/dashboards/grade_registry.redhat.io_redhat_community_operator_index_v4.6_2021-07-05.html">[Grade - Experimental] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/grade_registry.redhat.io_redhat_community_operator_index_v4.6_2021-07-13.html">[Grade - Experimental] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_community_operator_index/dashboards/grade_registry.redhat.io_redhat_community_operator_index_v4.7_2021-07-05.html">[Grade - Experimental] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/grade_registry.redhat.io_redhat_community_operator_index_v4.7_2021-07-13.html">[Grade - Experimental] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_community_operator_index/dashboards/grade_registry.redhat.io_redhat_community_operator_index_v4.8_2021-07-05.html">[Grade - Experimental] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_community_operator_index/dashboards/grade_registry.redhat.io_redhat_community_operator_index_v4.8_2021-07-13.html">[Grade - Experimental] - Tag: 4.8</a></li>

</ul>
</div>
Expand All @@ -97,17 +97,17 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/community-operator-inde
<h4 class="display-12 fw-bold">registry.redhat.io/redhat/redhat-marketplace-index</h4>
<ul>

<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_marketplace_index_v4.6_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_marketplace_index_v4.6_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_marketplace_index_v4.7_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_marketplace_index_v4.7_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>

<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/grade_registry.redhat.io_redhat_redhat_marketplace_index_v4.6_2021-07-05.html">[Grade - Experimental] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/grade_registry.redhat.io_redhat_redhat_marketplace_index_v4.6_2021-07-13.html">[Grade - Experimental] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/grade_registry.redhat.io_redhat_redhat_marketplace_index_v4.7_2021-07-05.html">[Grade - Experimental] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/grade_registry.redhat.io_redhat_redhat_marketplace_index_v4.7_2021-07-13.html">[Grade - Experimental] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/grade_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-07-05.html">[Grade - Experimental] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_redhat_marketplace_index/dashboards/grade_registry.redhat.io_redhat_redhat_marketplace_index_v4.8_2021-07-13.html">[Grade - Experimental] - Tag: 4.8</a></li>

</ul>
</div>
Expand All @@ -116,17 +116,17 @@ <h4 class="display-12 fw-bold">registry.redhat.io/redhat/redhat-marketplace-inde
<h4 class="display-12 fw-bold">registry.redhat.io/redhat/redhat-operator-index</h4>
<ul>

<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_operator_index_v4.6_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_operator_index_v4.6_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_operator_index_v4.7_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_operator_index_v4.7_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-07-05.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/deprecate-apis_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-07-13.html">[Deprecated API(s) in 1.22/OCP 4.9] - Tag: 4.8</a></li>

<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/grade_registry.redhat.io_redhat_redhat_operator_index_v4.6_2021-07-05.html">[Grade - Experimental] - Tag: 4.6</a></li>
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/grade_registry.redhat.io_redhat_redhat_operator_index_v4.6_2021-07-13.html">[Grade - Experimental] - Tag: 4.6</a></li>

<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/grade_registry.redhat.io_redhat_redhat_operator_index_v4.7_2021-07-05.html">[Grade - Experimental] - Tag: 4.7</a></li>
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/grade_registry.redhat.io_redhat_redhat_operator_index_v4.7_2021-07-13.html">[Grade - Experimental] - Tag: 4.7</a></li>

<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/grade_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-07-05.html">[Grade - Experimental] - Tag: 4.8</a></li>
<li><a href="testdata/reports/redhat_redhat_operator_index/dashboards/grade_registry.redhat.io_redhat_redhat_operator_index_v4.8_2021-07-13.html">[Grade - Experimental] - Tag: 4.8</a></li>

</ul>
</div>
Expand Down
Binary file not shown.
Loading