Skip to content

SnowflakeHook: refactor static connection parameter construction#68597

Merged
potiuk merged 1 commit into
apache:mainfrom
SameerMesiah97:SnowflakeHook-Refactor-Conn-Params-Method
Jun 26, 2026
Merged

SnowflakeHook: refactor static connection parameter construction#68597
potiuk merged 1 commit into
apache:mainfrom
SameerMesiah97:SnowflakeHook-Refactor-Conn-Params-Method

Conversation

@SameerMesiah97

Copy link
Copy Markdown
Contributor

Description

This change refactors static connection parameter construction in SnowflakeHook by extracting configuration-specific logic from _get_static_conn_params() into dedicated helper methods.

Connection parameter assembly has been decomposed into focused helpers responsible for base connection configuration, connector options, workload identity configuration, authentication configuration, and network configuration. _get_static_conn_params() remains the single entrypoint for constructing cached connection parameters while delegating individual configuration domains to dedicated helpers.

Rationale

_get_static_conn_params() had grown to encompass several distinct configuration responsibilities within a single method. Grouping related logic into dedicated helpers reduces method complexity, improves readability, and establishes clearer ownership boundaries for individual configuration paths.

This structure makes future enhancements to authentication, workload identity, networking, and connector-specific configuration easier to implement and review independently.

Backwards Compatibility

This change is a refactor only and does not modify public APIs or runtime behavior. Connection parameter construction and authentication flows remain unchanged.

@boring-cyborg boring-cyborg Bot added area:providers provider:snowflake Issues related to Snowflake provider labels Jun 15, 2026
@SameerMesiah97

Copy link
Copy Markdown
Contributor Author

Please do not review this before PR #68549 is merged (if it is approved of course). These are 2 separate PRs as the thesis is slightly different and it also makes review easier.

into dedicated helpers for connector options, workload identity,
authentication, and network configuration.

This simplifies the control flow, reduces method complexity, and
improves separation of concerns without changing behavior.
@SameerMesiah97
SameerMesiah97 force-pushed the SnowflakeHook-Refactor-Conn-Params-Method branch from 0ba3504 to 28c5c43 Compare June 25, 2026 14:45
@SameerMesiah97
SameerMesiah97 marked this pull request as ready for review June 25, 2026 15:45
@SameerMesiah97
SameerMesiah97 requested a review from potiuk as a code owner June 25, 2026 15:45
@potiuk

potiuk commented Jun 26, 2026

Copy link
Copy Markdown
Member

Nice!

@potiuk
potiuk merged commit 7d2c1a7 into apache:main Jun 26, 2026
156 checks passed
karenbraganz pushed a commit to karenbraganz/airflow that referenced this pull request Jun 30, 2026
…pache#68597)

into dedicated helpers for connector options, workload identity,
authentication, and network configuration.

This simplifies the control flow, reduces method complexity, and
improves separation of concerns without changing behavior.

Co-authored-by: Sameer Mesiah <smesiah971@gmail.com>
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.

2 participants