Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Error For Cron Schedule If Start Date And End Date Are The Same #2195

Closed
LeoNerdoG opened this issue Nov 20, 2018 · 5 comments
Closed
Assignees
Labels
Bug This is a bug or an unexpected behaviour. Fix it! Console GWT This issue/PR is related to Admin Web Console

Comments

@LeoNerdoG
Copy link
Contributor

LeoNerdoG commented Nov 20, 2018

If user creates a schedule for a job which has same parameters for start/end date and start/end time, Kapua reports a generic error (Persistence error) if Cron schedule is defined as the interval for periodic execution of the job.

Testflow:

  1. Login as kapua-sys or any other user that has proper permissions
  2. Go to Jobs, create a job (e.g. job1)
  3. Select job1 and go to its Schedules, add a schedule with the following paramters:
  • Schedule Name: sch1
  • Starts On: 22/11/2018
  • Start time: 00:00
  • Ends On: 22/11/2018
  • End time: 00:00
  • Retry interval: / (empty)
  • Cron schedule: 0 0 12 * * ?
  1. Press Submit and observ the error.

Expected behavior
Kapua should not return an error, since the schedule with the upper parameters is valid.

Screenshot:
screenshot 2018-11-20 at 12 54 21

Version of Kapua
1.1.0-SNAPSHOT

Type of deployment
[ ] Local Vagrant deployment
[x] Docker
[ ] Openshift (in its variants)
[ ] Others

Main component affected
[x] Console (in case of console please report info on which browser you encountered the problem)
[ ] REST API
[ ] Message Broker
[ ] - Others

Browsers used:

  • Google Chrome (Version 69.0.3497.100 (Official Build) (64-bit))
  • Safari (Version 12.0 (13604.3.5))
  • Mozilla Firefox (63.0 (64-bit))
  • Opera (Version 55.0.2994.44)
@LeoNerdoG
Copy link
Contributor Author

@Coduz @lorthirk
I have a few question about this issue I reported.

  1. Should this case be an error case (if start/end time and start/end date are set in the same point in time)?
  2. If this is not an error case, should we throw an error if user enters retry interval/Cron or not (again - becasue start and endare at the same point in time
  3. Or should we just replace this error from the issue's screenshot with a more suitable one?

@muros-ct muros-ct self-assigned this Nov 21, 2018
@Coduz
Copy link
Contributor

Coduz commented Nov 21, 2018

That persistence error is very odd!

I think also that the parameters used are invalid. The cron expression is based on UTC so it should be 2 hours behind (CET timezone). Moreover 12 (as 3rd token in the cron) should be 0 to identify mid-night i think.

@LeoNerdoG
Copy link
Contributor Author

Hey @Coduz,
so should we throw an error e.g. "Start and End paramters must not be in same point on time" or something similar, regardles of what user enters into Retry interval and Cron schedule?

@Coduz
Copy link
Contributor

Coduz commented Nov 23, 2018

Uhmm yes I think that is convenient and could sove this problem

@LeoNerdoG
Copy link
Contributor Author

I have verified that this issue has been resolved.

@Coduz Coduz added Bug This is a bug or an unexpected behaviour. Fix it! Console GWT This issue/PR is related to Admin Web Console labels Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it! Console GWT This issue/PR is related to Admin Web Console
Projects
None yet
Development

No branches or pull requests

3 participants