Add aiohttp trust_env config for Snowflake async hook#67906
Open
Codingaditya17 wants to merge 1 commit into
Open
Add aiohttp trust_env config for Snowflake async hook#67906Codingaditya17 wants to merge 1 commit into
Codingaditya17 wants to merge 1 commit into
Conversation
2 tasks
471c644 to
47ace8e
Compare
47ace8e to
3d2c6de
Compare
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.
Closes: #67893
Approach
This PR keeps the change focused on the Snowflake SQL API async path, which is one of the affected deferrable operator paths mentioned in the issue.
The change adds a new
[aiohttp] trust_envAirflow config option with a default value offalse. The Snowflake SQL API hook reads this config and includes it in the defaultaiohttp_session_kwargsused when creatingaiohttp.ClientSession.Explicitly provided
aiohttp_session_kwargsstill take precedence, so users can override the global config at the hook level when needed.This PR also passes
aiohttp_session_kwargsthroughSnowflakeSqlApiTriggerserialization. Without this, the operator could create the hook with async session options, but the deferrable triggerer path would lose those options when recreating the hook during polling.What changed
[aiohttp] trust_envconfig support.trust_envvalue inSnowflakeSqlApiHook.aiohttp_session_kwargsfromSnowflakeSqlApiOperatorintoSnowflakeSqlApiTrigger.aiohttp_session_kwargsin the trigger so the triggerer preserves async session options.trust_env, trigger serialization, trigger hook creation, and operator deferral.Tested