-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: Update MWAATriggerDagsStage to pass json event to MWAA airflow dag #430
feat: Update MWAATriggerDagsStage to pass json event to MWAA airflow dag #430
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Looks Good, i think this would be useful in all the cases where the dags needs the input from sfn event for processing. @malachi-constant would this need any test coverage?
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.
In the case of an empty event is dags trigger DAG_ID --conf {}
valid?
Yes, in case of an empty event, dags trigger DAG_ID --conf {} is valid. To test this, i created a sample dag the prints out the conf. (logger.info(context['dag_run'].conf)) Scenario 1: In case of a dynamic dag ids passed through dag_path, the event body is not expected to be empty as the sfn event has the dag_ids list. The test dag completed execution and printed the dag_ids list in the logs. Scenario 2: To test a static dag id, i triggered the dag from the mwaa ui using the "Trigger DAG w/ Config" option. The configuration JSON (conf) was set to {}. The dag completed execution and printed {} |
Description
Currently, MWAATriggerDagStage does not pass the sfn event to the MWAA dag. This enhancement enables to pass runtime parameters/sfn event when triggering dag. The parameters can be accessed from the dag_run.conf.
Changes Made
Changes made to MWAATriggerDagStage:
Related Issue
#428