Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use scorecard v1alpha3 #3208

Merged
merged 6 commits into from
Jun 16, 2020

Conversation

fabianvf
Copy link
Member

@fabianvf fabianvf commented Jun 9, 2020

Description of the change:
We will now use the newly defined Scorecard v1alpha3 API instead of v1alpha2

Motivation for the change:
v1alpha2 has been superseded by v1alpha3

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 9, 2020
@fabianvf fabianvf changed the title [WIP] Use scorecard v1alpha3 Use scorecard v1alpha3 Jun 10, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 10, 2020
@@ -697,6 +697,7 @@ github.com/operator-framework/operator-sdk v0.17.0 h1:+TTrGjXa+lm7g7Cm0UtFcgOjnw
github.com/operator-framework/operator-sdk v0.17.0/go.mod h1:wmYi08aoUmtgfoUamURmssI4dkdFGNtSI1Egj+ZfBnk=
Copy link
Member

Choose a reason for hiding this comment

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

This file should be gitignore'd

mockResult.Name = "mocked test"
mockResult.Description = "mocked test description"
mockResult.State = v1alpha2.PassState
// mockResult.Description = "mocked test description"
Copy link
Member

Choose a reason for hiding this comment

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

Can this be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Knew I'd miss one

Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

Other than 2 nits

/lgtm

A final review from @jmccormick2001 before merging

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2020
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

@@ -103,6 +103,7 @@ images/scorecard-test/scorecard-test
pkg/ansible/runner/testdata/valid.yaml
/bin
test/test-framework/go.sum
internal/scorecard/alpha/examples/custom-scorecard-tests/go.sum

# Website
website/public/
Copy link
Contributor

Choose a reason for hiding this comment

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

should we not add a fragment for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so, shouldn't have any impact on the user. Fragment probably required for some other stuff htough

Copy link
Contributor

Choose a reason for hiding this comment

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

is not it changing the json output? see here

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like that link just takes me back to this conversation

s/ScorecardTestResult/TestResult

s/ScorecardOutput/Test

s/output.Results/output.Status.Results

Fix errors in formatting.go

s/testOutput.Results/testOutput.Status.Results

Unit tests now passing

Remove unused description argument

Description has been removed

Update scorecard alpha docs
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Great work 👍 . just maybe the nit of the fragment otherwise
/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2020
@@ -25,30 +25,29 @@ const (
)

// CheckSpecTest verifies that CRs have a spec block
func CheckSpecTest(bundle *apimanifests.Bundle) scapiv1alpha2.ScorecardTestResult {
r := scapiv1alpha2.ScorecardTestResult{}
func CheckSpecTest(bundle *apimanifests.Bundle) scapiv1alpha3.TestResult {
Copy link
Contributor

Choose a reason for hiding this comment

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

we want with v1alpha3 for a test to be able to return multiple test results instead of just a single result as before. So instead of returning TestResult, all the tests (basic/olm) should return a TestStatus, in cases like basic/olm where only a single test result is created, you end up with a TestStatus that has Results length = 1.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2020
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@fabianvf fabianvf merged commit 3f68256 into operator-framework:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants