Skip to content

Revert DMS provision checks to __init__ with is not None polarity - #70634

Merged
potiuk merged 2 commits into
apache:mainfrom
ahilashsasidharan:providers/restore_dms_provision_checks_to_init_and_change_in_place
Aug 1, 2026
Merged

Revert DMS provision checks to __init__ with is not None polarity#70634
potiuk merged 2 commits into
apache:mainfrom
ahilashsasidharan:providers/restore_dms_provision_checks_to_init_and_change_in_place

Conversation

@ahilashsasidharan

Copy link
Copy Markdown
Contributor

Description

This PR moves template_field validation back to __init__ from execute() for the DmsModifyTaskOperator and DmsStartReplicationOperator operators in the providers/amazon/src/airflow/providers/amazon/aws/operators/dms.py file.

The check is updated to use is not None polarity rather than a truthiness check, so this is not a straight revert of the original code.

These are pure provision checks ("was this argument passed?") which belong in __init__ per the updated guidance in #70296, as moving them to execute() risks false positives when render_template_as_native_obj=True renders a provided field to None.

Tests

  • Fixed and updated tests under providers/amazon/tests/unit/amazon/aws/operators/test_dms.py to validate the old behaviour and made tests more consistent when restoring the old checks.

related: #70296 and #70503


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Antigravity IDE & Claude Web] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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.

@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Jul 28, 2026
@potiuk
potiuk merged commit 2874061 into apache:main Aug 1, 2026
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants