wmedvede commented on code in PR #3070:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3070#discussion_r2047440931


##########
packages/sonataflow-operator/api/v1alpha08/conversion.go:
##########
@@ -102,9 +102,18 @@ func ToCNCFWorkflow(workflowCR *SonataFlow, context 
context.Context) (*cncfmodel
        }
 
        cncfWorkflow.ID = workflowCR.ObjectMeta.Name
-       cncfWorkflow.Key = workflowCR.ObjectMeta.Annotations[metadata.Key]
-       cncfWorkflow.Description = 
workflowCR.ObjectMeta.Annotations[metadata.Description]
-       cncfWorkflow.Version = 
workflowCR.ObjectMeta.Annotations[metadata.Version]
+       if key, ok := workflowCR.ObjectMeta.Annotations[metadata.Key]; ok {

Review Comment:
   btw @ricardozanini if the annotation is not present, we shouldn't force 
anything.  If we do e.g. 
workflowCR.ObjectMeta.Annotations[metadata.Description] and the annotation is 
not present, we get the "".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to