[ROSAENG-435] osdctl cluster context should list PagerDuty incidents for HCP
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 47
- Forks
- 142
- Avg merge
- 21h 19m
- Merged PRs (30d)
- 9
Description
Expected Behavior
When running osdctl cluster context --cluster-id for a HCP cluster, it should return relevant PagerDuty alerts.
Actual Behavior
When running it, it fails to find any incidents and returns none.
Steps to Reproduce:
Run osdctl cluster-context --cluster-id $SOME_HCP_ID
Note the lack of incidents in the output
Environment:
All
Additional Information
This is primarily due to the design of how Classic vs HCP clusters are routed to PD. For classic clusters, we create a PD service per-cluster, and the service name is inferred via the DNS name of the cluster in osdctl here.
We should decouple this first, so it's more obvious, then figure out how to enumerate the list of service IDs in PD based on the clusters region. Once we have that, we can then list incidents for those service(s), and iterate over them, looking at the CustomDetails to map the Cluster ID.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cmd/org/context.go around the linked cluster-context logic at line 210, then reproduce the HCP case with osdctl cluster-context --cluster-id $SOME_HCP_ID. Trace how Classic cluster PagerDuty services are inferred and determine how regional service IDs and CustomDetails should be used to identify incidents by cluster ID. Done means HCP context output lists its relevant PagerDuty incidents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100