-
Notifications
You must be signed in to change notification settings - Fork 125
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
OSD-24997: Show if a user is banned when using osdctl cluster context #671
Conversation
…not.
@Mhodesty: This pull request references OSD-24997 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 story to target the "4.19.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
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.
Can you post some terminal output of this running with the new output, mostly because this command has zero unit tests and would be good to see it work if we aren't going to add test coverage
@@ -734,6 +759,21 @@ func printDynatraceResources(data *contextData) { | |||
} | |||
} | |||
|
|||
func printUserBannedStatus(data *contextData) { | |||
var name string = "User Ban Details" | |||
fmt.Println("\n" + delimiter + name) |
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.
Are we always using fmt.Println
already above? If so this is adding an extra \n
between the last printed text and this.
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.
Hi JB.
https://redhat-internal.slack.com/archives/CCX9DB894/p1739809796051329
Here's a thread with the output on a cluster where a user is banned. See Jim's comment from 12:01 Saturday. I've also pasted the output as it shows in the command in the code block below.
This adds an extra \n between "User Ban Details" and "User is banned" or "User is not banned" increasing readability.
>> User Ban Details
User is banned
Ban code = pending
Ban description = pending
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.
I more meant the full command output of osdctl cluster context $CLUSTER_ID
to see if there is an extra newline
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.
Sure. Here's the output of the osdctl command run on a cluster. I redacted the cluster identifying information but the output looks clean to me.
>> PagerDuty Alerts
Service: [Redacted]
None
>> External resources
CCX dashboard [Redacted]
OHSS Cards [Redacted]
PagerDuty Service [Redacted]
Splunk Audit Logs [Redacted]
>> Dynatrace Details
Not an HCP or MC Cluster
>> User Ban Details
User is not banned
@Mhodesty: all tests passed! Full PR test history. Your PR dashboard. 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. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: joshbranham, Mhodesty 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 |
This PR adds output to osdctl cluster context to show if a user is banned. The goal is to cut down on SRE toil time by showing this information at the beginning of the troubleshooting process. Output looks like this