aws / amazon-mwaa-docker-images

Apache License 2.0
24 stars 11 forks source link

Create a process hook for ensuring log groups exist #89

Open rafidka opened 3 months ago

rafidka commented 3 months ago

Overview

Currently, we routinely ensure log groups exist in our log handler. We use a throttling mechanism to avoid excessively calling the CreateLogGroup API. This mechanism doesn't work well with task logs and DAG processing logs, the reason, I suspect, being that running tasks or processing DAGs involve the creation of a separate process, which breaks our throttling mechanism.

Additionally, the reliance on CreateLogGroup even if the log group exists results in a lot of false failures in the customer's CloudTrail event history.

To solve both these problems, I am proposing implementing the mechanism for ensuring log groups exist as a process hook (currently called process conditions, but planning to rename) and attaching it to the main processes of schedulers, workers, and web servers. This way we avoid the challenges that happen in multiprocessing.

Acceptance Criteria

Additional Info

N/A