Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] moon ci doesn't work with a shallow clone #1724

Open
dudicoco opened this issue Nov 16, 2024 · 0 comments
Open

[bug] moon ci doesn't work with a shallow clone #1724

dudicoco opened this issue Nov 16, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dudicoco
Copy link

Describe the bug

When running moon ci --base HEAD~1 in CI with a shallow clone we get the following error:

[ WARN 2024-11-16 19:28:39.780] moon_app::queries::touched_files  Detected a shallow checkout, unable to run Git commands to determine touched files. 
[ WARN 19:2[8](https://github.com/.../actions/runs/11872654373/job/33086603328#step:4:9):39.780] moon_app::queries::touched_files  A full Git history is required for affected checks, falling back to an empty files list. 
Gathering touched files
  Error: app::ci::no_shallow
    × CI requires a full VCS history to operate correctly. Please avoid shallow
    │ checkouts.

I'm opening this as a bug rather than a feature request due to the fact that this error contradicts the --base flag.
If we are able to set the base to the last commit we should be able to use it with a shallow clone.
Shallow clones are critical for big monorepos due to the performance improvement they provide.

@dudicoco dudicoco added the bug Something isn't working label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants