-
Notifications
You must be signed in to change notification settings - Fork 13
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
enhance(repo)!: add AllowSchedule field #291
Conversation
Codecov Report
@@ Coverage Diff @@
## main #291 +/- ##
=======================================
Coverage 97.00% 97.01%
=======================================
Files 59 59
Lines 6545 6562 +17
=======================================
+ Hits 6349 6366 +17
Misses 145 145
Partials 51 51
|
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, seems like a straightforward way to disable repo schedules without actually removing the schedule or disabling event-driven builds. nice
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.
works for me, but i can see your hesitation about adding non-SCM events here. i think it's fine.
@ecrupper @plyr4 @wass3r only one last caveat to point out and then I think we can merge 👍 The server scan's the entire This would include any This could mean the server spends unneeded extra cycles processing We could perform a However, in general, I try to avoid |
I think the per repo flag complicates things. It might be a good idea, but the global allow list is sufficient for now, so let's wait till after the rest of schedules are implemented and then work on adding the per-repo flag. |
@jbrockopp thanks for calling attention to that. i'm good with the approach @cognifloyd mentioned. |
@wass3rw3rk perhaps I misunderstood, but if we want to go with that approach we shouldn't merge this, right? So I think we'll need to revert this PR and then I can open a new one with this change as a draft PR. Otherwise, we'll be unable to pull this repo (as a go dependency) on the |
This reverts commit 71117bf.
xref: go-vela/community#538
Part of go-vela/community#772
Based off of #289
This change add an
AllowSchedule
field to theRepo{}
object:types/database/repo.go
Line 71 in eb7c705
types/library/repo.go
Line 38 in eb7c705
Similar to the other
Allow*
fields, this will enable users to control if their repo responds to theschedule
event.Initially, I didn't plan to add this field since the
Allow*
fields control whichgit
based events to respond to.And
schedules
will be totally controlled by Vela (i.e. not SCM driven), and won't be an event for webhooks.That being said, I wanted to start with opening this PR to collect feedback on if we should add this or not.
You can find an example of how this field will be used within go-vela/server#846.