eclipse-symphony / symphony

Symphony project
MIT License
27 stars 17 forks source link

Add statusMessage in activation for better display #255

Closed msftcoderdjw closed 2 weeks ago

msftcoderdjw commented 3 weeks ago
$ 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 commented 3 weeks ago

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.