Add weekly workflow to create issue when monitored spack-packages change#171
Conversation
Agent-Logs-Url: https://github.com/llnl/radiuss-spack-configs/sessions/73cac48a-5bdd-4195-9977-e4c075f999ba Co-authored-by: adrienbernede <51493078+adrienbernede@users.noreply.github.com>
…make paths Agent-Logs-Url: https://github.com/llnl/radiuss-spack-configs/sessions/1254137a-1378-46fe-b15c-5e72120a523e Co-authored-by: adrienbernede <51493078+adrienbernede@users.noreply.github.com>
…puts
Each matrix entry now declares `packages:` and/or `files:` directly, and a
single detection path resolves both to upstream paths and diffs the pinned
range against them. This removes the `track_type` discriminator and the
parallel packages-vs-build_system branches in the detect and issue steps,
and removes the awk-based extraction of the package list from the env yaml.
Other changes folded in:
- Read the spack-packages commit pin via `yq '.spack.repos.builtin.commit'`
instead of grepping any `commit:` line, with explicit null-and-format checks.
- Move the schedule from daily to a single weekly run (Mondays 06:17 UTC) and
drop the per-matrix cron entries; workflow_dispatch keeps a `target` input
to run a single entry on demand.
- Rename intermediate files to `WATCHED_PATHS_FILE`, `CHANGED_PATHS_FILE`,
`DIFF_FILE` for symmetry.
Assisted by Claude Code
tdrwenski
left a comment
There was a problem hiding this comment.
Cool, I think it looks good! 🎉
| name: Track spack-packages updates | ||
|
|
||
| on: | ||
| pull_request: |
There was a problem hiding this comment.
maybe this was for testing, change to workflow_dispatch?
There was a problem hiding this comment.
Yes, exactly, let me add it to the TODOs so I don't forget to remove it after the reviews are done.
| echo "should_update=true" >> "${GITHUB_OUTPUT}" | ||
| echo "reason=relevant_changes_found" >> "${GITHUB_OUTPUT}" | ||
|
|
||
| - name: Create issue |
There was a problem hiding this comment.
Not sure how much work it would add but it might be nice to check if there is already an open PR for the needed update to avoid duplicate PRs if you don't merge right away... can always try it out and add this later though.
There was a problem hiding this comment.
This is opening an issue, not a PR. I just need to mention the issue in the existing PR with appropriate keyword (e.g. fixes #<issue>) if I want the PR to close the issue automatically on merge.
There was a problem hiding this comment.
Not sure I answered your comment.
There was a problem hiding this comment.
oh yes, sorry, I should have said maybe it can check if there is an open issue before it creates a new issue to avoid duplicate issues-- Say you are gone for 3 weeks, won't it once a week make a new issue to update the commit? It is not a big problem, we can also see how it goes first.
There was a problem hiding this comment.
Indeed any new issue could replace the previous one: if the older issue is not closed, the newer one covers both the previous and potentially new changes... I’ll open an issue to treat that in a subsequent PR.
Replaces #170
Add
.github/workflows/track-spack-packages.yml, a scheduled workflow thatwatches
spack/spack-packagesfor changes since the commit pinned in selectedenvs and opens an issue per affected env.
'17 6 * * 1', Mondays 06:17 UTC) plusworkflow_dispatchwith atargetinput (all/shared-ci/cached-cmake)packages:(list of package names) and/orfiles:(specific upstream paths) directly. One row per tracked env; the rest of the
workflow has no per-env branching.
shared-ci: camp, umpire, raja, raja-perf, chai, care, caliper, against.gitlab/spack/envs/shared-ci/spack.yamlcached-cmake:repos/spack_repo/builtin/build_systems/cached_cmake.py,against
.gitlab/spack/envs/cached-cmake/spack.yamlrepos/spack_repo/builtin/packages/<name_with_underscores>, union with theliteral files list,
git diff --name-onlyfrom the pinned commit to the tipof the upstream default branch, then capture a scoped diff for whichever
watched paths actually changed.
yq '.spack.repos.builtin.commit'with explicit nulland 40-char SHA-1 format checks (no more grepping any
commit:line).[<entry>] Update spack-packages reference to <short-sha>,labels
dependenciesandautomation. Body includes a current/new committable, the changed paths, and a fenced diff truncated at 60000 chars to stay
under the 65536-char issue body cap.
explaining the diff could not be computed.
contents: read,issues: write; uses${{ github.token }}with
gh issue create.Out of scope: the original draft also tracked
toss_4_x86_64_ib,toss_4_x86_64_ib_cray, andblueos_3_ppc64le_ib, plus a cross-file commitconsistency check. Both were dropped when the workflow moved to one matrix
entry per tracked env; if pins diverge between envs in the future, each entry
reports independently.
TODO:
- [ ] Wait for a change in one of the tracked packages to demo issue creation.See created issue (closed because for testing only): #172