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
Conversation
// eslint-disable-next-line dot-notation | ||
const ocsItems = ocsCSV['items'] as ClusterServiceVersionKind[]; |
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.
// eslint-disable-next-line dot-notation | |
const ocsItems = ocsCSV['items'] as ClusterServiceVersionKind[]; | |
const csvItems = ocsList.items as ClusterServiceVersionKind[]; |
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.
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)); |
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.
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]; |
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.
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); |
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.
const ocsCSV = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE); | |
const csvList = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_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.
Why not do this?
// eslint-disable-next-line dot-notation | ||
const csvItems = csvList['items'] as ClusterServiceVersionKind[]; |
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.
// eslint-disable-next-line dot-notation | |
const csvItems = csvList['items'] as ClusterServiceVersionKind[]; | |
const csvItems = csvList?.items as ClusterServiceVersionKind[]; |
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.
csvItems
will not be an array by type, so using dot-notation will throw compile-time error.
@a2batic: This pull request references Bugzilla bug 1883847, which is invalid:
Comment In response to this:
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. |
/bugzilla refresh |
@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
In response to this:
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. |
const csvList = await fetchK8s(ClusterServiceVersionModel, '', CEPH_STORAGE_NAMESPACE); | ||
// eslint-disable-next-line dot-notation | ||
const csvItems = csvList['items'] as ClusterServiceVersionKind[]; |
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.
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>
/retest |
/lgtm |
[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 |
/cherrypick release-4.6 |
@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:
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. |
Thank you |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@a2batic: An error was encountered searching for bug 1883847 on the Bugzilla server at https://bugzilla.redhat.com:
In response to this:
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: new pull request created: #6880 In response to this:
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. |
Removes subscription name dependencies for feature detection in OCS