aws / amazon-mwaa-docker-images

Apache License 2.0
24 stars 11 forks source link

Adding signal processing to the task monitor condition #137

Closed ashishgo-aws closed 1 week ago

ashishgo-aws commented 3 weeks ago

Description of changes:

The task monitor needs to process the following 4 MWAA signals for the graceful update project:

  1. Termination signal: Graceful termination of the workers when the environment is going through a graceful update
  2. Resume signal: Reverting the state of graceful termination and resume work when the environment is going through a rollback after attempting a graceful update
  3. Kill signal: Shutting down the worker without waiting for the current Airflow tasks to finish when the environment is going through a forced update
  4. Activation signal: Starting consumption of work from the queue after termination protection has enabled on the corresponding Fargate task

The processing is gated behind certain environment variables which are either absent or marked as false for an environment which does not have graceful updates enabled.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.