-
Notifications
You must be signed in to change notification settings - Fork 57
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
DominoSparkOperator #80
DominoSparkOperator #80
Conversation
@abhijeet2096 For my personal development environment I've been using poetry to manage package dependencies (also to pull in test dependencies like pytest), I can also push those files if you all are interested. |
change the template field to be a proper tuple
Add RunFailedException as a possible throwable from the polling function.
@@ -377,6 +377,8 @@ def job_start_blocking(self, poll_freq: int = 5, max_poll_time: int = 6000, **kw | |||
def get_job_status(job_identifier): | |||
status = self.job_status(job_identifier) | |||
self.log.info(f"Polling Job: {job_identifier} status is completed: {status['statuses']['isCompleted']}") | |||
if status['statuses']['executionStatus'] == "Failed": |
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.
@abhijeet2096 throwing an exception here if the status is failed so it can be handled downstream by other functions, like the airflow operator. I noticed failures were happening silenty since we just check for job completion and
job_complete != job_success
dag=dag, | ||
task_id="foo", | ||
project=TEST_PROJECT, | ||
command="test_spark.py", |
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.
Hey @wseaton can we have python/bash commands instead of name of the test files test_spark.py
, test_spark_fail.sh
?
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.
Not here, since I can't provide a direct command via the v4 api, before I could do this via isDirect
. I'd also like to not have to use wrapper scripts 🙂
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.
Hey @wseaton can you add these sample test files (test_spark.py, test_spark_fail.sh) here, in this folder?
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.
@abhijeet2096 this has been 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.
This looks good. Can you also update the associated readme for airflow section.
@abhijeet2096 readme has been updated |
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.
🚀
Add new
DominoSparkOperator
that supports the v4 job start function signature along with associated unit tests.