Remove false-positive RFC3986 underscore warning from Connection.get_uri()#64345
Merged
potiuk merged 2 commits intoapache:mainfrom Apr 1, 2026
Merged
Conversation
…uri()
`get_uri()` warns about underscores in `conn_type`, but standard Airflow
connection types like `google_cloud_platform` inherently contain underscores.
The warning is not actionable for users since:
1. Standard provider connection types (google_cloud_platform, etc.) are
defined with underscores by the providers themselves
2. `get_uri()` already handles this correctly on the very next line by
converting underscores to dashes: `self.conn_type.lower().replace('_', '-')`
3. Connections stored via Secrets Manager backends trigger this warning
on every connection retrieval during task execution, producing noisy
logs with no remediation path
The underscore-to-dash conversion in the URI output remains intact,
ensuring RFC3986 compliance of the generated URI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
SameerMesiah97
left a comment
There was a problem hiding this comment.
This is a perfectly reasonable change but let's wait for CI to run.
potiuk
approved these changes
Apr 1, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
github-actions bot
pushed a commit
that referenced
this pull request
Apr 1, 2026
…nection.get_uri() (#64345) `get_uri()` warns about underscores in `conn_type`, but standard Airflow connection types like `google_cloud_platform` inherently contain underscores. The warning is not actionable for users since: 1. Standard provider connection types (google_cloud_platform, etc.) are defined with underscores by the providers themselves 2. `get_uri()` already handles this correctly on the very next line by converting underscores to dashes: `self.conn_type.lower().replace('_', '-')` 3. Connections stored via Secrets Manager backends trigger this warning on every connection retrieval during task execution, producing noisy logs with no remediation path The underscore-to-dash conversion in the URI output remains intact, ensuring RFC3986 compliance of the generated URI. (cherry picked from commit b653b4d) Co-authored-by: Michael Black <4128408+MichaelRBlack@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backport successfully created: v3-2-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
github-actions bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Apr 1, 2026
…nection.get_uri() (apache#64345) `get_uri()` warns about underscores in `conn_type`, but standard Airflow connection types like `google_cloud_platform` inherently contain underscores. The warning is not actionable for users since: 1. Standard provider connection types (google_cloud_platform, etc.) are defined with underscores by the providers themselves 2. `get_uri()` already handles this correctly on the very next line by converting underscores to dashes: `self.conn_type.lower().replace('_', '-')` 3. Connections stored via Secrets Manager backends trigger this warning on every connection retrieval during task execution, producing noisy logs with no remediation path The underscore-to-dash conversion in the URI output remains intact, ensuring RFC3986 compliance of the generated URI. (cherry picked from commit b653b4d) Co-authored-by: Michael Black <4128408+MichaelRBlack@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Apr 3, 2026
…uri() (apache#64345) `get_uri()` warns about underscores in `conn_type`, but standard Airflow connection types like `google_cloud_platform` inherently contain underscores. The warning is not actionable for users since: 1. Standard provider connection types (google_cloud_platform, etc.) are defined with underscores by the providers themselves 2. `get_uri()` already handles this correctly on the very next line by converting underscores to dashes: `self.conn_type.lower().replace('_', '-')` 3. Connections stored via Secrets Manager backends trigger this warning on every connection retrieval during task execution, producing noisy logs with no remediation path The underscore-to-dash conversion in the URI output remains intact, ensuring RFC3986 compliance of the generated URI. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Connection schemes (type: %s) shall not contain '_' according to RFC3986warning fromConnection.get_uri()in the Task SDKMotivation
Standard Airflow connection types like
google_cloud_platform,ssh_tunnel, and others inherently contain underscores as defined by their respective providers. The current warning fires on everyget_uri()call for these standard types, producing noisy logs that users cannot resolve since:conn_typevalues are defined by providers, not by usersget_uri()already correctly handles this by converting underscores to dashes on the next line:self.conn_type.lower().replace('_', '-')The underscore-to-dash conversion in the URI output remains intact, ensuring the generated URI is RFC3986 compliant.
Test plan
test_get_uritest continues to pass (usesmysqltype, no underscores)google_cloud_platform) no longer produce spurious warningsget_uri()still produces valid RFC3986 URIs with dashes in the scheme🤖 Generated with Claude Code