Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

dev_appserver.py doesn't ignore directories indicated in --watcher_ignore_re and skip_files #122

Open
ar-qun opened this issue Dec 19, 2017 · 2 comments

Comments

@ar-qun
Copy link

ar-qun commented Dec 19, 2017

There are reports that --watcher_ignore_re and skip_files do not have any effect.

The case:

def ignore_dir(dirpath, dirname, skip_files_re):
"""Report whether a directory should not be watched."""
return (dirname.startswith(_IGNORED_PREFIX) or
skip_files_re and skip_files_re.match(os.path.join(dirpath, dirname)))

  1. os.path.join(dirpath, dirname) returns an absolute path.
  2. skip_files_re.match compares from the begging
  3. match seem always return False

I observed that function

def skip_ignored_dirs(dirpath, dirnames, skip_files_re=None):
"""Skip directories that should not be watched.
Args:
dirpath: the prefix of absolute paths to dirnames.
dirnames: a list of directories. e.g: we have two directories:
'/tmp/foo/a.txt', '/tmp/foo/b.txt', then:
dirpath = '/tmp/foo', dirnames = ['a.txt', 'b.txt']
skip_files_re: a regular_expression, absolute paths matching it are
skippable.
"""
_remove_pred(dirnames, lambda d: ignore_dir(dirpath, d, skip_files_re))

doesn't produce any changes on the list of directories dirnames.

gcloud is of version 183 and python extension was updated on 19th of December(will edit in the version tomorrow).

@duggelz
Copy link
Contributor

duggelz commented Dec 19, 2017

Thanks for your bug report. I've filed an internal bug for the team which handles dev_appserver.

Any additional information you can provide would be helpful, including the exact gcloud commands you are running. If you can provide part or all of your app.yaml file, that would also be very helpful.

@ar-qun
Copy link
Author

ar-qun commented Dec 22, 2017

At some point, I thought I was able to replicate the issue, but when I run it outside of the IDE I noticed that everything works as intended. Apparently so far the user who was facing this issue originally uses the same IDE. I will have to investigate more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants