Replies: 9 comments 3 replies
GitHub token requirements for the label/API-poll approachWhat the token must be able to doThe cron job on each machine performs three distinct GitHub operations, and each drives a scope requirement:
If Token type: three options1. Fine-grained PAT (simplest)
2. GitHub App installation token (recommended for a shared setup)
3. Classic PAT — not recommended
Storage and handling on each machine
Operational concerns
RecommendationUse a GitHub App with If you want a faster proof of concept, start with a fine-grained PAT on a bot account, accept the rotation burden, and migrate to an App once the polling logic in launch_all.sh is settled. |
Reuse of existing cron-scripts machineryQuite a lot — the label/API-poll approach is best understood as a new trigger front-end bolted onto the existing dispatch back-end, not a parallel system. Reused essentially unchanged
What has to be added
Rough proportionPerhaps 70–80% of the per-machine execution path is reused as-is, with the new code concentrated at the two ends: trigger resolution before dispatch, and result reporting after. The machine configs — which are the genuinely expensive, site-specific, hard-to-get-right part — require no rework beyond accepting a SHA. A useful consequenceBecause the trigger layer is separable, the same back-end can serve nightly cron and on-demand PR testing, with the trigger step simply resolving to "the default branch" in the nightly case. That also means a ref-based or file-based trigger could be added later as an alternative front-end without touching anything under |
|
Thanks for socializing @rljacob! I saw the github workflow for EAMxx from @jgfouca and it could be that some variant of that would also work for Omega ctesting. I started going down this route partly because it builds on @grnydawn's work on https://github.com/E3SM-Project/polaris/tree/main/cron-scripts, #530 (comment), which covers both ctests and our standalone whole-component tests with Polaris |
|
This would be really nice to have. A few concerns:
These may or may not be issues depending on the amount of workload. |
|
My 2 exact cents:
|
|
I agree with Naser that extensive machine-specific testing on each PR may be too much. A containerized version of a handful of versions of the code may suffice. Maybe a gnu and intel builds (both CPU), and a CUDA build. Btw, the eamxx CI runs on gh runners hosted inside SNL machines, and is available for ALL e3sm-project projects. The only catch is that there are restrictions on what job can run: if there is a commit by someone NOT in the snl-testing gh team, there MUST be an approval by a member of the snl-testing gh team. Only folks that have access to the SNL machines hosting the runners can be in that team. If this is an option that works for you, you could use those runners. Maciej is already a SNL person, and if some other Omega folks got a SNL collaborator account, you could be good to go. Of course, if you don't care about GPU testing for PRs, and your tests don't require baselines, you |
|
Thanks @mahf708 and @bartgol — I appreciate your thoughts but I want to explain why we've landed somewhere different for Omega specifically. Our recent experience has been that not testing each PR everywhere is the expensive option. When several PRs land between full test runs and an unexpected non-BFB change shows up, untangling which PR caused it (and on which machine/compiler) has repeatedly cost us far more time than the testing would have. We've also had nightly runs surface non-BFB differences or outright build failures on compilers that the PR-time subset didn't cover — again, after several PRs were already in. At Omega's current stage, every corner we've tried to cut has slowed us down rather than sped us up. That may well change as the code matures, and I'd expect us to relax the cadence then. Worth noting the proposal is on-demand rather than automatic: the label means we can scope which machines a given PR goes to, so the cost isn't a fixed tax on every PR. Luca, thanks for the offer of the SNL-hosted runners — I don't think it works for us in practice, since not enough of our team are at Sandia and every PR from the rest of us would need his approval to run. We do need GPU testing and coverage of all supported compilers, and I feel we need it on the real machines at realistic problem sizes. CI-sized cases in containers won't surface the class of problem that's actually been biting us. I can see the value in investigating containerized gnu/intel/CUDA builds on free runners as a fast first tier — quick build and unit-test feedback before the heavier runs — just not as a replacement for them. |
Uh oh!
There was an error while loading. Please reload this page.
Problem
We currently have no way to run Omega ctests and the Polaris
omega_prsuite across all supported machine/compiler combinations for a specific PR or branch on demand. The existing cron-scripts infrastructure gives us nightly testing, but the branch under test is fixed at install time — there is no mechanism for a developer to say "test this PR everywhere" without logging into each machine individually.Proposed approach: PR label + API poll
A developer (or reviewer) applies a label such as
test-on-hpc— or machine-specific variants liketest-on-chrysalis,test-on-frontier— to an Omega PR.On each supported machine, a cron job periodically polls the GitHub API for PRs carrying these labels. When it finds a newly labeled PR, it:
head.sha(so every machine tests the identical commit)omega_prsuitetest-on-hpc→hpc-tested) to mark completionPer-machine state (
last_tested_sha) keeps runs idempotent, so a re-push is required to retrigger.Key property: the developer never signs into any machine — not to trigger the tests, and not to read the results.
Pros
head.sha, eliminating races with force-pushes.Cons
api.github.comfrom login nodes; proxy configuration is per-center toil.scrontab/systemd timers; jobs can die silently after password rotation. Needs a heartbeat to detect stoppage.E3SM-Project/Omega; the runner lives in Polaris cron-scripts. Label naming and permissions must be coordinated.Other approaches considered
Extend cron-scripts with a
--branchargument. Minimal change, but cron only controls when a job runs, not what it tests — so the branch would have to be edited in each machine's crontab. Requires signing into every machine for every test run.Git-based trigger (request file or dedicated request repo). Machines poll a small YAML request file and act on new entries. Fully token-free and expressive, but it has no return path — results are left on each machine's filesystem, so the developer must sign in to read them. Adding a post-back mechanism reintroduces the credential distribution it was designed to avoid. Committing requests to Polaris main also adds PR/merge friction and pollutes history.
Ref-based trigger. Push a ref like
test-request/chrysalis/my-feature; machines poll withgit ls-remote. Token-free, needs no new repo, and works before a PR exists — but shares the git-based trigger's missing return path and gives reviewers no visibility.Self-hosted GitHub Actions runners. Registered on each machine, driven by webhooks with
workflow_dispatchbranch inputs. Technically the strongest option: event-driven rather than polled, with log streaming and PR checks integration out of the box. Blocked or discouraged by policy at some centers, and carries a heavier one-time setup burden. As far as I can tell, this is what EAMxx uses https://github.com/E3SM-Project/E3SM/blob/master/.github/workflows/eamxx-sa-testing.yml?utm_source=chatgpt.comSSH fan-out from a single host. A driver script loops over machines over SSH. Blocked in practice by MFA at most DOE facilities.
Manual documented recipe. A helper script run interactively. Requires signing into every machine, every time.
Cons mitigated by the label/API-poll approach
Relative to the alternatives, this approach specifically resolves:
--branchin crontab, manual recipe) — triggering is a browser click.It does not mitigate cron fragility or polling latency, both of which only self-hosted runners fully address.
Discussion questions
All reactions