-
Notifications
You must be signed in to change notification settings - Fork 26
Add Cloud Run Jobs Infrastructure Block #48
Conversation
Not entirely sure about: Also, have to run an actual test tomorrow, but should be good for a round of reviews first |
Latest commit removes the key from preview
|
Changes mkdocstrings Python handler to support pydantic fields
Should be handled by "Secret" settings rather than manual exclusion |
I think we need a SecretJson field type to support service_account_info |
docs/cloud_run_job.md
Outdated
@@ -0,0 +1 @@ | |||
::: prefect_gcp.cloud_run_job |
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.
I think the new module should be named cloud_run
since that's the name of the GCP service.
::: prefect_gcp.cloud_run_job | |
::: prefect_gcp.cloud_run |
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.
FWIW, Cloud Run has two distinct services - Cloud Run Services and Cloud Run Jobs. This infrastructure block only supports Cloud Run Jobs. I think it's probably worth making the distinction, because the two have different use-cases, slightly different interfaces (I think), and different resource limits.
https://cloud.google.com/run/docs/overview/what-is-cloud-run#services-and-jobs
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.
Yep, the block will still be called CloudRunJob
. I'm only suggesting that we change the name of the module to match the granularity of other modules in this collection. If we develop other integrations that work with Cloud Run services or Cloud Run jobs, they can go into this module.
mkdocs.yml
Outdated
@@ -61,3 +61,4 @@ nav: | |||
- Cloud Storage: cloud_storage.md | |||
- BigQuery: bigquery.md | |||
- Secret Manager: secret_manager.md | |||
- Cloud Run Job: cloud_run_job.md |
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.
- Cloud Run Job: cloud_run_job.md | |
- Cloud Run: cloud_run.md |
Ran successfully with new changes
|
Thanks @peytonrunyan for contributing the bulk of this PR! |
Whoop - thanks for taking this to the finish line man! |
Summary
Adds a
CloudRunJob
infrastructure block to allow for running deployments using Google Cloud Run Jobs.Relevant Issue(s)
Closes PrefectHQ/prefect#5884
Checklist
Details and discussion
I want to go ahead and get this under review while I'm finishing up the last of the tests for what I have. I plan to schedule a walk-through for either this afternoon or tomorrow afternoon if possible.
Credentials
I made some changes to the Credentials block that I would like to discuss with @ahuang11 before anything is finalized.
get_service_account_value
public so that I could access it from withinCloudRunJob
Design Decisions
Open Question and things I'm kicking around
Job
andExecution
and out ofCloudRunJob
. This would probably make testing easier. This feels like it could probably be done later.