anilvpatel21 opened a new issue #16495:
URL: https://github.com/apache/superset/issues/16495


   A cron expression with "7" as sunday is accepted while creating a report 
using an API. But its unable to read "7" as sunday using cron_descriptor, and 
throwing 500 internal server error. 
   
   ### Expected results
   
   It should read 0 or 7 as Sunday. 
   
   ### Actual results
   
   Unable to read 7 as Sunday. 
   
   #### Screenshots
   
   If applicable, add screenshots to help explain your problem.
   
   #### How to reproduce the bug
   
   1. Edit any existing alert with new crontab expression using an API 
endpoints. 
   put request to /api/v1/report/{pk}
   ```
   {
     crontab: "* * * * 7"
   }
   ```
    It will be successful. 
   2. Now go to 'Report & Alert' section, you won't be able to see the list of 
alerts & report. 
   3. In the backend, it has this error
   ```
   line 147, in get_full_description
       raise FormatException(description)
   cron_descriptor.Exception.FormatException: An error occured when generating 
the expression description.  Check the cron expression syntax.
   ```
   
   ### Environment
   - superset version: Superset 1.1.0
   - python version: Python 2.7.16
   - node.js version: v12.16.1
   - any feature flags active:
   ```
   DEFAULT_FEATURE_FLAGS = {
        'ALERT_REPORTS': True,
   }
   ```
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - 
   - [ yes ] I have checked the superset logs for python stacktraces and 
included it here as text if there are any.
   - [ yes ] I have reproduced the issue with at least the latest released 
version of superset.
   - [ yes ] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   Need to upgrade the cron-descriptor PYPI package to the latest version. 
   
   Add any other context about the problem here.
   Earlier 1.2.24 version does not support 7 as Sunday. Only Supports 5 or 6 
(w/ seconds) part cron expressions. 


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