You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/07/20 21:00:31 UTC

[GitHub] [incubator-devlake] e2corporation commented on issue #2546: [Bug] [Config UI] invalid cronConfig: expected exactly 5 fields, found 1: [manual]

e2corporation commented on issue #2546:
URL: https://github.com/apache/incubator-devlake/issues/2546#issuecomment-1190753111

   @long2ice @warren830 @klesh This is a consequence of having 'manual' as a frequency mode rather than a pure cron expression. There is already a separate flag for tracking manual mode, `isManual` I believe is the key, which UI is already correctly setting it to `true` when manual is selected, however current Backend logic expects `cronConfig` to be a pure cron expression string.
   
   This can be solved in one of 2 ways:
   
   1) On the frontend, the `Blueprint Manager Hook` settings payload for the blueprint should be updated to check if  cronConfig's value is string 'manual' and/or if `isManual` is true to post one of the existing cron presets, daily or hourly or any valid cron expression etc so a valid cron value is stored.
   
   ```
   # Example patch in Blueprint Manager Hook (Reference Only) 
   `cronConfig: cronConfig === 'manual' || mode === BlueprintMode.MANUAL ? : '0 * * * *` : cronConfig
   ```
   
   2) On the backend, assuming this is possible with the current design, api should add some exception to allow `manual` as a valid value.


-- 
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-unsubscribe@devlake.apache.org

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