Added overrides parameter to CloudRunExecuteJobOperator#34874
Conversation
|
Looks like google-cloud-run pypi (repo is called googleapis/python-run) doesn't even have the overrides variable available in their API yet. I made an issue for adding this functionality on the googleapis/python-run repo. |
|
Functionality is there and will be released in v0.10.0: googleapis/python-run#127 |
e56daad to
6e8f42a
Compare
There was a problem hiding this comment.
The type for overrides should indicate the type for the key and the values, though most often it is dict[str, Any] a dictionary allows other types for the key such as integers.
There was a problem hiding this comment.
Are you saying I need to make sure that the type of the dictionary is more specific?
There was a problem hiding this comment.
Yes
Something like
overrides: dict[str, Any] | None = NoneIf that is the expect key type.
There was a problem hiding this comment.
What kind of dict are we expecting here? If it is defined well, I prefer adding typing to it. If not, do dict[str, Any]
There was a problem hiding this comment.
@cjames23 @amoghrajesh I modified the dictionary type based on what is expected here: https://github.com/googleapis/python-run/blob/main/google/cloud/run_v2/types/job.py#L258
There was a problem hiding this comment.
As I could see some of the values in this dictionary could be integers, so better use dict[str, Any] | None
|
Need to fix remaining Static Checks For quick fix would be enough to install pre-commit and run pip install pre-commit
pre-commit install # should be run in the cloned airflow repo directory
pre-commit run black --all-files
pre-commit run ruff --all-filesAfter that add files and push into repo |
7021f48 to
85aca2f
Compare
85aca2f to
11b4237
Compare
overrides parameter for CloudRunExecuteJobOperator
overrides parameter for CloudRunExecuteJobOperatoroverrides parameter to CloudRunExecuteJobOperator

This PR aims to add the functionality of the "overrides" variable for the CloudRunExecuteJobOperator as provided by the google.cloud.run.v2 package.
Notes: