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 statusMessage in activation for better display #255

Merged
merged 1 commit into from
May 14, 2024

Conversation

msftcoderdjw
Copy link
Contributor

@msftcoderdjw msftcoderdjw commented May 10, 2024

$ kubectl get activation
NAME         NEXT STAGE   STATUS
04workflow                Done  // printColumn will use statusMessage to display.
$ kubectl describe activation
Name:         04workflow
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  workflow.symphony/v1
Kind:         Activation
Metadata:
  Creation Timestamp:  2024-05-11T02:29:08Z
  Generation:          1
  Resource Version:    1239
  UID:                 cf8dfab3-ec72-49af-b1e1-de7478563487
Spec:
  Campaign:  04campaign
Status:
  Outputs:
    __activation:            04workflow
    __activationGeneration:  1
    __campaign:              04campaign
    __namespace:             default
    __site:                  hq
    __stage:                 deploy
    __status:                200
  Stage:                     deploy
  Status:                    9996
  Status Message:            Done  // add statusMessage to show status more user-friendly.
  Update Time:               2024-05-11T02:29:11Z
Events:                      <none>

@msftcoderdjw msftcoderdjw requested a review from Haishi2016 as a code owner May 10, 2024 02:11
Copy link
Contributor

@Haishi2016 Haishi2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is going to a wrong direction. The friendly display is a display problem. We shouldn't change the internal state code to a string. We can customize API outputs and kubectl outputs as needed (we do custom kubectl display for Target and instance already).

@msftcoderdjw
Copy link
Contributor Author

I think this PR is going to a wrong direction. The friendly display is a display problem. We shouldn't change the internal state code to a string. We can customize API outputs and kubectl outputs as needed (we do custom kubectl display for Target and instance already).

Thank you for comments. Like we offline discussed, I can keep status as status code (number) and add status message (string) as user-friendly display. I will customize kubectl print column too.

@msftcoderdjw msftcoderdjw changed the title Change status in activation from int to string for better display Add statusMessage in activation for better display May 11, 2024
@msftcoderdjw msftcoderdjw merged commit 2c2ff89 into eclipse-symphony:main May 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants