Skip to content

Conversation

@devppratik
Copy link
Contributor

We are looking to migrate from the Handover Doc to a JIRA based Handover Board. This would allow to use JIRA queries to directly display related handover announcements at the time of login for the cluster based on ID, Customer Name, Version and Product.

This PR adds the functionality to query JIRA and print the related announcements for the cluster.

Related Issue OSD-28505

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 6, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 6, 2025

@devppratik: This pull request references OSD-28506 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

We are looking to migrate from the Handover Doc to a JIRA based Handover Board. This would allow to use JIRA queries to directly display related handover announcements at the time of login for the cluster based on ID, Customer Name, Version and Product.

This PR adds the functionality to query JIRA and print the related announcements for the cluster.

Related Issue OSD-28505

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from Tafhim and clcollins June 6, 2025 06:13
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2025
@devppratik devppratik force-pushed the add-handover-announcements-for-osdctl-cluster-context branch 2 times, most recently from 89feda0 to 0bb570f Compare June 9, 2025 04:21
@chamalabey
Copy link
Contributor

@devppratik I have started testing your changes and noticed that cluster context does not show the announcement for staging cluster 2ja1c3di93h0jk8mm0h12hg7jg83nap2 with the announcement https://issues.redhat.com/browse/SREPHOA-9
Please have a look and let me know if I am missing something .

@devppratik devppratik force-pushed the add-handover-announcements-for-osdctl-cluster-context branch from 0bb570f to cc6a161 Compare June 10, 2025 06:12
Improve search logic for Handover Announcements

Fix minor issues

Fix Lint

Fix Lint

Add logic to print unique announcements

Fix validMatch logic
@devppratik devppratik force-pushed the add-handover-announcements-for-osdctl-cluster-context branch from cc6a161 to dfc4b75 Compare June 10, 2025 06:23
@chamalabey
Copy link
Contributor

chamalabey commented Jun 10, 2025

Thank you @devppratik for the MR.

When testing, have noticed that cluster context command is returning same announcement twice when the announcment is for the cluster id and may be the version. We might need to remove duplicates in the list before we print the results of the JIRA query.
e.g. in staging

✘-127 ~/Documents/workspace/sre/github.com/openshift/osdctl [add-handover-announcements-for-osdctl-cluster-context L|✔] 
16:30 $ ./dist/osdctl_linux_amd64_v1/osdctl cluster context --cluster-id 2ja1c3di93h0jk8mm0h12hg7jg83nap2WARN: The current version (v0.44.2-next) is different than the latest released version (v0.44.2). It is recommended that you update to the latest released version to ensure that no known bugs or issues are hit.
Continue? (y/N): y
Encountered Errors during data collection. Displayed data may be incomplete: 
	skipping PagerDuty context collection: Could not build PagerDuty Client - No configured tokens
============================================
incident -- 2ja1c3di93h0jk8mm0h12hg7jg83nap2
============================================
ID:				2ja1c3di93h0jk8mm0h12hg7jg83nap2
External ID:			544bda53-5c34-4653-963e-b671f34b20f8
Name:				incident
Domain Prefix:			incident
Display Name:			incident
State:				ready 
API URL:			https://api.incident.jtir.s3.devshift.org:443
API Listening:			external
Console URL:			https://console-openshift-console.apps.rosa.incident.jtir.s3.devshift.org
Cluster History URL:		https://cloud.redhat.com/openshift/details/s/2yFwOzJakdQ5wK1oKi449vNVxPA#clusterHistory
Control Plane:
				Replicas: 0
Infra:
				Replicas: 0
Compute:
				Replicas: 3
Product:			rosa
Subscription type:		marketplace-aws
Provider:			aws
Version:			4.16.34
Region:				us-east-2
Multi-az:			true
CNI Type:			OVNKubernetes
PrivateLink:			false
STS:				true
Subnet IDs:			[...]
CCS:				true
HCP:				true
Existing VPC:			true
Channel Group:			stable
Cluster Admin:			true
Organization:			Red Hat-Service Delivery-CSSRE
Creator:			xxx
Email:				xxx
AccountNumber:          	xxxx
Created:			2025-06-09T04:33:21Z
Expiration:			2025-06-12T21:53:15Z
.
.

>> Related Handover Announcements
[SREPHOA-9]: Test
- Link: https://issues.redhat.com/browse/SREPHOA-9

[SREPHOA-9]: Test
- Link: https://issues.redhat.com/browse/SREPHOA-9

[SREPHOA-8]: ROSA HCP 4.14 clusters are being force upgraded
- Link: https://issues.redhat.com/browse/SREPHOA-8

[SREPHOA-7]: Regarding HCP Clusters
- Link: https://issues.redhat.com/browse/SREPHOA-7

[SREPHOA-5]: Regarding OHSS tickets
- Link: https://issues.redhat.com/browse/SREPHOA-5

[SREPHOA-4]: Regarding PagerDuty Alerts
- Link: https://issues.redhat.com/browse/SREPHOA-4

[SREPHOA-3]: For issues related to ROSA HCP please consult the following spreadsheet, you might find it’s already tracked
- Link: https://issues.redhat.com/browse/SREPHOA-3


@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 10, 2025

@devppratik: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@devppratik
Copy link
Contributor Author

@chamalabey It has been fixed. Please review again

@chamalabey
Copy link
Contributor

@devppratik Have tested and new changes looks good.

@chamalabey
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Jun 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chamalabey, devppratik

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

The pull request process is described here

Details 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-merge-bot openshift-merge-bot bot merged commit b762f39 into openshift:master Jun 11, 2025
7 checks passed
Copy link
Contributor

@joshbranham joshbranham 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 come back and add some tests for these new changes?

@devppratik
Copy link
Contributor Author

@joshbranham Sure I can add some test cases, but the jira.go file would need to be refactored to make it mockable and testable. Will take up in a separate PR

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants