phi-friday commented on issue #41019:
URL: https://github.com/apache/airflow/issues/41019#issuecomment-2257221667

   > Can you please describe a bit more in detail what "So I can't run DAG" 
means? Does it not start or do you get a specific error message?
   > 
   > What I can tell is if the array field is empty, an empty array is treated 
as "None"/NULL Value and if you define the field as being array I assume it 
should complain that the (required, see a red start sign at the label) is 
missing a value. DAG should reject to be running as long as you don't enter at 
least one entry.
   > 
   > Otherwise if you have a default value of `"[]"` I would expect that the 
string `[]` is used as default which is an array of one element with 1 string 
as default - which is more than NULL and represents one value, so is valid.
   > 
   > Don't know if I mis-understand or if this is a race / corner case you hit. 
Either it is a mis-understanding or really a bug. I don't get it from the error 
description.
   
   If treating an empty array as a `null` value is an intentional 
implementation, then this is not a bug.
   
   I passed an empty array as the default, but I couldn't run `DAG` because it 
didn't accept an empty array and required at least one element. 
   As you said, I get a message that a value is missing.
   
   I passed in the string `“[]”`, just in case.
   If `schedule` is not specified, the default value of the parameter is not 
validated.
   So I was mistaken. What is rendered as `[“[”, “]”]` is not what I expected.
   
   If this is what was intended, I don't see a problem. 
   However, it seems a bit odd that in a parameter that has a default value and 
that I defined to not allow `null` values, an empty array is treated as `null` 
without allowing it. 
   
   Currently, I've redefined the parameter to allow `null` values, and added 
handling for `null` values in some of the `Task`.


-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to