bito-code-review[bot] commented on PR #43307:
URL: https://github.com/apache/superset/pull/43307#issuecomment-5337256832

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of 
`get_cron_description` in `superset/tasks/cron_util.py` explicitly checks for 
exactly five fields (`if len(fields) != 5: return description`), which causes 
it to ignore extended cron expressions (six or seven fields) that `croniter` 
supports. This leads to misleading descriptions for those schedules.
   
   To resolve this, you can update the validation logic to support extended 
cron formats. Since `croniter` handles the parsing, you can allow expressions 
with more fields and ensure the logic correctly identifies the day-of-month and 
day-of-week fields based on their position in the cron string.
   
   Would you like me to fetch all other comments on this PR to validate them 
and implement a minimal fix for the rest as well?
   
   **superset/tasks/cron_util.py**
   ```
   fields = cron.split()
       if len(fields) < 5 or len(fields) > 7:
           return description
   
       day_of_month, day_of_week = fields[2], fields[4]
   ```


-- 
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