Trouble with dispatch.yaml

31 views
Skip to first unread message

Mike Hardy

unread,
Jan 17, 2018, 11:56:22 AM1/17/18
to Google App Engine
Hi There, we're having issues with dispatch.yaml. We have two environments (staging and production) with 3 services each.

The staging dispatch.yaml has no issues, and the production dispatch.yaml is working for all services, except li-notifications. When visiting li-notifications, the default GAE domain works but the custom route doesn't. The only difference between the two environments is the base url. The staging environment is `staging.<BASE>.com` and the production is just `<BASE>.com`.

What are we doing wrong?

Dispatch.yaml
dispatch:
 
- url: "<BASE>/backend/*"
    service
: li-django


 
- url: "<BASE>/*"
    service
: li-frontend


 
- url: "www.<BASE>/*"
    service
: li-frontend


 
- url: "<BASE>/notifications/*"
    service
: li-notifications


Gcloud app describe output:

dispatchRules:

- domain: <BASE>

  path: /backend/*

  service: li-django

- domain: <BASE>

  path: /*

  service: li-frontend

- domain: www.<BASE>

  path: /*

  service: li-frontend

- domain: <BASE>

  path: /notifications/*

  service: li-notifications

Jeremy D

unread,
Jan 17, 2018, 1:36:53 PM1/17/18
to Google App Engine
First thought here is that because dispatch checks these routes in order, you have a "<BASE>/*" route ahead of "<BASE>/notifications", so no routes will ever reach notifications, because your wildcard hits it first. Move the notification route ahead of the wildcard, and you should be good.

Mike Hardy

unread,
Jan 17, 2018, 2:15:38 PM1/17/18
to Google App Engine
Nailed it - thanks for the help Jeremy
Reply all
Reply to author
Forward
0 new messages