Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.
This repository was 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

Description

@ar-qun

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).

Activity

  1. duggelz commented on Dec 19, 2017

    @duggelz
    Contributor

    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.

  2. ar-qun commented on Dec 22, 2017

    @ar-qun
    Author

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions