-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: generate new sources.csv from database #888
feat: generate new sources.csv from database #888
Conversation
@@ -318,18 +318,18 @@ jobs: | |||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||
PLAN_OUTPUT: ${{ steps.plan.outputs.stdout }} | |||
|
|||
- name: Persist TF plan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
"max_instance_request_concurrency": 20, | ||
"max_instance_count": 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use set the number of instances to one:
"max_instance_request_concurrency": 20, | |
"max_instance_count": 10, | |
"max_instance_request_concurrency": 1, | |
"max_instance_count": 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
:return: A filled DataCollector | ||
""" | ||
db = Database(database_url=os.getenv("FEEDS_DATABASE_URL")) | ||
print(f"Using database {db.database_url}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the logger for GCP. Example: https://github.com/MobilityData/mobility-feed-api/blob/e59d9568c3bd913c32144519827722301e80ebaa/functions-python/batch_process_dataset/src/main.py#L37 and
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: David Gamez <[email protected]>
Summary:
closes #779
Also moved some libraries into the shared folder, so a bunch of changes are just modification to the import.
Expected behavior:
After running the cloud function, the file https://storage.googleapis.com/mobilitydata-datasets-dev/sources_v2.csv should contain the contents of the DB
Testing tips:
Painstakingly look at the result csv and see if it makes sense.
Deployment can be tested by running the api-dev.yml and then triggering the function.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.sh
to make sure you didn't break anything