how to override skip_files on local dev server

128 views
Skip to first unread message

Jacob G

unread,
Jul 15, 2011, 3:17:16 PM7/15/11
to Google App Engine
skip_files seems to block access on local dev server. How do override
that? I need it for minifying javascript, but having access to
original files on dev server for debugging.

Jacob G

unread,
Jul 15, 2011, 3:19:02 PM7/15/11
to Google App Engine
To clarify, I don't want these file uploaded at all to GAE, because
I'll go over 3000 file limit.

Robert Kluin

unread,
Jul 15, 2011, 4:42:59 PM7/15/11
to google-a...@googlegroups.com
Hey Jscob,
It sounds like you're either dangerously close to the limit or have
a frightening number of js files. Perhaps you should write a build
script to handle making the mods you need or removing the files?

Robert

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

--
------
Robert Kluin
Ezox Systems, LLC

Jay Young

unread,
Jul 15, 2011, 6:36:21 PM7/15/11
to google-a...@googlegroups.com
Put your JS files outside of your app's directory structure and have your build process put the minified files in the right folder.  If you need to serve all of your JS files during development, you can serve them separately from your app using "python -m SimpleHTTPServer" from your root JS directory.  You just need to update the <script> tag in your HTML file.

Or, have one app.yaml file for development and another for deployment.

Jacob G

unread,
Jul 18, 2011, 8:54:26 AM7/18/11
to Google App Engine
Thanks.

I just looked at the code in dev_appserver.py and
dev_appserver_main.py, and saw that there is a command line option "--
allow_skipped_files". I plan to use this on my dev server to get
around this problem.

andreas schmid

unread,
Nov 9, 2011, 10:16:31 AM11/9/11
to google-a...@googlegroups.com
have the same issue but i use different folders depending on local development or deployed app.
i think the sdk should not block access to files. skip files should be there to avoid deploying those files and thats it.

Jacob Gur

unread,
Nov 9, 2011, 10:19:31 AM11/9/11
to google-a...@googlegroups.com
Now that GAE has increased file deployment limit from 3,000 to 10,000, this should not be an issue for most people.

andreas schmid

unread,
Nov 9, 2011, 10:53:35 AM11/9/11
to google-a...@googlegroups.com
i know its not an issue but what is the reason for blocking access to local files?
in my case i have a dev environment and whats going to be deployed and i don't see the reason why i have to deploy those files too or switch back and forth in the skip_files section.

no docs say that adding stuff to the skip_files section will affect access to those files. 

andreas schmid

unread,
Nov 9, 2011, 11:06:41 AM11/9/11
to google-a...@googlegroups.com
this can be turned off by changing lines 519 and 525 in google/appengine/tools/dev_appserver_import_hook.py

to: return True

ugly but works.

andreas schmid

unread,
Nov 9, 2011, 11:15:57 AM11/9/11
to google-a...@googlegroups.com
or even better start dev_appserver with --allow_skipped_files , did not test it yet...

Nick Johnson

unread,
Nov 9, 2011, 7:46:19 PM11/9/11
to google-a...@googlegroups.com
On Thu, Nov 10, 2011 at 2:53 AM, andreas schmid <a.sch...@gmail.com> wrote:
i know its not an issue but what is the reason for blocking access to local files?
in my case i have a dev environment and whats going to be deployed and i don't see the reason why i have to deploy those files too or switch back and forth in the skip_files section.

no docs say that adding stuff to the skip_files section will affect access to those files. 

The dev_appserver attempts to emulate the production environment as closely as possible. skipped files aren't available in production, so it makes them unavailable in dev. If you need access to files that aren't uploaded, you should write a script that runs outside the dev_appserver, rather than trying to work around the restrictions, which are designed to help you test your app in as realistic an environment as possible.

-Nick Johnson



--
Nick Johnson, Developer Programs Engineer, App Engine


andreas schmid

unread,
Nov 9, 2011, 8:51:41 PM11/9/11
to google-a...@googlegroups.com
nick i understand what you are trying to say but i still think such things should be documented here http://code.google.com/appengine/docs/python/config/appconfig.html#Skipping_Files

where the only thing said in the docs about the consequences of the skip_files configuration is:

The skip_files element specifies which files in the application directory are not to be uploaded to App Engine. The value is either a regular expression, or a list of regular expressions. Any filename that matches any of the regular expression is omitted from the list of files to upload when the application is uploaded.

this could avoid developers to spend hours to figure out whats wrong in their code.

andreas

Ugorji Nwoke

unread,
Nov 9, 2011, 9:47:43 PM11/9/11
to google-a...@googlegroups.com
Run dev_appserver.py -h

You should see the help. 

Documented there is the flag: --allow_skipped_files      Allow access to files matched by app.yaml's skipped_files (default False)

If you start dev_appserver.py with it, you should get access to files which will not be uploaded to appengine. 

It's documented to work on the script, even though the online documentation doesn't highlight all the options.

By default, the dev server behaves more like the production app engine (as expected). But that flag should do what you want.

If the flag doesn't work, then edit your app.yaml and make sure you update it before uploading.

Nick Johnson

unread,
Nov 10, 2011, 8:01:03 PM11/10/11
to google-a...@googlegroups.com
Hi Andreas,

The dev_appserver attempts to emulate the production environment in every way possible; we don't document each case explicitly because it's the default behaviour.

-Nick Johnson

andreas schmid

unread,
Nov 11, 2011, 7:33:20 AM11/11/11
to google-a...@googlegroups.com
still think this should be mentioned in the docs for skip_files.
Reply all
Reply to author
Forward
0 new messages