Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.3k views
in Technique[技术] by (71.8m points)

Github Action failing with R CMD check, using old commit?

I'm not sure how best to describe this, hence the rather vague title.

I have an R package that uses Github Actions to run checks. You can see the workflow file here:

https://github.com/Azure/Microsoft365R/blob/master/.github/workflows/check-standard.yaml

It's basically the same as the check-standard workflow in the r-lib/actions repo, with some tweaks for my particular requirements. My latest commit is failing the check for the MacOS build, with this error:

Run remotes::install_deps(dependencies = TRUE)
Error: Error: HTTP error 404.
  Not Found

  Did you spell the repo owner (`hongooi73`) and repo name (`AzureGraph`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.
Execution halted
Error: Process completed with exit code 1.

The step in question is this. It just scans the package's DESCRIPTION file and installs the dependencies for the package -- all very straightforward.

      - name: Install dependencies
        run: |
          remotes::install_deps(dependencies = TRUE)
          remotes::install_cran(c("pkgbuild", "rcmdcheck", "drat"))
        shell: Rscript {0}

It looks like it's trying to install a dependency from the hongooi73/AzureGraph repo, which no longer exists. But my DESCRIPTION file doesn't list hongooi73/AzureGraph as a remote dependency; it uses Azure/AzureGraph of which hongooi73/AzureGraph was a fork. It used to refer to hongooi73/AzureGraph, but that was several commits ago. Indeed, the Linux and Windows checks both run without problems so they are clearly using the correct repo location.

What can be causing this failure? And how do I fix it? I've already tried rerunning the workflow, and deleting older workflows.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You're using actions/cache to cache your R libs. By this you're restoring a cache that might be invalid if your key and the restore-keys isn't set up properly.

At the moment, there is no direct way to manually clear the cache. For some other options you can check Clear cache in GitHub Actions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...