mth5 icon indicating copy to clipboard operation
mth5 copied to clipboard

github actions suddenly failing [Unable to process file command 'env' successfully.]

Open kkappler opened this issue 11 months ago • 2 comments

I just pushed a small commit which should only have affected the code, not anything about the environment setup.

Repeated attempts to run tests fail at the Setup Conda stage, for example here

To verify that my changes did not trigger this, I went to the github actions page from the previous commit (where all tests passed) here

And then requested to re-run the tests (for python 3.8). The previously passing test now fails here

This suggests that no recent update to MTH5 repo is causing this, but rather that some behaviour on github has changed which makes the tests.yaml invalid.

Two possible hints (or red herrings:/)

Examining the logs on github, the previously passing tests, when "Installing conda" summarized with:

The following packages will be downloaded:

  package                    |            build
  ---------------------------|-----------------
  ca-certificates-2024.12.31 |       h06a4308_0         1[28](https://github.com/kujaku11/mth5/actions/runs/13220671494/job/36905293934#step:3:31) KB
  pip-24.2                   |   py38h06a4[30](https://github.com/kujaku11/mth5/actions/runs/13220671494/job/36905293934#step:3:33)8_0         2.2 MB
  python-3.8.20              |       he870216_0        23.8 MB
  setuptools-75.1.0          |   py38h06a4308_0         1.7 MB
  wheel-0.44.0               |   py38h06a4308_0         108 KB
  ------------------------------------------------------------
                                         Total:        27.9 MB

The failing tests:

The following packages will be downloaded:

  package                    |            build
  ---------------------------|-----------------
  pip-24.2                   |   py38h06a4[30](https://github.com/kujaku11/mth5/actions/runs/13220671494/job/37112900546#step:3:33)8_0         2.2 MB
  python-3.8.20              |       he870216_0        23.8 MB
  setuptools-75.1.0          |   py38h06a4308_0         1.7 MB
  wheel-0.44.0               |   py38h06a4308_0         108 KB
  ------------------------------------------------------------
                                         Total:        27.8 MB

But in both cases the same hash of ca-certificates get's installed. nevertheless, it points at a change in github's runner.

ca-certificates    pkgs/main/linux-64::ca-certificates-2024.12.31-h06a4308_0 

@kujaku11 For the record, retriggering tests on aurora features branch (which inherit the changes on mth5's features branch) are passing. One difference is that aurora's tests.yaml use miniconda instead of conda, not sure if that matters.

kkappler avatar Feb 12 '25 17:02 kkappler

Digging into this a bit more, the issue is with the "Setup Conda" part of the tests YAML file.

Conda is setup with

steps:
    - uses: actions/checkout@v4
    - name: Setup Conda
      uses: s-weigand/[email protected]
      with:
        update-conda: false
        python-version: ${{ matrix.python-version }}

Searching the issues in s-weigand/setup-conda, I found the same error referenced here. This issue refers to an old, merged, pull request, but one of the suggestions was to use [email protected]. If I make that change, all tests except python 3.8 pass.

kkappler avatar Feb 17 '25 19:02 kkappler

@kkappler I think there are some new issues with using conda directly because of their business model, so going with miniconda is likely the better option. I adjusted the test.yml in PR #276 which should fix the issue for now.

kujaku11 avatar Feb 28 '25 22:02 kujaku11