Skip to content

[eas-cli] Fix workflow detection for tracked gitignored files#3561

Open
sjchmiela wants to merge 4 commits intomainfrom
stanley/fix-gitignored-workflow-detection
Open

[eas-cli] Fix workflow detection for tracked gitignored files#3561
sjchmiela wants to merge 4 commits intomainfrom
stanley/fix-gitignored-workflow-detection

Conversation

@sjchmiela
Copy link
Copy Markdown
Contributor

Why

resolveWorkflowAsync() decides between managed and generic by checking whether native workflow markers exist and whether vcsClient.isFileIgnoredAsync() says they are ignored.

After the recent Git client rework, GitClient.isFileIgnoredAsync() treated tracked files as never ignored when there was no .easignore. That matches a checked-out clone when requireCommit: true, but it does not match the requireCommit: false archive path, where we create a repo with --no-checkout and then copy the working tree with .gitignore filtering.

That mismatch can make workflow detection report GENERIC even though the uploaded archive no longer contains the native project.

How

  • use git check-ignore --no-index when requireCommit is false, so tracked files that would be filtered out of the working tree copy are treated as ignored
  • keep the existing tracked-file behavior when requireCommit is true, because those builds rely on a Git checkout
  • extend the Git client tests to cover tracked .gitignore matches
  • add a Git-backed workflow regression test that exercises resolveWorkflowAsync() directly

Test Plan

  • Added integration-style tests for GitClient.isFileIgnoredAsync() behavior with tracked .gitignore matches
  • Added a Git-backed resolveWorkflowAsync() regression test for the requireCommit: false vs requireCommit: true split
  • I could not run the test suite locally in this environment because yarn is not installed

@github-actions
Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

@sjchmiela sjchmiela force-pushed the stanley/fix-gitignored-workflow-detection branch from 59b7829 to 5ce625e Compare March 31, 2026 10:06
@github-actions
Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.38%. Comparing base (3945763) to head (7e912ca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3561      +/-   ##
==========================================
+ Coverage   54.38%   54.38%   +0.01%     
==========================================
  Files         824      824              
  Lines       35420    35421       +1     
  Branches     7318     7319       +1     
==========================================
+ Hits        19258    19259       +1     
  Misses      16075    16075              
  Partials       87       87              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant