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

Marketplace OPSRC&CSC with publisher&displayName #23711

Merged
merged 9 commits into from Nov 26, 2019
Merged

Marketplace OPSRC&CSC with publisher&displayName #23711

merged 9 commits into from Nov 26, 2019

Conversation

emmajiafan
Copy link
Contributor

Auto [OCP-21728 check the publisher,display,labels of opsrc&csc] @kevinrizza @ecordell Could you help review it? Thanks very much! The test case covers OCP-21728 for marketplace. cc: @bandrade @scolange @cuipinghuo @dongboyan77 @zihantang-rh @jianzhangbjz @chengzhang1016

The logs as below:

passed: (1m33s) 2019-09-02T16:22:38 "[Feature:Marketplace] Marketplace resources with labels provider displayName [ocp-21728]create opsrc with labels [Suite:openshift/conformance/parallel]"
Timeline:

Sep 02 16:21:15.028 I ns/openshift-marketplace deployment/opsrctestlabel Scaled up replica set opsrctestlabel-76fcd58f7d to 1
Sep 02 16:21:15.028 I ns/openshift-marketplace replicaset/opsrctestlabel-76fcd58f7d Created pod: opsrctestlabel-76fcd58f7d-nbqjc
Sep 02 16:21:15.028 I ns/openshift-marketplace pod/opsrctestlabel-76fcd58f7d-nbqjc Successfully assigned openshift-marketplace/opsrctestlabel-76fcd58f7d-nbqjc to ip-10-0-154-110.ap-northeast-2.compute.internal
Sep 02 16:21:15.037 I ns/openshift-marketplace pod/opsrctestlabel-76fcd58f7d-nbqjc node/ created
Sep 02 16:21:16.559 I ns/openshift-marketplace pod/opsrctestlabel-76fcd58f7d-nbqjc Container image "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1ac6e4de4a360f1d33e141aa06f968de71cb4dfbe88711bcf35995f12a06c654" already present on machine
...
Sep 02 16:22:37.889 I ns/openshift-marketplace pod/opsrctestlabel-76fcd58f7d-nbqjc Stopping container opsrctestlabel
Sep 02 16:22:38.735 W ns/openshift-marketplace pod/csctestlabel-6f7dbdcb9d-9jxbr node/ip-10-0-154-110.ap-northeast-2.compute.internal graceful deletion within 30s
Sep 02 16:22:38.746 I ns/openshift-marketplace pod/csctestlabel-6f7dbdcb9d-9jxbr Stopping container csctestlabel

Writing JUnit report to junit_e2e_20190902-162238.xml

1 pass, 0 skip (1m33s)

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 2, 2019
@emmajiafan
Copy link
Contributor Author

/retest

Copy link
Member

@kevinrizza kevinrizza left a comment

Choose a reason for hiding this comment

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

Can you more clearly state the purpose of this test? What labels are we trying to test and why? It seems like we are testing that custom labels are propogated to child resources, but we are also testing that the generated ones are? Should those maybe be separate tests?

And why are we checking the packagemanifest for labels? That may also be a valid test, but it seems like it should also maybe be a separate one.

allNs = "openshift-operators"
marketplaceNs = "openshift-marketplace"

//buildPruningBaseDir = exutil.FixturePath("testdata", "marketplace")
Copy link
Member

Choose a reason for hiding this comment

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

Should this commented out code be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will remove

g.It("[ocp-21728]create opsrc with labels", func() {

//create one opsrc with label
//opsrcYaml := exutil.FixturePath("testdata", "marketplace", "opsrc", "02-opsrc.yaml")
Copy link
Member

Choose a reason for hiding this comment

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

Same question about commented code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will remove

//get the packagelist with label of opsrctestlabel
packageListOpsrc2, _ := oc.AsAdmin().WithoutNamespace().Run("get").Args("packagemanifests", "-lopsrc-provider=optestlabel", "-o=name", "-n", marketplaceNs).Output()
for _, packages := range packageList {
o.Expect(packageListOpsrc2).Should(o.ContainSubstring(packages))
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused by this last part. I thought the purpose of this test was to check label propogation on marketplace child resources? Why are we checking the packagemanifest here? Or am I misunderstanding the purpose of this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test will check label propogation on marketplace child resources and the packagemanifests from the child "catalogsource" ,The packcagemanifests will alsoo attache the label and they can be filtered by the label.

- name: MARKETPLACE
- name: PACKAGES
- name: DISPLAYNAME
- name: PUBLISHER
Copy link
Member

Choose a reason for hiding this comment

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

This needs a newline at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add

- name: MARKETPLACE
- name: LABEL
- name: DISPLAYNAME
- name: PUBLISHER
Copy link
Member

Choose a reason for hiding this comment

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

This also needs a newline at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add

@emmajiafan
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link

@emmajiafan: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jianzhangbjz
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 11, 2019
cscYaml, err := oc.AsAdmin().Run("process").Args("--ignore-unknown-parameters=true", "-f", cscYamltem, "-p", "NAME=csctestlabel", fmt.Sprintf("NAMESPACE=%s", allNs), fmt.Sprintf("MARKETPLACE=%s", marketplaceNs), "PACKAGES=descheduler-test", "DISPLAYNAME=csctestlabel", "PUBLISHER=csctestlabel").OutputToFile("config.json")
err = createResources(oc, cscYaml)
o.Expect(err).NotTo(o.HaveOccurred())
time.Sleep(15 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, the same as the above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update to use wait.Poll


err = createResources(oc, opsrcYaml)
o.Expect(err).NotTo(o.HaveOccurred())
time.Sleep(30 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

@emmajiafan It's better to use wait.Poll instead of the Sleep function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update to use wait.Poll

return true, nil
}

func isResourceItemsEmpty(resourceList map[string]interface{}) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

@emmajiafan Do we still need to use this function? If not, please remove it and other functions which we don't need.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

already remove

@emmajiafan
Copy link
Contributor Author

/retest

@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2019
@emmajiafan
Copy link
Contributor Author

Hi @knobunc , could you help add "approved" label to make this pr merged? Thanks

@knobunc
Copy link
Contributor

knobunc commented Nov 25, 2019

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: emmajiafan, kevinrizza, knobunc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 25, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

11 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 4117b20 into openshift:master Nov 26, 2019
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 26, 2019

@emmajiafan: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-gcp 68ac80d link /test e2e-gcp
ci/prow/e2e-cmd 68ac80d link /test e2e-cmd

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants