Repository navigation
Simplify atime GHA workflow using r-lib/actions, gh, and jq - #7921
MichaelChirico wants to merge 4 commits into
Conversation
Generated via commit 4c9c84f Download link for the artifact containing the test results: ↓ atime-results.zip
|
The custom build of R we're using does not use the Debian-recommended compiler flags and so doesn't fail to build old versions of data.table.
| - uses: r-lib/actions/setup-r@v2 | ||
| with: | ||
| use-public-rspm: true | ||
|
|
||
| - uses: r-lib/actions/setup-r-dependencies@v2 | ||
| with: | ||
| cache-version: ${{ hashFiles('.ci/atime/tests.R') }} |
There was a problem hiding this comment.
these modifications do R pkg installation using r-lib actions, whereas I proposed using Dirk’s actions
- name: Setup
uses: eddelbuettel/github-actions/r-ci@master
- name: Dependencies
run: ./run.sh install_all
There was a problem hiding this comment.
Yea, I intentionally let it switch back to r-lib/actions based on this finding:
Using
eddelbuettel/github-actions/r-ci@masterhere introduces a second R setup stack, leaves untracked./run.shand.Rprofilefiles inGITHUB_WORKSPACE(whichatimecopies into every historical build directory), and writingoptions(repos = c(CRAN = 'https://cloud.r-project.org'))to.Rprofilebypasses binary repositories soatime,ggplot2, anddirectlabelscompile from source.
Those drawbacks can be overcome, but would you mind elaborating on why you think the r-ci GHA is a better choice for us? I also am persuaded against it because it leaves us in a split state of r-lib/actions in all the other GHA and only the new approach in this particular action -- should we make a full switch?
Also, is there a reason to use @master instead of a pinned version?
There was a problem hiding this comment.
@MichaelChirico do you mind switching to Dirk’s r-ci? I seemed to recall Dirk mentioning it was much faster than r-lib but I don’t actually have any data on that.
| uploadImage() { | ||
| curl --fail --retry 3 -sS -F "file=@$1" -F "visibility=unlisted" https://picrd.com/api/upload | jq -r '.image_url' | ||
| } | ||
| PREVIEW_URL=$(uploadImage .ci/atime/tests_preview_facet.png) | ||
| ALL_URL=$(uploadImage .ci/atime/tests_all_facet.png) |
There was a problem hiding this comment.
We could use native GitHub image uploads for comments with gh pr comment --attach, but that requires --edit-last --create-if-none (edit last comment by GitHub Actions or create if none exist so far). There doesn't seem to be a way to edit a specific comment in gh pr comment while also making use of --attach.
There was a problem hiding this comment.
thanks Ivan, this is very useful!
I did not know that --attach API was documented, that is great!! (last time I checked I could not find a public API for that, is it new?)
a work-around would be deleting the previous comment and creating a new one?
There was a problem hiding this comment.
Sorry, no, --attach doesn't work yet because it's broken for GHA tokens.
There was a problem hiding this comment.
Great spot on --edit-last --create-if-none, included in 4c9c84f.
LLM report on --attach:
On --attach: gh pr comment actually supports rewriting local Markdown image/link targets in-place with --edit-last --create-if-none (so [](.ci/atime/tests_all_facet.png) works), but gh's attachment uploader (internal/attachments/client.go) explicitly rejects ghs_ server-to-server tokens (GITHUB_TOKEN) with "unsupported authentication type" because uploads.github.com/user-attachments/assets requires a user-attributed token (ghp_ / github_pat_ / gho_ / ghu_) and contents: write permission. So unless we want to maintain a user PAT secret, we still need picrd.com for image hosting.
There's a way forward if we set up a bot account like @rdatatable-bot but it would have to have pretty broad access grants (Pull requests: Write won't suffice).
tdhock
left a comment
There was a problem hiding this comment.
thanks for the suggestions, I agree that using gh is better than curl/sed/etc


Gemini-authored alternative to #7901.