Skip to content

Remove redundant _set_context in SnowflakeSqlApiTrigger - #71659

Merged
potiuk merged 1 commit into
apache:mainfrom
justinpakzad:fix/remove-stale-set-context-snowflake-trigger
Aug 29, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
justinpakzad:fix/remove-stale-set-context-snowflake-trigger

Conversation

@justinpakzad

Copy link
Copy Markdown
Contributor

This PR removes the redundant _set_context in the SnowflakeSqlApiTrigger. The BaseTrigger._set_context is already a no-op pass, so there is no need for it in this trigger.

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

  • 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.

@justinpakzad
justinpakzad requested a review from potiuk as a code owner August 15, 2026 20:42
@boring-cyborg boring-cyborg Bot added area:providers provider:snowflake Issues related to Snowflake provider labels Aug 15, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified this is genuinely redundant rather than a load-bearing no-op: BaseTrigger._set_context is itself pass ("Part of LoggingMixin and used mainly for configuration of task logging; not used for triggers"), so the override duplicates its own base exactly and removal changes nothing.

Also checked the fallback on older cores — both LoggingMixin._set_context implementations are no-ops too, so there is no Airflow version where dropping this override starts doing something — and that SnowflakeSqlApiTrigger was the last trigger in the tree still carrying it, so it now matches the rest.

Nit: the PR description is just the unfilled template. A one-liner saying "BaseTrigger already defines _set_context as a no-op, so this override is redundant" would have saved a reviewer the trip through LoggingMixin — and it becomes the commit body on merge.


This review was drafted by an AI-assisted tool and
confirmed by an Apache Airflow maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Airflow handles maintainer review:
contributing-docs/05_pull_requests.rst.

@justinpakzad

Copy link
Copy Markdown
Contributor Author

Nit: the PR description is just the unfilled template. A one-liner saying "BaseTrigger already defines _set_context as a no-op, so this override is redundant" would have saved a reviewer the trip through LoggingMixin — and it becomes the commit body on merge.

Thanks for the review. I think your agent missed the PR description I wrote. I mentioned the following: "The BaseTrigger._set_context is already a no-op pass, so there is no need for it in this trigger".

@justinpakzad
justinpakzad force-pushed the fix/remove-stale-set-context-snowflake-trigger branch from 9b015a8 to 3c134be Compare August 29, 2026 14:05
@eladkal
eladkal requested a review from potiuk August 29, 2026 14:10
@potiuk
potiuk merged commit 618d648 into apache:main Aug 29, 2026
83 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:snowflake Issues related to Snowflake provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants