Repository navigation
Conversation
The example_dms system test intermittently fails in await_task_start because DMS stops the replication task a few seconds after starting it, before it reaches the running state. The StopReason added to the sensor failure message in apache#75240 only said "Stop Reason NORMAL", with no failure message, so the DMS API does not explain the stop. The DMS task logs are the next place to look. Copying the task logs into the Airflow task log puts them next to the rest of the system test output, and deleting the log group afterwards keeps the hourly runs from leaving one behind each time.
ramitkataria
marked this pull request as ready for review
November 3, 2026 02:39
o-nikolas
approved these changes
Nov 3, 2026
o-nikolas
enabled auto-merge (squash)
November 3, 2026 05:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
example_dmssystem test intermittently fails inawait_task_start: DMS stops the replication task about five seconds after starting it, before it reachesrunning, and nothing in the Dag asked it to stop. #75240 addedStopReasonandLastFailureMessageto the sensor's failure message, but the latest failure reported onlyStop Reason NORMALwith no failure message, so the DMS API does not tell us why. The DMS task logs are the next diagnostic step.This enables CloudWatch logging on the replication task.
TASK_MANAGER(task lifecycle, including stops) andSOURCE_CAPTURE(CDC startup on the Postgres source) log atLOGGER_SEVERITY_DEBUG; the other components keep the DMS default. The settings are merged intocreate_task_kwargsafter thehowto_operator_dms_create_tasksnippet, the same way this file already setspoke_intervalandtrigger_ruleoutside their snippets, so the rendered docs do not change.DMS writes the logs to a
dms-tasks-<replication instance identifier>log group. Each run creates its own replication instance, so without cleanup the hourly test would leave one log group behind per run. A new teardown task, which runs after the replication instance is deleted so DMS has finished shipping the logs, prints the task log events into its Airflow task log and then deletes the log group. I chose this over only deleting the log group because the evidence then lands in the system test logs we already keep for every run, and passing runs give a baseline to compare a failing run against. The cost is one short teardown task outside the doc snippets.Running the test now needs
logs:FilterLogEventsandlogs:DeleteLogGroupondms-tasks-*log groups for the test's execution role, plus the standarddms-cloudwatch-logs-rolefor DMS.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.