-
Notifications
You must be signed in to change notification settings - Fork 476
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
fix(amazonq): Skip including deleted files for FeatureDev context. #6312
Conversation
|
216dd73
to
20d19cd
Compare
Is there a way we can test this behavior? Something along the lines of having |
20d19cd
to
d8aff5e
Compare
} catch (error) { | ||
if (error instanceof Error && error.message.includes('File not found')) { | ||
// No-op: Skip if file was deleted or does not exist | ||
// Reference: https://github.com/cthackers/adm-zip/blob/1cd32f7e0ad3c540142a76609bb538a5cda2292f/adm-zip.js#L296-L321 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it set a code
? try hasCode
function hasCode<T>(error: T): error is T & { code: string } { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error does not set a code: https://github.com/cthackers/adm-zip/blob/1cd32f7e0ad3c540142a76609bb538a5cda2292f/util/errors.js#L56
d8aff5e
to
d12d1d6
Compare
This is mitigating a situation where there is a race condition and the file is deleted as they are being zipped. In this case, |
Problem
When zipping context for /dev, customer build processes (file watchers, etc.) may delete build artifacts we’ve already enumerated but have not added to the archive. As a best practice, customers should
.gitignore
these types of files, but in the event they don't, this has the potential to block /dev from running.Solution
Skip affected files, which are not found when adding to zip context for Feature Dev.
feature/x
branches will not be squash-merged at release time.