{
  "id": "cicd/gitlab-ci-artifact-expired",
  "signature": "ERROR: Job failed: artifact 'build.zip' has expired. Artifacts are kept for 30 days by default.",
  "signature_zh": "错误：作业失败：工件 'build.zip' 已过期。工件默认保留 30 天。",
  "regex": "artifact .* has expired\\. Artifacts are kept for \\d+ days by default\\.",
  "domain": "cicd",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "GitLab CI job fails because it tries to download an artifact from a previous job that has exceeded its retention period, causing the pipeline to break when dependencies rely on expired artifacts.",
  "root_cause_type": "generic",
  "root_cause_zh": "GitLab CI 作业失败，因为它尝试从之前已超过保留期的作业下载工件，当依赖项依赖于过期工件时，导致管道中断。",
  "versions": [
    {
      "version": "GitLab CE/EE 16.5.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GitLab CE/EE 16.6.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GitLab Runner 16.5.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the artifact retention period in the project settings does not retroactively extend the expiration of already-uploaded artifacts; only new artifacts will have the updated policy.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Re-running the failed job without re-running the dependency job that produced the artifact will still reference the expired artifact and fail again.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Re-run the entire pipeline from the beginning to regenerate all artifacts: navigate to the pipeline page and click 'Run Pipeline' or trigger a new pipeline via API: `curl --request POST --header \"PRIVATE-TOKEN: $TOKEN\" \"https://gitlab.com/api/v4/projects/$PROJECT_ID/trigger/pipeline?ref=main\"`",
      "success_rate": 0.95,
      "how": "Re-run the entire pipeline from the beginning to regenerate all artifacts: navigate to the pipeline page and click 'Run Pipeline' or trigger a new pipeline via API: `curl --request POST --header \"PRIVATE-TOKEN: $TOKEN\" \"https://gitlab.com/api/v4/projects/$PROJECT_ID/trigger/pipeline?ref=main\"`",
      "condition": "",
      "sources": []
    },
    {
      "action": "If only specific artifacts are needed, re-run the job that produces the artifact using `CI_JOB_TOKEN` to download fresh artifacts: `job: stage: build script: - echo \"Rebuilding artifact\" artifacts: paths: [build.zip] expire_in: 7 days`",
      "success_rate": 0.85,
      "how": "If only specific artifacts are needed, re-run the job that produces the artifact using `CI_JOB_TOKEN` to download fresh artifacts: `job: stage: build script: - echo \"Rebuilding artifact\" artifacts: paths: [build.zip] expire_in: 7 days`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Re-run the entire pipeline from the beginning to regenerate all artifacts: navigate to the pipeline page and click 'Run Pipeline' or trigger a new pipeline via API: `curl --request POST --header \"PRIVATE-TOKEN: $TOKEN\" \"https://gitlab.com/api/v4/projects/$PROJECT_ID/trigger/pipeline?ref=main\"`",
    "If only specific artifacts are needed, re-run the job that produces the artifact using `CI_JOB_TOKEN` to download fresh artifacts: `job: stage: build script: - echo \"Rebuilding artifact\" artifacts: paths: [build.zip] expire_in: 7 days`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.gitlab.com/ee/ci/yaml/#artifactsexpire_in",
  "official_doc_section": null,
  "error_code": "GITLAB_ARTIFACT_EXPIRED",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-04-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}