Skip to content
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

fix return values on glue operators deferrable mode #31694

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

vandonr-amz
Copy link
Contributor

when implementing the glue deferrable operators in #30948 I forgot to match the return value of the execute function in the deferrable handler.
Fixing that here, so that the behavior stays the same when using the deferrable version.

Also changing error handling to throw right away instead of returning the error in an event, saving unnecessary scheduling work.

Comment on lines 62 to 63
glue_job_run = await hook.async_job_completion(self.job_name, self.run_id, self.verbose)
yield TriggerEvent({"status": "success", "message": "Job done", "value": glue_job_run["JobRunId"]})
Copy link
Member

@pankajkoti pankajkoti Jun 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't glue_job_run["JobRunId"] the same as self.run_id?

Perhaps we could just return that, so no need to fetch the value from the dictionary key.
Upto if you'd like to consider the suggestion :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yes you're right :p

@o-nikolas o-nikolas merged commit 62938e9 into apache:main Jun 5, 2023
@vandonr-amz vandonr-amz deleted the vandonr/fix branch June 5, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:amazon AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants