-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Add MwaaDagRunSensor to Amazon Provider Package #46945
base: main
Are you sure you want to change the base?
Conversation
Includes the doc page, unit tests and system test. Support for deferrable mode will be added soon.
4a59f3e
to
6a9b286
Compare
…erministic so that xdist execution doesn't fail
Added reviewers at Ramit's request. |
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.
LGTM! I left a few nits, but I wouldn't say they're merge blocking.
s_states = {"state1", "state2"} | ||
f_states = {"state3", "state4"} |
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.
minor nit: But I don't love single character variable names (or even components of a variable name with single characters). I think it's much cleaner an readable to have success_states
and failure_states
and it's really not thaaat much longer.
assert sensor.ext_env_name == SENSOR_KWARGS["external_env_name"] | ||
assert sensor.ext_dag_id == SENSOR_KWARGS["external_dag_id"] | ||
assert sensor.ext_dag_run_id == SENSOR_KWARGS["external_dag_run_id"] | ||
assert set(sensor.success_states) == set(s_states) |
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.
nit: Does the left side need the coercion to set
? Don't you already do that inside the sensor init? And the s_states is already a set too?
with pytest.raises(AirflowException): | ||
MwaaDagRunSensor( | ||
**SENSOR_KWARGS, success_states={"state1", "state2"}, failure_states={"state2", "state3"} |
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.
nit: This feels like a sad case tacked onto the end of a happy path unit test. Maybe split it out into it's own?
Includes the doc page, unit tests and system test
Support for deferrable mode will be added soon (in another PR)
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.