Allow to trigger a job on a cron schedule but still have revision set |
||||
Issue description
Currently, there are two ways to trigger a job in luci-scheduler:
- via gitiles trigger which will only trigger jobs when there are new commits and will configure build to run on the revision of the new commmit (e.g. buildset tag, and probably revision property)
- via 'schedule' parameter on a job, which will simply run a job based on that schedule and does not configure job as being run on a specific revision
What we'd like is the combination of these two options:
trigger {
id: "v8-trigger-on-schedule"
gitiles {
repo: "https://chromium.googlesource.com/v8/v8"
refs: "refs/heads/master"
}
allow_trigger_when_no_new_commits: true
schedule: "0,15,30,45 * * * *"
triggers: "v8_canary_detector"
}
which will trigger v8_canary_detector every 15 minutes regardless whether there are new commits or not and will configure the triggered builds with the latest revision.
,
Jul 26
Sounds reasonable.
,
Jul 26
,
Jul 26
,
Jul 26
You can do this already:
job {
id: "job-id"
schedule: "*/30 * * * *"
buildbucket: {
...
}
}
trigger {
id: "repo-poller"
gitiles: {
...
}
triggers: "job-id"
}
,
Jul 26
IIUC this config will generate a job with buildset tag on every commit and another job without buildset tag every 30 minutes. What we need is to have a job every 30 minutes with buildset tag pointing to last commit regardlesa whether there were new commits since last job or not.
,
Jul 26
You can put this logic into the recipe?
,
Jul 26
A recipe is not able to change swarming tags of the task it is running in, can it?
,
Jul 26
No, it can't.
,
Jul 26
P.S. We need buildset tag to have build correctly displayed on Milo console.
,
Jul 26
Milo console can be changed to display builds without buildset tag. See also https://crbug.com/851474#c2
,
Jul 26
Yes, I think that will work too, but it's not supported yet, is it? In fact this bug report is based on tAndrii's suggestion on that same bug: https://bugs.chromium.org/p/chromium/issues/detail?id=851474#c3. Whichever is implemented first will be sufficient for us.
,
Jul 27
re: https://crbug.com/851474#c3 I think I no longer like that proposal (and this bug) quite as much, because it adds complexity to scheduler. But it still possible to do what you wanted with simple recipe which runs every 15 minutes and then does something like this: revision = api.gitiles.resolve_head(repo, ref) api.scheduler.emit_trigger(...revision...) |
||||
►
Sign in to add a comment |
||||
Comment 1 by serg...@chromium.org
, Jul 18