Datastore sandbox is available through deploys in other sandboxes.

60 views
Skip to first unread message

Daniela Meneses

unread,
Feb 12, 2015, 5:21:21 PM2/12/15
to google-a...@googlegroups.com
Hi, 

Yesterday doing some deploys i notice something, not sure if it is a bug or feature but i can't find documentation about it. The thing is that I have two sanboxes:

myapp-app-com-bo
myapp-dev-com-bo

I deployed a version 1-6-1-rc  over myapp-dev-com-bo that was accessible trough 1-6-1-rc-dot-myapp-dev-com-bo.appspot.com and  i was distracted so i tried to access to 1-6-1-rc-dot-myapp-app-com-bo.appspot.com by a mistake. Big surprise when I notices that it was available but with the data of  myapp-app-com-bo datastore.  The thing was that I almost corrupt the datastore of production sandbox with the deploy that was meant for dev sandbox because this deploy contained many changes about how to save data.

Is this a feature? There is a way to disable it?

thanks in advance,
DM


Alex Martelli

unread,
Feb 12, 2015, 6:11:22 PM2/12/15
to google-a...@googlegroups.com
Multiple versions of the same GAE app always share the datastore -- no way to disable that.  When not desired, a reasonable workaround is to set a per-version namespace at every entry (if your app also uses namespaces in production, maybe a per-version *prefix* in front of each namespace).

I'm not 100% sure what exactly you mean by "sandboxes" in this context ("production sandbox" sounds strange to me) -- if they're separate GAE apps a deploy to one would not affect the other (but maybe you're having them share a git repo and that caused an undesired "common deploy"?).  I hope I'm addressing your actual underlying questions, if not please feel free to keep asking and clarifying.

Alex


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/d4dd471c-3024-4257-94fb-30db8d3ca778%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniela Meneses

unread,
Feb 13, 2015, 2:54:54 PM2/13/15
to google-a...@googlegroups.com
Yeap i know that multiple version of the same GAE app share the datastore but this is not the case.

By sandboxes i was referring to different GAE apps. The problem was that i was able to access to the datastore of different GAE app trough versions deployed in another GAE app. Or that's what I think until today because i make some more tests.

​Now I found out t​hat for example i have these versions over GAE:

1-6-1-rc
1-5-0-rc

that should be available under these urls:


but also i can access to the default version via:


you get the idea? it's availablefor any kind of matching as long as the url have ''-dot-myapp-dev-com-bo.appspot.com''

So i guess it's not a bug that i was thinking previously but there is any kind of documentation referring about this behaviour???

Thanks anyways


--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/bDE7qcrp4Rg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.

To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.

For more options, visit https://groups.google.com/d/optout.



--
Cheers,
​DM

Alex Martelli

unread,
Feb 13, 2015, 7:41:08 PM2/13/15
to google-a...@googlegroups.com
Documented at https://cloud.google.com/appengine/docs/python/config/appconfig :

"The default version is loaded when no version is specified or an invalid version is specified".

If you would please ask this question on StackOverflow (or ServerFault since it's more about sys-admin than sw development) I'll gladly respond there (unless others give the correct response first), so the whole interaction can be more easily found in the future by others with similar problems (stackexchange sites always show up very well in web searches for specific problems:-).


Thanks,

Alex


Vinny P

unread,
Feb 16, 2015, 2:21:58 AM2/16/15
to google-a...@googlegroups.com
On Fri, Feb 13, 2015 at 1:54 PM, Daniela Meneses <daniel...@gmail.com> wrote:
you get the idea? it's availablefor any kind of matching as long as the url have ''-dot-myapp-dev-com-bo.appspot.com''

So i guess it's not a bug that i was thinking previously but there is any kind of documentation referring about this behaviour???


In an above post Alex linked you to the Python version of the routing information, but I think the Java version is clearer: https://cloud.google.com/appengine/docs/java/modules/routing

Essentially, myapp-dev-com-bo would be a GAE application ID; anything you put in before the -dot- would be routed to a module/version of the default module. If nothing matches, then the request is routed to the default module. So yes, the fact that you're seeing it "available for any kind of matching" is perfectly acceptable and expected behavior. If you dislike this behavior, you can use the dispatch file (shown in the above link) to reroute requests according to your preference. 


On Fri, Feb 13, 2015 at 1:54 PM, Daniela Meneses <daniel...@gmail.com> wrote:
By sandboxes i was referring to different GAE apps. The problem was that i was able to access to the datastore of different GAE app trough versions deployed in another GAE app. Or that's what I think until today because i make some more tests.


 I think people were initially confused by your use of the term "sandbox" to refer to a production environment (production App Engine/deploying to a live App ID). Normally when people say sandbox, they mean a server that is isolated from public access or a developer environment on a local machine. It's not a big deal, but thanks for clarifying.
 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
 
Reply all
Reply to author
Forward
0 new messages