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

Add .status.phase to printed columns #1086

Open
wants to merge 1 commit into
base: incubation
Choose a base branch
from

Conversation

akram
Copy link

@akram akram commented Jun 26, 2024

fixes https://issues.redhat.com/browse/RHOAIENG-9101

Description

Adds status.phase to printed colums.

How Has This Been Tested?

Before:

$ oc get dsc
NAME               AGE
default-dsc      86m

Then:

$ oc replace -f oc replace  -f bundle/manifests/datasciencecluster.opendatahub.io_datascienceclusters.yaml
customresourcedefinition.apiextensions.k8s.io/datascienceclusters.datasciencecluster.opendatahub.io replaced

After:

$ oc get dsc
NAME          STATUS   AGE
default-dsc   Ready    86m
  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link

openshift-ci bot commented Jun 26, 2024

Hi @akram. Thanks for your PR.

I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@akram akram force-pushed the add-status-to-printed-columns branch from 4a6322e to 0d1c80a Compare June 26, 2024 18:32
@zdtsw
Copy link
Member

zdtsw commented Jun 27, 2024

thanks for the PR!

I am fine with "Age" to be printed out but I would hold "Status" for a while.
We have an ongoing issue https://issues.redhat.com/browse/RHOAIENG-408 which need to sort out which value to be set in the "Status" first.

@zdtsw zdtsw requested review from etirelli, lphiri and VaishnaviHire and removed request for grdryn and biswassri June 27, 2024 08:12
@zdtsw
Copy link
Member

zdtsw commented Jun 27, 2024

maybe what you really want to add is a new field of "Created At" ?
//+kubebuilder:printcolumn:name="Created At",type=string,JSONPath=.metadata.creationTimestamp
if Age has been included before this PR

@akram
Copy link
Author

akram commented Jun 28, 2024

Name and Age are the default 2 columns that are always printed if developer doesn't set anything.
If kubebuilder:printcolumn is added, it will add the specified column after the Name and nothing else except what is specified by kubebuilder:printcolumn . This is why I re-added Age.

Age is also the default label used to display .metadata.creationTimestamp . If you run for example oc get pods , you will get amongst other things, Name and Age.

I see for the .status value issue. Does it prevent from displaying the value even if it is incorrect?

@akram akram force-pushed the add-status-to-printed-columns branch from 0d1c80a to cef3ec6 Compare June 29, 2024 14:20
@zdtsw
Copy link
Member

zdtsw commented Jul 12, 2024

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Ok to Test and removed needs-ok-to-test labels Jul 12, 2024
@akram akram force-pushed the add-status-to-printed-columns branch from cef3ec6 to 50416d6 Compare July 25, 2024 12:51
Copy link

openshift-ci bot commented Jul 25, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jackdelahunt for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@ajaypratap003
Copy link
Contributor

@zdtsw This is very old PR. Changes looks fine. Should we merge this PR ?

@akram akram force-pushed the add-status-to-printed-columns branch from 50416d6 to dfb71cb Compare September 9, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Ok to Test
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants