Skip to content

[bug] Artifacts still can be downloaded after their expiration #709

@jstmpelowycz

Description

@jstmpelowycz

What happened?

I have the workflow that runs Playwright E2E tests. To make sure Playwright reports can be viewed and analyzed, I upload artifacts, setting up retention period to 1 day.

-  name: Upload test artifacts
    if: always()
    uses: actions/upload-artifact@v4
    with:
        name: playwright-report-${{ inputs.app_name }}
        path: |
            e2e/playwright-report/**/*.*
            e2e/test-results/**/*.*
        retention-days: 1

Even though retention period is set explicitly, and I see artifacts labeled as expired in 2-week-old workflow run, I still can go to upload step logs, follow the link (Artifact download URL: https://github.com/<org>/<repo>/actions/runs/<run_id>/artifacts/<artifact_id>), and download archives.

How to I ensure expired artifacts are deleted immediately?

What did you expect to happen?

I would expect expired artifacts to get deleted after their expiration.

How can we reproduce it?

(My repository is private, I can only give quite an abstract STR, sorry)

  1. Use the action to upload an artifact, setting up retention period to the minimum (e.g. 1 day)
  2. Run a workflow with a job including the mentioned step
  3. Wait for the artifact to get expired
  4. Examine its downloadability in upload step logs via the link

Anything else we need to know?

I'm curious if artifacts removal is meant to be automatic and immediate or not. Manual deletion is too much robust. 🤕

What version of the action are you using?

v4.6.2

What are your runner environments?

linux

Are you on GitHub Enterprise Server? If so, what version?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions