1

When I first time setup(do not recall details) Appengine somehow mapped default service to datastore_admin. I was adding additional service and gcloud forced me to update default.

ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The first service (module) you 
upload to a new application must be the 'default' service (module). Please 
upload a version of the 'default' service (module) before uploading a version 
for the 'datastore-export' service (module).

I updated but it seems I messed up. Now it does not give me the option to rollback default service map to datastore_admin. For educational perspective any thoughts how can I do it? I could not find clear guidance on this.

Askar
  • 513
  • 5
  • 22

1 Answers1

3

The message simply indicates that the app needs a default service. See:

Assuming your app was indeed running with just a service called datastore_admin (maybe from before the mandatory default service check was in place, these days it shouldn't be possible to make such deployment) - you just need to "make" one of the services the default now, to pass the check. It doesn't really matter which service or what the service does, as long as it doesn't interfere with the named services, of course.

You can even make it not do anything or just return errors for the url patterns it is responsible for, if you want to, but you'd be just wasting instance hours - the default service gets all the garbage traffic that other services aren't prepared to handle. So if you have one service which would normally be accessible via a web browser - make that the default one - it typically has to be prepared for garbage requests anyways.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • I see. As far as `wasting instance hours` how deployments will look like. Cos it is asking me at least one `handler` setup. – Askar Sep 26 '18 at 02:19
  • That's why I said a web service is best suited for it. But you can have a handler which doesn't do anything/much - just get one from a quick start tutorial. – Dan Cornilescu Sep 26 '18 at 02:23
  • Thanks much Dan! I end up adding some code that I needed and map it to `default` service. – Askar Sep 26 '18 at 11:57