Skip to content
This repository was archived by the owner on Aug 26, 2020. It is now read-only.

Conversation

@saurabh3949
Copy link
Contributor

Since event.name of inotify just returns the folder name if a new folder is created, the directory structure wasn't being walked properly. This change fixes the bug to enable correct traversal of the directory.

Since event.name of inotify just returns the folder name if a new folder is created, the directory structure wasn't being walked properly. This change fixes the bug to enable correct traversal of the directory.
Copy link
Contributor

@mvsusp mvsusp left a comment

Choose a reason for hiding this comment

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

  • please create test cases for the new behavior

if flag is inotify_simple.flags.ISDIR and inotify_simple.flags.CREATE & event.mask:
for folder, dirs, files in os.walk(os.path.join(intermediate_path, event.name)):
path = os.path.join(
*[intermediate_path] + [watchers[wd] for wd in range(1, event.wd + 1)] + [event.name])
Copy link
Contributor

Choose a reason for hiding this comment

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

Please extract this logic outside os.path.join to be more readable and easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was an issue with this. I have fixed it in the latest commit.

@nadiaya
Copy link
Contributor

nadiaya commented Jan 22, 2019

We have a test that was supposed to test for this behavior, but failed :(
We should add test that creates dir1 and dir1/dir2 with a sleep in between them.

@nadiaya
Copy link
Contributor

nadiaya commented Jan 23, 2019

Tests failed because of this numpy bug:
numpy/numpy#12754

@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #164 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
- Coverage   92.75%   92.67%   -0.08%     
==========================================
  Files          25       25              
  Lines        1159     1160       +1     
  Branches      117      117              
==========================================
  Hits         1075     1075              
  Misses         55       55              
- Partials       29       30       +1
Impacted Files Coverage Δ
src/sagemaker_containers/_intermediate_output.py 81.6% <100%> (-0.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7d4a97...9d8d1a1. Read the comment docs.

@nadiaya nadiaya merged commit dec0233 into aws:master Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants