Skip to content

Cache key contains [object Promise] #264

@echoix

Description

@echoix

We use the pinned v2.0.4 version of this action. I only recently observed that the cache key contains a literal [object Promise]. I don't think it is intended, and I don't remember seeing this before (maybe it was ellipsed with ... so I couldn't see it). I also see the same on my fork of the repo too.

Here's a part of our macOS workflow, from https://github.com/OSGeo/grass/actions/runs/13599472432/workflow?pr=5223

      - name: Get current date cache key segment
        id: date
        # Year and week of year so cache key changes weekly
        run: echo "date=$(date +%Y-%U)" >> "${GITHUB_OUTPUT}"
      - name: Prepare Conda environment file
        env:
          test_dependencies: |
            ipython
            pytest
            pytest-github-actions-annotate-failures
            pytest-timeout
            pytest-xdist
            pyyaml
        run: |
          cp ./macos/files/conda-requirements-dev-arm64.txt "${RUNNER_TEMP}/macos_dependencies.txt"
          echo "$test_dependencies" | sed "s/ /\n/g" >> "${RUNNER_TEMP}/macos_dependencies.txt"
      - name: Setup Mamba
        uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc # v2.0.4
        with:
          init-shell: bash
          environment-file: ${{ runner.temp }}/macos_dependencies.txt
          environment-name: grass-env
          # Persist on the same period (date).
          cache-environment-key: environment-${{ steps.date.outputs.date }}

Screenshot:
Image
Screenshot from a fork, showing that this problem was there on Feb 15 too:
Image

I tried to search for existing issues and PRs for this, and I wrote this issue since it seemed unreported yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions