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

Bug 1883847: Fix subscription name issue for OCS #6860

Merged
merged 1 commit into from Oct 8, 2020

Conversation

a2batic
Copy link
Contributor

@a2batic a2batic commented Oct 7, 2020

Removes subscription name dependencies for feature detection in OCS

@openshift-ci-robot openshift-ci-robot added the component/ceph Related to ceph-storage-plugin label Oct 7, 2020
Comment on lines 107 to 108
// eslint-disable-next-line dot-notation
const ocsItems = ocsCSV['items'] as ClusterServiceVersionKind[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// eslint-disable-next-line dot-notation
const ocsItems = ocsCSV['items'] as ClusterServiceVersionKind[];
const csvItems = ocsList.items as ClusterServiceVersionKind[];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

csvItems will not be an array by type, so using dot-notation will throw compile-time error.

const ocsCSV = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);
// eslint-disable-next-line dot-notation
const ocsItems = ocsCSV['items'] as ClusterServiceVersionKind[];
const ocsObj = ocsItems.find((obj) => getName(obj).includes(OCS_OPERATOR));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const ocsObj = ocsItems.find((obj) => getName(obj).includes(OCS_OPERATOR));
const ocsCSV = csvItems.find((obj) => getName(obj).includes(OCS_OPERATOR));


const support = getAnnotations(ocsCSV)[OCS_SUPPORT_ANNOTATION];
const support = getAnnotations(ocsObj)[OCS_SUPPORT_ANNOTATION];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const support = getAnnotations(ocsObj)[OCS_SUPPORT_ANNOTATION];
const support = getAnnotations(ocsCSV)[OCS_SUPPORT_ANNOTATION];

subscription?.status?.currentCSV,
CEPH_STORAGE_NAMESPACE,
);
const ocsCSV = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const ocsCSV = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);
const csvList = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);

Copy link
Contributor

@bipuladh bipuladh left a comment

Choose a reason for hiding this comment

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

Why not do this?

Comment on lines 107 to 108
// eslint-disable-next-line dot-notation
const csvItems = csvList['items'] as ClusterServiceVersionKind[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// eslint-disable-next-line dot-notation
const csvItems = csvList['items'] as ClusterServiceVersionKind[];
const csvItems = csvList?.items as ClusterServiceVersionKind[];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

csvItems will not be an array by type, so using dot-notation will throw compile-time error.

@a2batic a2batic changed the title Fix subscription name issue for OCS Bug 1883847: Fix subscription name issue for OCS Oct 8, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. label Oct 8, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: This pull request references Bugzilla bug 1883847, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "4.6.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1883847: Fix subscription name issue for OCS

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Oct 8, 2020
@bipuladh
Copy link
Contributor

bipuladh commented Oct 8, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 8, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1883847, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Oct 8, 2020
Comment on lines 106 to 108
const csvList = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);
// eslint-disable-next-line dot-notation
const csvItems = csvList['items'] as ClusterServiceVersionKind[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const csvList = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);
// eslint-disable-next-line dot-notation
const csvItems = csvList['items'] as ClusterServiceVersionKind[];
const csvList: any = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE);
const csvItems = csvList.items as ClusterServiceVersionKind[];

Signed-off-by: Kanika Murarka <kmurarka@redhat.com>
@a2batic
Copy link
Contributor Author

a2batic commented Oct 8, 2020

/retest

@bipuladh
Copy link
Contributor

bipuladh commented Oct 8, 2020

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a2batic, bipuladh

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 Oct 8, 2020
@bipuladh
Copy link
Contributor

bipuladh commented Oct 8, 2020

/cherrypick release-4.6

@openshift-cherrypick-robot

@bipuladh: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.6

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.

@bipuladh
Copy link
Contributor

bipuladh commented Oct 8, 2020

@bipuladh: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

Thank you

@openshift-bot
Copy link
Contributor

/retest

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

3 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-merge-robot openshift-merge-robot merged commit 96c2242 into openshift:master Oct 8, 2020
@openshift-ci-robot
Copy link
Contributor

@a2batic: An error was encountered searching for bug 1883847 on the Bugzilla server at https://bugzilla.redhat.com:

response code 500 not 200
Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1883847: Fix subscription name issue for OCS

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.

@openshift-cherrypick-robot

@bipuladh: new pull request created: #6880

In response to this:

/cherrypick release-4.6

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.

@spadgett spadgett added this to the v4.7 milestone Oct 13, 2020
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. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants