Skip to content

Conversation

@djinnome
Copy link
Contributor

No description provided.

@djinnome djinnome self-assigned this May 13, 2025
@djinnome
Copy link
Contributor Author

According to github,

The failure in job 42165346038 was caused by using an outdated version of the actions/cache action (v1), which lacks the required download information.

To resolve this issue, update the actions/cache version to v3, which is the latest stable release as of now. Here's the corrected workflow file:

name: Test

on:
  push:
    branches: [ main, staging-refactor ]
  pull_request:
    branches: [ main, staging-refactor ]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.9, '3.10', '3.11']
        os: [ubuntu-latest]  # , macos-latest]

    steps:
      - uses: actions/checkout@v2
      - name: Ubuntu cache
        uses: actions/cache@v3
        if: startsWith(matrix.os, 'ubuntu')
        with:
          path: ~/.cache/pip
          key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-

      - name: macOS cache
        uses: actions/cache@v3
        if: startsWith(matrix.os, 'macOS')
        with:
          path: ~/Library/Caches/pip
          key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -e .[tests]

      - name: Test
        shell: bash
        run: |
          pytest tests/ -s -n auto

@djinnome
Copy link
Contributor Author

For the linting failure, github says this:

The failure in the job is due to the use of an outdated version of the actions/cache action (v1), which resulted in the error: Missing download info for actions/cache@v1. This issue can be resolved by upgrading the actions/cache action to a newer, supported version (e.g., v3).

Here's the updated lint.yml workflow file:

name: Lint

on:
  push:
    branches: [ main, staging-refactor ]
  pull_request:
    branches: [ main, staging-refactor ]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.9, '3.10', '3.11']

    steps:
      - uses: actions/checkout@v2

      - name: pip cache
        uses: actions/cache@v3
        with:
          path: ~/.cache/pip
          key: lint-pip-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            lint-pip-

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -e .[tests]

      - name: Lint
        run: ./scripts/lint.sh

Explanation of Changes:

  1. Updated actions/cache Version: Changed actions/cache@v1 to actions/cache@v3 to use the latest supported version.
  2. No Other Changes Required: The rest of the workflow file remains the same as the error is only related to the outdated action version.

Apply this change to your workflow file to fix the failing job. Let me know if you need further assistance!

djinnome added 4 commits May 13, 2025 14:50
The failure in the job is due to the use of an outdated version of the `actions/cache` action (`v1`), which resulted in the error: `Missing download info for actions/cache@v1`. This issue can be resolved by upgrading the `actions/cache` action to a newer, supported version (e.g., `v3`).

Here's the updated `lint.yml` workflow file:

```yaml
name: Lint

on:
  push:
    branches: [ main, staging-refactor ]
  pull_request:
    branches: [ main, staging-refactor ]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.9, '3.10', '3.11']

    steps:
      - uses: actions/checkout@v2

      - name: pip cache
        uses: actions/cache@v3
        with:
          path: ~/.cache/pip
          key: lint-pip-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            lint-pip-

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -e .[tests]

      - name: Lint
        run: ./scripts/lint.sh
```

### Explanation of Changes:
1. **Updated `actions/cache` Version**: Changed `actions/cache@v1` to `actions/cache@v3` to use the latest supported version.
2. **No Other Changes Required**: The rest of the workflow file remains the same as the error is only related to the outdated action version.

Apply this change to your workflow file to fix the failing job. Let me know if you need further assistance!
The failure occurred because the workflow is using `actions/cache@v1`, which lacks proper download information, likely due to being deprecated or incompatible. The solution is to update `actions/cache` to a more recent version, such as `@v3`.

Here's the updated workflow file:

```yaml
name: Test

on:
  push:
    branches: [ main, staging-refactor ]
  pull_request:
    branches: [ main, staging-refactor ]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.9, '3.10', '3.11']
        os: [ubuntu-latest]  # , macos-latest]

    steps:
      - uses: actions/checkout@v2

      - name: Ubuntu cache
        uses: actions/cache@v3
        if: startsWith(matrix.os, 'ubuntu')
        with:
          path: ~/.cache/pip
          key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-

      - name: macOS cache
        uses: actions/cache@v3
        if: startsWith(matrix.os, 'macOS')
        with:
          path: ~/Library/Caches/pip
          key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -e .[tests]

      - name: Test
        shell: bash
        run: |
          pytest tests/ -s -n auto
```

### Steps to Implement:
1. Replace all instances of `actions/cache@v1` with `actions/cache@v3` in the `.github/workflows/test.yml`.
2. Commit and push the changes to the branch or include them in the pull request.

This update should resolve the missing download issue by using a compatible cache version. Let me know if you need further assistance!
The failure occurred because the workflow file is using an outdated version (`v1`) of the `actions/cache` action, which no longer has the required "download info". This issue can be resolved by upgrading to a more recent version of the `actions/cache` action.

### Solution
Update the `.github/workflows/test_notebooks.yml` file as follows:

#### Before:
```yaml
- name: pip cache
  uses: actions/cache@v1
  with:
    path: ~/.cache/pip
    key: lint-pip-${{ hashFiles('**/pyproject.toml') }}
    restore-keys: |
      lint-pip-
```

#### After:
```yaml
- name: pip cache
  uses: actions/cache@v3
  with:
    path: ~/.cache/pip
    key: lint-pip-${{ hashFiles('**/pyproject.toml') }}
    restore-keys: |
      lint-pip-
```

### Steps to Implement
1. Replace `actions/cache@v1` with `actions/cache@v3` in the workflow file.
2. Commit and push the changes to the branch associated with the pull request.
3. Trigger the workflow again to verify the fix.

Would you like me to assist further with creating a commit message or additional details?
The failure occurred because the workflow references `actions/cache@v1` in the "macOS cache" step, but the job log shows an error stating "Missing download info for actions/cache@v1." This indicates that `actions/cache@v1` is either deprecated or unavailable.

### Solution:
Update the `macOS cache` step to use `actions/cache@v3`, as this version is already used in the "Ubuntu cache" step and is functional.

### Updated Workflow File:
```yaml
name: Test

on:
  push:
    branches: [ main, staging-refactor ]
  pull_request:
    branches: [ main, staging-refactor ]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.9, '3.10', '3.11']
        os: [ubuntu-latest]  # , macos-latest]

    steps:
      - uses: actions/checkout@v2
      
      - name: Ubuntu cache
        uses: actions/cache@v3
        if: startsWith(matrix.os, 'ubuntu')
        with:
          path: ~/.cache/pip
          key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-
      
      - name: macOS cache
        uses: actions/cache@v3  # Updated to v3
        if: startsWith(matrix.os, 'macOS')
        with:
          path: ~/Library/Caches/pip
          key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-
      
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -e .[tests]
      
      - name: Test
        shell: bash
        run: |
          pytest tests/ -s -n auto
```

### Steps to Resolve:
1. Replace `actions/cache@v1` with `actions/cache@v3` for the "macOS cache" step.
2. Commit and push the updated workflow file to the branch.

This update should resolve the issue with the missing download info and allow the workflow to proceed successfully.
@djinnome djinnome merged commit d5f1541 into main May 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants