Skip to content

Fix Smart CI workspace destruction in smart-ci composite action#74

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-smart-ci-job-failure
Draft

Fix Smart CI workspace destruction in smart-ci composite action#74
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-smart-ci-job-failure

Conversation

Copy link

Copilot AI commented Mar 6, 2026

Two checkout steps inside .github/actions/smart-ci/action.yml were sequentially wiping the workspace (default clean: true), deleting the composite action's own files before later steps could use them — causing every PR's Smart_CI job to fail with Can't find 'action.yml' under '.github/actions/smart-ci'.

Changes

  • checkout wait-for-check action: Added path: _wait_for_check_src so the cross-repo checkout (openvinotoolkit/openvino) targets a subdirectory instead of reinitializing the workspace root. Updated the downstream uses: to ./_wait_for_check_src/.github/actions/wait-for-check-completion.
  • checkout components file: Added clean: false to preserve existing workspace files when sparse-checking out .github/components.yml from the current repo.

Tickets:

  • N/A

AI Assistance:

  • AI assistance used: yes
  • Investigated the failed run (#22569866261) via GitHub Actions logs to confirm the exact deletion sequence (3 workspace wipes before requirements.txt was needed). Fix reviewed with automated code review and CodeQL; no issues found. Human validation pending re-run of the affected workflow.
Original prompt

This section details on the original issue you should resolve

<issue_title>CI Failure DoctorCI Failure Investigation - Run #31 - Manylinux 2_28 Smart_CI Job Failure</issue_title>
<issue_description>## Summary

The Manylinux 2_28 workflow (run #31) failed on PR #63 (dependabot bump of actions/download-artifact 7.0.0 → 8.0.0). The failure is unrelated to the PR change itself — it is a pre-existing CI configuration issue in the Smart_CI job.

Failure Details

Root Cause Analysis

The Smart_CI job performs a sparse checkout of .github/components.yml from akashchi/openvino using the ababushk/checkout action with clean: true. This operation deletes the entire workspace contents before checking out only the single file, destroying the previously-checked-out local actions including .github/actions/smart-ci.

When the workflow subsequently tries to invoke the local action .github/actions/smart-ci, GitHub Actions cannot find it:

Deleting the contents of '/home/runner/work/openvino/openvino'
...
ERROR: Could not open requirements file: [Errno 2] No such file or directory:
  '/home/runner/work/openvino/openvino/./.github/actions/smart-ci/requirements.txt'
ERROR: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
  '/home/runner/work/openvino/openvino/.github/actions/smart-ci'.
  Did you forget to run actions/checkout before running your local action?

Key sequence in .github/workflows/manylinux_2_28.ymlSmart_CI job:

  1. actions/checkout checks out the PR branch (full workspace available ✅)
  2. ababushk/checkout sparse-checks out .github/components.yml from akashchi/openvino with clean: trueoverwrites workspace
  3. The local action .github/actions/smart-ci is now missing → failure

Failed Jobs and Errors

Job Conclusion Key Error
Smart_CI ❌ failure Can't find 'action.yml' under '.github/actions/smart-ci'
Docker ⏭ skipped Depends on Smart_CI
Build ⏭ skipped Depends on Smart_CI
Python API tests ⏭ skipped Depends on Smart_CI
NodeJS API tests ⏭ skipped Depends on Smart_CI
ci/gha_overall_status_manylinux_2_28 ❌ failure Downstream failure aggregation

Investigation Findings

  • The PR change (actions/download-artifact 7 → 8) is a minor version bump in a GitHub Actions step, not the cause of this failure.
  • The Smart_CI job would fail on any PR against this repository because the sparse-checkout step destroys the local action files needed by subsequent steps.
  • The triage check completed with skipped conclusion, which triggered a ##[warning]Checks completed with mixed conclusions: mixed before proceeding — this is benign.

Recommended Actions

  • Fix the workspace destruction issue in Smart_CI job: Change the sparse-checkout step to use a separate path/directory (e.g., path: /tmp/components-checkout) instead of the default workspace, so the primary checkout is not overwritten.
  • Alternatively, add a path parameter to the ababushk/checkout step so it checks out to a subdirectory, e.g.:
    - uses: ababushk/checkout@9bec46a94a83db82acd4303e7627d88db71402a5
      with:
        path: /tmp/components
        sparse-checkout: .github/components.yml
        ...
    Then update downstream references to read from /tmp/components/.github/components.yml.
  • Once fixed, re-run PR Bump actions/download-artifact from 7.0.0 to 8.0.0 #63 — the dependabot bump itself is a safe change.

Prevention Strategies

  • When using multiple actions/checkout steps in a single job, always use the path parameter to direct secondary checkouts to non-overlapping directories.
  • Review all clean: true checkout steps that are not the first step in a job — these will overwrite the workspace.
  • Add a workflow-level check that verifies the local action directory exists before use (early fail with clear message).

AI Team Self-Improvement

When writing or reviewing GitHub Actions workflows that use multiple actions/checkout (or compatible) steps in the same job, always verify that secondary checkouts specify a non-default path to avoid overwriting the primary workspace. The default clean: true behavior of checkout deletes all workspace contents. Local actions referenced via relative paths (e.g., ./.github/actions/my-action) will disappear if any subsequent checkout step cleans the workspace. Add a pre-step assertion if needed: `test -f .github/actions/smart-ci/action.yml |...


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: akashchi <65596953+akashchi@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI failure in Manylinux 2_28 Smart_CI job Fix Smart CI workspace destruction in smart-ci composite action Mar 6, 2026
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.

CI Failure DoctorCI Failure Investigation - Run #31 - Manylinux 2_28 Smart_CI Job Failure

2 participants