Skip to content

compile.py breaks when a file gets deleted in a commit #40

Description

@camp5456

Background

Run #260 failed because commit 98e204c deleted head--system.html when it got split into head--system-css.html and head--system-js.html. The compile job crashed with FileNotFoundError: No such file or directory: 'head--system.html'.

Cause

compile.yml uses git diff-tree to get the list of files changed in a commit, and that list includes deleted files, not just added or edited ones. compile.py then tries to open every file in that list, including the one that no longer exists, and it errors out.

Solution

Add --diff-filter=d to the git diff-tree command in compile.yml so deleted files never make it into the list. Would also be good to add a check in compile.py that skips a file if it's missing, just so a future edge case like this doesn't take down the whole job again.

For now I got the artifacts I needed by manually running Deploy Components with the recompile input set to each new filename one at a time, which skips the diff-tree step entirely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions