Skip to content

Fail the Teradata compute cluster trigger on an unknown operation - #72696

Merged
kaxil merged 3 commits into
apache:mainfrom
rjgoyln:fix/teradata-cc-trigger-unreachable-timeout
Sep 9, 2026
Merged

kaxil merged 3 commits into
apache:mainfrom
rjgoyln:fix/teradata-cc-trigger-unreachable-timeout

Conversation

@rjgoyln

@rjgoyln rjgoyln commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The polling loop only exits once the compute profile reaches the status the operation waits for. An operation type the trigger does not recognise never reaches one, so the trigger polls indefinitely instead of reporting the bad input. No shipped operator passes such a value, so this is hardening rather than a fault reachable from a Dag.

The Invalid operation event meant to cover the case sits after the loop, unreachable, as do the two timeout events beside it — the triggerer's deferral timeout has always superseded those.

  • resolve the expected status before polling and emit Invalid operation there
  • drop the unreachable post-loop branches
  • narrow the missing-profile error to ValueError

The status each operation waits for is unchanged, and every event the trigger can still emit keeps its payload. ValueError never leaves the trigger: the same except Exception turns it into the same error event, and the operator raises on event["message"] without inspecting the type.

Touches the same method as #72695 but different lines; the two merge cleanly in either order.

Tests

test_run_invalid_operation fails against the pre-change trigger, which yields the missing-profile error instead. The two test_run_create_success cases pass either way — they cover create operations the existing tests left untested.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5) following the guidelines

The polling loop only exits once the compute profile reaches the status the
operation waits for. An operation type the trigger does not recognise never
leaves it, so the trigger polls on instead of reporting the bad input.

No shipped operator passes such a value, so this is hardening rather than a
fault reachable from a Dag. The "Invalid operation" event meant to cover the
case sat after the loop, unreachable, as did the two timeout events beside it -
the triggerer's own deferral timeout has always superseded those.
@rjgoyln
rjgoyln force-pushed the fix/teradata-cc-trigger-unreachable-timeout branch from 5acb74e to 5bd5756 Compare September 8, 2026 12:21
@rjgoyln
rjgoyln marked this pull request as ready for review September 8, 2026 16:25
The operator surfaces the trigger's error message verbatim as the task's
AirflowException, so a bare "Invalid operation" gave no way to tell which value
was rejected. The docstring is now the only place the accepted values are
written down, and it named a parameter that does not exist while omitting the
two CREATE operations.
@rjgoyln

rjgoyln commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for catching these! Both points are addressed — I updated the docstring to document all supported operations and fixed the invalid-operation message to include the rejected value. The test expectation has been updated accordingly.

@kaxil
kaxil merged commit 5e65f21 into apache:main Sep 9, 2026
83 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
…ache#72696)

* Fail the Teradata compute cluster trigger on an unknown operation

The polling loop only exits once the compute profile reaches the status the
operation waits for. An operation type the trigger does not recognise never
leaves it, so the trigger polls on instead of reporting the bad input.

No shipped operator passes such a value, so this is hardening rather than a
fault reachable from a Dag. The "Invalid operation" event meant to cover the
case sat after the loop, unreachable, as did the two timeout events beside it -
the triggerer's own deferral timeout has always superseded those.

* Name the rejected Teradata operation type and correct its docstring

The operator surfaces the trigger's error message verbatim as the task's
AirflowException, so a bare "Invalid operation" gave no way to tell which value
was rejected. The docstring is now the only place the accepted values are
written down, and it named a parameter that does not exist while omitting the
two CREATE operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants