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

scan: ignore FileNotFoundError #5065

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

oliver-sanders
Copy link
Member

  • During a scan directories are listed asynchronously and recursively.
  • If a directory is queued for listing, but then deleted before the
    listing takes place a FileNotFoundError will occur.
  • This is highly unlikely IRL, however, in the integration tests, where run
    dirs are created and destroyed at scale and in parallel this is
    actually quite likely.

Example fail: https://github.com/cylc/cylc-flow/runs/7805964418?check_suite_focus=true

Likely caused by #5028, not sure why, perhaps it didn't raise the error, perhaps it was more eager with its scheduling.

Tested with 110X parallelism (pytest -n 110 tests/integration), couldn't reproduce post-fix.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg and conda-environment.yml.
  • Tests are included (or explain why tests are not needed).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PRs raised to both master and the relevant maintenance branch.

* During a scan directories are listed asynchronously and recursively.
* If a directory is queued for listing, but then deleted before the
  listing takes place a FileNotFoundError will occur.
* This is highly unlikely IRL, however, in the integration tests, where run
  dirs are created and destroyed at scale and in parallel this is
  actually quite likely.
@oliver-sanders oliver-sanders added this to the cylc-8.1.0 milestone Aug 12, 2022
@oliver-sanders oliver-sanders self-assigned this Aug 12, 2022
@oliver-sanders oliver-sanders requested a review from wxtim August 15, 2022 09:37
Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

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

I can't mathematically prove that this is the fix. But empirically it looks like the fix.

@wxtim wxtim merged commit 00b9f2e into cylc:master Aug 16, 2022
@oliver-sanders oliver-sanders deleted the scandir-file-not-found-error branch August 16, 2022 09:09
hjoliver pushed a commit to hjoliver/cylc-flow that referenced this pull request Aug 18, 2022
* During a scan directories are listed asynchronously and recursively.
* If a directory is queued for listing, but then deleted before the
  listing takes place a FileNotFoundError will occur.
* This is highly unlikely IRL, however, in the integration tests, where run
  dirs are created and destroyed at scale and in parallel this is
  actually quite likely.
wxtim added a commit to wxtim/cylc that referenced this pull request Aug 18, 2022
* master:
  tui: add poll mutation (cylc#5075)
  bump dev version
  Add workflow field to ClientError, ClientTimeout
  Bump dev version
  Lint.hardcode style index numbers (cylc#5055)
  Wait for preparing tasks to submit before auto restart (cylc#5062)
  update changelog
  Prepare release 8.0.1
  scan: ignore FileNotFoundError (cylc#5065)
wxtim pushed a commit to wxtim/cylc that referenced this pull request Aug 26, 2022
* During a scan directories are listed asynchronously and recursively.
* If a directory is queued for listing, but then deleted before the
  listing takes place a FileNotFoundError will occur.
* This is highly unlikely IRL, however, in the integration tests, where run
  dirs are created and destroyed at scale and in parallel this is
  actually quite likely.
wxtim pushed a commit to wxtim/cylc that referenced this pull request Oct 3, 2022
* During a scan directories are listed asynchronously and recursively.
* If a directory is queued for listing, but then deleted before the
  listing takes place a FileNotFoundError will occur.
* This is highly unlikely IRL, however, in the integration tests, where run
  dirs are created and destroyed at scale and in parallel this is
  actually quite likely.
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.

3 participants