-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Automate [OLM] [OCP-21082] - [bz 1670311] Implement packages API server and list packagemanifest info with namespace not NULL #23772
Conversation
/retest |
/test e2e-cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. Just one comment:
/retest |
@bandrade Got below errors, please have a check, thanks! fail [github.com/openshift/origin/test/extended/operators/olm.go:81]: Unexpected error:
<*util.ExitError | 0xc001a987e0>: {
Cmd: "oc --config=/tmp/admin.kubeconfig get packagemanifest --all-namespaces --no-headers",
StdErr: "Error from server: no table handler registered for this type *operators.PackageManifestList",
ExitError: { |
@jianzhangbjz it seems to be an issue with 4.3, so this test will aggregate when it's been merged =).
Tracking this with https://bugzilla.redhat.com/show_bug.cgi?id=1761924 |
/retest |
@njhale operator-framework/operator-lifecycle-manager#1078 was merged and now all jobs succeeded. Can you please review again? cc: @jianzhangbjz |
test/extended/operators/olm.go
Outdated
o.Expect(err).NotTo(o.HaveOccurred()) | ||
for _, packageManifest := range strings.Split(msg, "\n") { | ||
fields := strings.Fields(packageManifest) | ||
if string(fields[0]) == " " && len(fields) < 4 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This checks that there's the expected number of fields - could we loop through them and verify that namespace is one of them instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was discussed previously on #23772 (comment) with @njhale. I'm verifying the number of fields due to one of them is optional(displayName), so the best approach that I found is to check when the line has less than 4 fields if the first character of the line is blank, which would check that namespace field was not returned. Please let me know if you have any suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something like this?
var packageserverLine string
for _, line := range strings.Split(msg, "\n") {
if strings.Contains(line, "packageserver") {
packageserverLine = line
}
}
if !strings.Contains(packageserverLine, "openshift-operator-lifecycle-manager") {
e2e.Failf("bad")
}
that way we look for a line we expect to be there, and ensure it has the correct value of the namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, that will make this test to perform faster. Thank you for the suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed as requested, I just changed the packageserver
to etcd
and namespace to openshift-marketplace
. The test passed locally. Thanks
@bandrade Why are there so many commits here? is this targeting the right base branch? |
@ecordell I'm rebasing with the master, since this branch was created on Sep 12 there are a lot of commits after the branch was created. |
@ecordell Is there anything that I should do to move on this PR? Thanks |
@bandrade There are so many modified files. Could you help add your code based on the latest master branch? Thanks! |
/retest |
1 similar comment
/retest |
@ecordell @jianzhangbjz , removed the wrong rebase, now it has only my changes and tests looks good. Can you please review? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the most part this looks great. I just have some questions about some of the hard coded strings here.
/lgtm |
/retest |
1 similar comment
/retest |
/test e2e-aws-fips |
/retest |
/test e2e-aws-fips |
@bparees Could you help give approval? Thanks! |
/approve @bandrade please squash your commits and get someone from the olm-team to lgtm. |
/retest |
… with namespace not NULL
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bandrade, bparees, kevinrizza 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@bandrade: The following test failed, say
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. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@ecordell @njhale As title, please have a review. Thanks! cc: @cuipinghuo @scolange @chengzhang1016 @zihantang-rh @emmajiafan @jianzhangbjz
Success execution (when every package has namespace name defined)