Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is something wrong with the cache in quick jobs? #9815

Closed
philderbeast opened this issue Mar 16, 2024 · 1 comment · Fixed by #9845
Closed

Is something wrong with the cache in quick jobs? #9815

philderbeast opened this issue Mar 16, 2024 · 1 comment · Fixed by #9845
Labels
continuous-integration re: xdg Concerning the XDG directory structure

Comments

@philderbeast
Copy link
Collaborator

philderbeast commented Mar 16, 2024

Is there something wrong with the cache in quick jobs;

Post job cleanup.
Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist,
hence no cache is being saved.

Originally posted by @philderbeast in #9804 (comment)

@andreasabel andreasabel added the re: xdg Concerning the XDG directory structure label Mar 26, 2024
@andreasabel
Copy link
Member

andreasabel commented Mar 26, 2024

Looks like this is part of the XDG fallout:

The path to be cached is non-XDG:
https://github.com/haskell/cabal/actions/runs/8294806206/job/22700513058?pr=9804#step:3:3

path: ~/.cabal/store

Also the CI author intends to use non-XDG:
https://github.com/haskell/cabal/actions/runs/8294806206/job/22700513058?pr=9804#step:2:1

echo "$HOME/.cabal/bin" >> $GITHUB_PATH

But cabal is working in XDG mode:
https://github.com/haskell/cabal/actions/runs/8294806206/job/22700513058?pr=9804#step:6:7

Writing default configuration to /home/runner/.config/cabal/config

https://github.com/haskell/cabal/actions/runs/8294806206/job/22700513058?pr=9804#step:7:15

Symlinking 'alex' to '/home/runner/.local/bin/alex'

A workaround might be to force non-XDG by creating ~/.cabal/bin before adding it to the PATH in step 2.
Another fix would be to change the cached path to the XDG one.

See also:

andreasabel added a commit that referenced this issue Mar 26, 2024
Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`
andreasabel added a commit that referenced this issue Mar 26, 2024
Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`
Mikolaj pushed a commit that referenced this issue Mar 29, 2024
Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`
andreasabel added a commit that referenced this issue Apr 2, 2024
Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`
@mergify mergify bot closed this as completed in #9845 Apr 2, 2024
mergify bot added a commit that referenced this issue Apr 2, 2024
Fix #9815: fix caching for quick-jobs CI (XDG, cache keys)
coot pushed a commit that referenced this issue Apr 6, 2024
Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`
erikd pushed a commit to erikd/cabal that referenced this issue Apr 22, 2024
Fix haskell#9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`
mergify bot pushed a commit that referenced this issue May 21, 2024
Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`

(cherry picked from commit e916cb5)
mergify bot added a commit that referenced this issue May 23, 2024
…9845) (#10041)

* Fix #9815: switch quick-jobs CI to XDG

Fix #9815:
- Cache `~/.local/state/cabal` instead of `~/.cabal/store`
- `~/.local/bin` is used instead of `~/.cabal/bin` and is already in the PATH
  (verify this by calling `alex` after installing it)

As I am passing by:
- bump cache action to v4
- double-quote `$USER` to keep actionlint happy
- move `if` from shell-level to job-level
- allow newest `alex`

(cherry picked from commit e916cb5)

* CI quick-jobs: use preinstalled GHC and Cabal

(cherry picked from commit c209a82)

* Makefile: remove dead target 'lexer', use '.PHONY' systematically

The `lexer` target was removed in
#8980

(cherry picked from commit e600087)

* CI "Meta checks": correct cache key

(cherry picked from commit 56426e4)

* CI "Meta checks": print Haskell versions

(cherry picked from commit 9a311bd)

* CI "Doctest Cabal": daily refresh of cache

(cherry picked from commit ba6f6ff)

* CI "Check Field Syntax Reference": correct cache key

(cherry picked from commit 5949e3f)

* Update generated Cabal/src/Distribution/Simple/Build/Macros/Z.hs

Not sure why this was not up to date on master and still CI passed.
Maybe the content of this file is dependent on the GHC version we are
using to build the `get-cabal-macros` tool?

(cherry picked from commit 947860a)

* CI quick-jobs: entirely wipe ghcup directory rights workaround

(cherry picked from commit 5aa8afd)

* !fixup

---------

Co-authored-by: Andreas Abel <[email protected]>
Co-authored-by: Artem Pelenitsyn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
continuous-integration re: xdg Concerning the XDG directory structure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants