-
Notifications
You must be signed in to change notification settings - Fork 30
feat(api): add support for schedules #836
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
Conversation
…to feature/schedule/database
…to feature/schedule/database
Codecov Report
@@ Coverage Diff @@
## main #836 +/- ##
==========================================
- Coverage 62.18% 61.09% -1.09%
==========================================
Files 281 290 +9
Lines 15111 15434 +323
==========================================
+ Hits 9397 9430 +33
- Misses 5271 5558 +287
- Partials 443 446 +3
|
Co-authored-by: Jordan Brockopp <[email protected]>
Co-authored-by: Jordan Brockopp <[email protected]>
Co-authored-by: Jordan Brockopp <[email protected]>
Co-authored-by: Jordan Brockopp <[email protected]>
Co-authored-by: Jordan Brockopp <[email protected]>
Co-authored-by: Jordan Brockopp <[email protected]>
|
@jbrockopp @ecrupper feedback has been addressed. |
jbrockopp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
I also want to point out that I was kind of disappointed with github.com/adhocore/gronx error handling with invalid entries. For example, I provided an entry of {
"error": "schedule of is invalid: tried so hard"
}I expect users to be able to diagnose an invalid cron expression, but "tried so hard" isn't exactly a great push in the right direction. |
| } | ||
|
|
||
| // send API call to capture the updated schedule | ||
| s, _ = database.FromContext(c).GetScheduleForRepo(r, dbSchedule.GetName()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not sure why we ignore the return errors on so many database calls across the codebase.
(im not calling you out, im just curious if yall have thoughts)
we dont have to make this change now, but im wondering why we continue to follow that pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be honest that I didn't think about handling the error since so much of the existing code base does not... How about we open up a separate GitHub issue to track updating all of these database calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW -
We should plan to have the Create* and Update* funcs return the type so we don't need these calls
i.e. #701
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoever wrote that PR needs to get on it
ecrupper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
xref: go-vela/community#538
Part of go-vela/community#772
Dependent on #833 and #834
The code that manages the execution of schedules will added in a separate code change.