e2e: allow quasi-polling from a cron job. - #812
Merged
Merged
Conversation
klihub
added this pull request to stack #814
September 22, 2026 18:47
klihub
force-pushed
the
e2e-poll-from-cron
branch
from
September 22, 2026 19:39
4f8602d to
61fc25b
Compare
Add --run-if-changed: ask the remote what the branch is at, and do nothing unless it moved since we last tried. Off unless asked for, so a run without it tests the branch as it is, as before. With it, triggering us from cron every few minutes is sane, and a PR gets tested soon after it lands instead of the following night. --force-after tests anyway once a configurable time has passed with nothing new, a day by default. Also take a lock in the result root for as long as a run lasts. Two runs there would share a worktree, fight over the test VMs and publish over each other. Held on a file descriptor, so the kernel drops it however a run ends. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Add e2e-cron-job, which is all a crontab line needs: it reads what a host wants from /etc/sysconfig/nri-plugins-e2e-cron-job and runs the runner with it. Anything on its own command line is passed through, for a one-off. E2E_UPDATE_CLONE fetches and resets the clone to the branch first, so that the copy of the runner which parses the options is the branch's too. Off by default: it is a reset --hard of a directory which may be someone's working tree. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
klihub
force-pushed
the
e2e-poll-from-cron
branch
from
September 23, 2026 13:42
61fc25b to
bd0a972
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a --run-if-changed e2e-runner option to run only if the branch we test has moved since the last run, and do nothing otherwise. This can be used from a frequently enough triggered cron job to effectively poll the remote branch and run a test soon after a new PR has been merged. Add a --force-after e2e-runner option to force a test run after a configurable time even if nothing has changed. Also take a lock in the result root for as long as a run lasts to prevent multiple concurrent test runs.
Add an e2e-cron-job script which is all a crontab line needs. It is configurable with sysconfig-style config file and command line options.
Stack created with GitHub Stacks CLI • Give Feedback 💬