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

Remove EMR Conn from example #525

Merged
merged 3 commits into from
Aug 2, 2022
Merged

Conversation

pankajastro
Copy link
Contributor

@pankajastro pankajastro commented Jul 15, 2022

Now emr_conn_id is optional in EmrCreateJobFlowOperator since the configuration we pass using param job_flow_overrides so the emr_conn_id is no longer require. We can merge this once the provider for June is released apache-airflow-providers-amazon==4.1.0
OSS PR: apache/airflow#24306

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #525 (04062e2) into main (0948767) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #525   +/-   ##
=======================================
  Coverage   98.27%   98.27%           
=======================================
  Files          72       72           
  Lines        3996     3996           
=======================================
  Hits         3927     3927           
  Misses         69       69           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0948767...04062e2. Read the comment docs.

@@ -72,7 +71,7 @@
cluster_creator = EmrCreateJobFlowOperator(
task_id="create_job_flow",
job_flow_overrides=JOB_FLOW_OVERRIDES,
emr_conn_id=EMR_CONN_ID,
aws_conn_id=AWS_CONN_ID,
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this fail for apache-airflow-providers-amazon < 4.1.0 ? We should make it fail safe for previous versions of the provider then. Something similar to this, with a try-except block catching the exception: #471 (comment)

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, it would fail for apache-airflow-providers-amazon < 4.1.0. Does it make sense to safe fail here since this is an integration test?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would recommend to add try-except block to fail safe for previous versions as well as @pankajkoti suggested even though it is in integration

Copy link
Collaborator

Choose a reason for hiding this comment

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

@phanikumv @bharanidharan14 what is your opinion on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@pankajkoti I would recommend to add try-except block. I have mentioned it already

Copy link
Contributor

@rajaths010494 rajaths010494 Jul 27, 2022

Choose a reason for hiding this comment

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

I am not sure if we can use try-catch for an argument being passed to the operator.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we can add a comment in the example DAG that based on the versions of the provider what arguments are expected

Copy link
Contributor

Choose a reason for hiding this comment

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

@pankajastro adding comments in the example DAG is reasonable to me, so it helps user to know what arguements needs to be passed

Copy link
Contributor

Choose a reason for hiding this comment

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

@pankajastro Is this review comment is addressed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I have added a comment.

@pankajastro pankajastro force-pushed the remove_emr_conn_id_from_example branch from 0ae6bf3 to aeabf65 Compare August 1, 2022 18:29
@pankajastro pankajastro merged commit 309fa58 into main Aug 2, 2022
@pankajastro pankajastro deleted the remove_emr_conn_id_from_example branch August 2, 2022 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants