0

The App Engine local dev server reloads every time there's a change to files - which is cool. What's uncool is that it also reloads on changes in .idea folder of the PyCharm editor, cluttering the logs. Tried adding this to app.yaml: skip_files: - ^(.*/)?#.*#$ - ^(.*/)?.*~$ - ^(.*/)?.*\.py[co]$ - ^(.*/)?.*/RCS/.*$ - ^(.*/)?\..*$ - ^\.idea$ # added this line in order to try and ignore .idea folder on build

This didn't help. Still rebuilds every time I do arbitrary stuff in the editor (not changing any code).

How can I tell App Engine dev server which folder to ignore for hot reload?

dsesto
  • 7,864
  • 2
  • 33
  • 50
MeLight
  • 5,454
  • 4
  • 43
  • 67

1 Answers1

0

dev_appserver.py --help mentions:

--watcher_ignore_re WATCHER_IGNORE_RE
                        Regex string to specify files to be ignored by the
                        filewatcher. (default: None)

In this case this is related to dev_appserver.py, which will detect changes in local app.yaml and reload local server, while app.yaml running in GAE is not supposed to do because reloading is done by gcloud app deploy.

A.Queue
  • 1,549
  • 6
  • 21
  • 1
    This looked exactly like what I need, except for the fact that it's not working. Provided any possible expression I could think of - no effect. Event tried `.*` keeps working as usual (not ignoring anything). – MeLight Dec 19 '17 at 08:33
  • What version are you using? The [resent version](https://github.com/GoogleCloudPlatform/python-compat-runtime/blob/743ade7e1350c790c4aaa48dd2c0893d06d80cee/appengine-compat/exported_appengine_sdk/google/appengine/tools/devappserver2/watcher_common.py#L71) seems to ignore all files starting with the dot(_IGNORED_PREFIX == '.'). – A.Queue Dec 19 '17 at 17:26
  • the link is leading to a deprecated version of what is now called the "flexible environment". I'm using standard environment. – MeLight Dec 20 '17 at 07:43
  • Can you share with me how exactly you where using `--watcher_ignore_re`? In any case I have installed `dev_appserver.py` following [this](https://cloud.google.com/appengine/docs/standard/python/download) instructions using `gcloud components install app-engine-python`. Version 1.9.64. When I browse the code I see that everything starting from '.' is ignored. And for me .idea is never detected. – A.Queue Dec 20 '17 at 16:07
  • Note that GAE's file watcher code is different on Mac, Linux, and Windows, so when discussing it, it helps to specify what system you're running on. – speedplane Jun 08 '18 at 17:11