Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Transient error when installing GHC via ghcup #187

Closed
andreasabel opened this issue Feb 7, 2023 · 3 comments
Closed

Transient error when installing GHC via ghcup #187

andreasabel opened this issue Feb 7, 2023 · 3 comments
Labels
re: ghcup Concerning setup using ghcup upstream workaround exists

Comments

@andreasabel
Copy link
Member

andreasabel commented Feb 7, 2023

E.g. https://github.com/haskell/happy/actions/runs/4117599915/jobs/7109094448#step:4:75

Attempting to install ghc 8.4.4 using ghcup
  /opt/hostedtoolcache/ghcup/0.1.19.0/x64/ghcup install ghc 8.4.4
  [ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file /usr/local/.ghcup/cache/ghcup-0.0.7.yaml
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  ghcup: /usr/local/.ghcup/cache/ghcup-0.0.7.yaml: setModificationTime:setFileTimes: permission denied (Operation not permitted)

I guess what happens here is that https://raw.githubusercontent.com refuses to respond to the curl request. This error should be properly communicated by ghcup.

@andreasabel
Copy link
Member Author

The riddle is solved here: https://discourse.haskell.org/t/incident-github-actions-ci-failure-ghcup/5761?u=hasufell

Due to a number of Tschernobyl like coincidences, I managed to break GitHub CI for you all. Thank me later.

The incident is explained here: ghcup broken · Issue #7061 · actions/runner-images · GitHub 55

You’re likely affected by it if you use ghcup or haskell/actions/setup on a raw ubuntu runner (not docker container). Failures may manifest more prominently over the coming days while GitHub is rolling out the newly broken images to their runners slowly (yay).

The workaround is to add this step to your job prior to haskell setup action or any ghcup invocation (only on ubuntu linux without docker):

      - name: Workaround runner image issue
        # https://github.com/actions/runner-images/issues/7061
        run: sudo chown -R $USER /usr/local/.ghcup

@andreasabel
Copy link
Member Author

Small refinement for multi-OS workflows:

      - name: Workaround runner image issue
        if: ${{ runner.os == 'Linux' }}
        # https://github.com/actions/runner-images/issues/7061
        run: sudo chown -R $USER /usr/local/.ghcup

@andreasabel
Copy link
Member Author

Seems to have been fixed upstream:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
re: ghcup Concerning setup using ghcup upstream workaround exists
Projects
None yet
Development

No branches or pull requests

1 participant