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

Skipping the file if it was not found (the CI is fixed) #779

Merged
merged 32 commits into from
Jul 23, 2021

Conversation

DenisRumyantsev
Copy link
Contributor

@DenisRumyantsev DenisRumyantsev commented Jul 19, 2021

Description: occasionally the find function fails with the error Failed find: ENOENT: no such file or directory. The reason is that the fs.lstatSync method applies to a file that already was deleted. So we should check a file presence and skip it if it does not exist.

Changelog: node/task.ts — the find function — a part of the code where the error occurs was taken out to the separate _getStats function. A new field skipMissingFiles was added into the findOptions parameter. When it is true, the find function skips files that are not found during the _getStats function execution.

Related issue

@DenisRumyantsev DenisRumyantsev marked this pull request as draft July 19, 2021 11:02
@DenisRumyantsev DenisRumyantsev self-assigned this Jul 19, 2021
@DenisRumyantsev DenisRumyantsev marked this pull request as ready for review July 20, 2021 20:01
@DenisRumyantsev DenisRumyantsev requested a review from a team July 20, 2021 20:02
@DenisRumyantsev DenisRumyantsev changed the title Skipping the file if it was not found — CI fixing Skipping the file if it was not found (the CI is fixed) Jul 20, 2021
node/task.ts Outdated Show resolved Hide resolved
node/task.ts Outdated Show resolved Hide resolved
node/task.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@EzzhevNikita EzzhevNikita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DenisRumyantsev As far as I understand these changes should fix CI, but looks the issue still persists.

@DenisRumyantsev
Copy link
Contributor Author

@DenisRumyantsev As far as I understand these changes should fix CI, but looks the issue still persists.

@EzzhevNikita I have already tried to provide similar changes related to the same issue via this PR, but it broke the CI for Linux and macOS, so I had to revert it and made a new PR, the current one. For fixing the CI for Windows, there was created another separate issue.

Copy link

@alexander-smolyakov alexander-smolyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and please take a look at the suggestion

node/task.ts Outdated Show resolved Hide resolved
Co-authored-by: Alexander Smolyakov <[email protected]>
node/task.ts Outdated Show resolved Hide resolved
@DenisRumyantsev DenisRumyantsev merged commit acc731b into master Jul 23, 2021
node/task.ts Show resolved Hide resolved
node/task.ts Show resolved Hide resolved
node/task.ts Show resolved Hide resolved
node/task.ts Show resolved Hide resolved
fullstackinfo pushed a commit to fullstackinfo/azure-pipelines-task-lib that referenced this pull request Aug 17, 2024
A part of the code was taken out from the `find` function to the new `_getStats` function. A new field `skipMissingFiles` was added into the `findOptions` parameter. When it is true, the `find` function skips files that were not found during the `_getStats` function execution. Also, the `mocktests` timeout increased from 15 to 30 seconds.
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.

4 participants