-
Notifications
You must be signed in to change notification settings - Fork 11
Pass api version to jobs API calls across operator implementations #66
Conversation
10af94e
to
16759dc
Compare
16759dc
to
9af597f
Compare
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.
dev/logs/scheduler/latest
-- is this intentionally removed?
yes, looks like the log file was pushed to git erroneously earlier. Hence, removed it from Git tracking. |
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.
@pankajkoti it looks good overall!
Some feedback:
- It seems we don't have any tests that confirm if users set an environment variable, it will be forwarded to the API calls - which I understood is the goal with this ticket
- Were we exposing this environment variable before? It feels that
JOBS_API_VERSION
can be misleading - if we could expose it asDATABRICKS_JOBS_API_VERSION
- This was there before, but since we're using this as a setting, and not really a constant, it would be great if we had
setttings.py
as opposed toconstants.py
name: Build and test astro databricks provider | ||
on: | ||
on: # yamllint disable-line rule:truthy |
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.
@pankajkoti Curious about this comment!
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.
YAML linter was complaining that the value needs to be True or False. This is a way we have been using for the YAML linter in GitHub CI workflows across other projects to for disabling this false lint report.
The constant JOBS_API_VERSION that fetches this environment variable takes a default value if an env variable is not set. And thus we have a set value that gets passed to the API calls. The ticket was that although we had this constant, it was not getting passed across all the API calls and this is what we are trying to support in the PR.
Happy to rename it to so. Will create an immediate follow up PR.
Yes, makes sense. Will create an immediate follow up PR. Edit: Follow up PR to address the comments #68 |
Based on a user feedback, they would like to use
Databricks API version 2.1 for the various Databricks SDK
calls from the operator implementations. Hence, use the existing
configurable API version constant fetched from an
environment variable and pass it in places where
Databricks API calls are made from the Databricks SDK
across the operators implementations.
closes: https://github.com/astronomer/issues-airflow/issues/614