google-cloud-scheduler version pip show google-cloud-scheduler:
Name: google-cloud-scheduler
Version: 1.3.0
Summary: Cloud Scheduler API API client library
Home-page: https://github.com/googleapis/python-scheduler
Author: Google LLC
Author-email: googleapis-packages@google.com
License: Apache 2.0
Location: /mnt/c/Users/aubre/Projects/course_collect/venv/lib/python3.8/site-packages
Requires: google-api-core
Steps to reproduce
Provision Cloud Scheduler API and deploy a non-default app to App Engine with an endpoint that can be accessed by Cloud Scheduler.
my app.yaml (note project id is not course-collect)
service: course-collect
runtime: python38
handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
- url: /static
static_dir: static
# This handler routes all requests not caught above to your main app. It is
# required when static routes are defined, but can be omitted (along with
# the entire handlers section) when there are no static files defined.
- url: /.*
script: auto
Using python-scheduler wrapper of the Cloud Scheduler API, run something like this locally (authenticated of course):
The job will be created and look something like this
Note the Target uri, which as the user, I am not responsible for putting together App Engine : course-collect.course-gen.ue.r.appspot.com/init
Now deploy the app with the non-default service name (it does not matter if you do this step before/after invoking your library)
$ gcloud app deploy app.yaml
Services to deploy:
descriptor: [/mnt/c/Users/aubre/Projects/course_collect/app.yaml]
source: [/mnt/c/Users/aubre/Projects/course_collect]
target project: [course-gen]
target service: [course-collect]
target version: [20200720t002354]
target url: [https://course-collect-dot-course-gen.ue.r.appspot.com]
Do you want to continue (Y/n)? y
Beginning deployment of service [course-collect]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 3 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [course-collect]...done.
Setting traffic split for service [course-collect]...done.
Deployed service [course-collect] to [https://course-collect-dot-course-gen.ue.r.appspot.com]
You can stream logs from the command line by running:
$ gcloud app logs tail -s course-collect
To view your application in the web browser run:
$ gcloud app browse -s course-collect
Google App Engine, by default, provisions non-default services with uri's in the syntax <custom_name>-dot-<default_name>..... and this is something I think is much harder to change and probably shouldn't. See Deploy multiple applications from same project
Therefore, the blame for trying to target App Engine : course-collect.course-gen.ue.r.appspot.com/init falls with this library, and it should take into account the "dot" syntax.
Code example
already shown
Notes
I recognized, on further inspection, that my flask deployment had some issues, and the request is actually going through, despite the discrepancies in target uri's which makes this no longer a bug, but still a nice-to-have for the uri's to match, For anyone not familiar, it would seem like this library is incompatible with non-default services
Environment details
python --version
: Python 3.8.2pip --version
: pip 20.0.2google-cloud-scheduler
versionpip show google-cloud-scheduler
:Steps to reproduce
my app.yaml (note project id is not course-collect)
Using python-scheduler wrapper of the Cloud Scheduler API, run something like this locally (authenticated of course):
app.py
Note the Target uri, which as the user, I am not responsible for putting together
App Engine : course-collect.course-gen.ue.r.appspot.com/init
Now deploy the app with the non-default service name (it does not matter if you do this step before/after invoking your library)
Google App Engine, by default, provisions non-default services with uri's in the syntax
<custom_name>-dot-<default_name>.....
and this is something I think is much harder to change and probably shouldn't. See Deploy multiple applications from same projectTherefore, the blame for trying to target
App Engine : course-collect.course-gen.ue.r.appspot.com/init
falls with this library, and it should take into account the "dot" syntax.Code example
already shown
Notes
I recognized, on further inspection, that my flask deployment had some issues, and the request is actually going through, despite the discrepancies in target uri's which makes this no longer a bug, but still a nice-to-have for the uri's to match, For anyone not familiar, it would seem like this library is incompatible with non-default services