fix(providers/oracle): use conn.schema as service_name fallback in OracleHook#62895
Merged
potiuk merged 3 commits intoapache:mainfrom Mar 9, 2026
Merged
fix(providers/oracle): use conn.schema as service_name fallback in OracleHook#62895potiuk merged 3 commits intoapache:mainfrom
potiuk merged 3 commits intoapache:mainfrom
Conversation
Contributor
|
Static check failure due to unrelated failures for which fix #62897 is already in place by @potiuk You can trigger CI from your end @YoannAbriel, or wait until it is retriggered from maintainers. |
be511b3 to
a358a74
Compare
…acleHook When creating an Oracle connection via the UI with Host, Port, and Schema fields filled but without explicitly setting service_name in extras, get_conn() built the DSN without a service name, causing TNS errors. Now conn.schema is used as the service_name when neither service_name nor sid is set in connection extras. Fixes apache#62526
…racle client dependency
a358a74 to
2c806be
Compare
potiuk
approved these changes
Mar 9, 2026
jason810496
pushed a commit
to jason810496/airflow
that referenced
this pull request
Mar 10, 2026
…acleHook (apache#62895) * fix(providers/oracle): use conn.schema as service_name fallback in OracleHook When creating an Oracle connection via the UI with Host, Port, and Schema fields filled but without explicitly setting service_name in extras, get_conn() built the DSN without a service name, causing TNS errors. Now conn.schema is used as the service_name when neither service_name nor sid is set in connection extras. Fixes apache#62526 * ci: retrigger CI (unrelated static check failures) * fix: remove thick_mode from schema_as_service_name test to avoid CI Oracle client dependency
81 tasks
thejoeejoee
pushed a commit
to thejoeejoee/airflow
that referenced
this pull request
Mar 10, 2026
…acleHook (apache#62895) * fix(providers/oracle): use conn.schema as service_name fallback in OracleHook When creating an Oracle connection via the UI with Host, Port, and Schema fields filled but without explicitly setting service_name in extras, get_conn() built the DSN without a service name, causing TNS errors. Now conn.schema is used as the service_name when neither service_name nor sid is set in connection extras. Fixes apache#62526 * ci: retrigger CI (unrelated static check failures) * fix: remove thick_mode from schema_as_service_name test to avoid CI Oracle client dependency
dominikhei
pushed a commit
to dominikhei/airflow
that referenced
this pull request
Mar 11, 2026
…acleHook (apache#62895) * fix(providers/oracle): use conn.schema as service_name fallback in OracleHook When creating an Oracle connection via the UI with Host, Port, and Schema fields filled but without explicitly setting service_name in extras, get_conn() built the DSN without a service name, causing TNS errors. Now conn.schema is used as the service_name when neither service_name nor sid is set in connection extras. Fixes apache#62526 * ci: retrigger CI (unrelated static check failures) * fix: remove thick_mode from schema_as_service_name test to avoid CI Oracle client dependency
Pyasma
pushed a commit
to Pyasma/airflow
that referenced
this pull request
Mar 13, 2026
…acleHook (apache#62895) * fix(providers/oracle): use conn.schema as service_name fallback in OracleHook When creating an Oracle connection via the UI with Host, Port, and Schema fields filled but without explicitly setting service_name in extras, get_conn() built the DSN without a service name, causing TNS errors. Now conn.schema is used as the service_name when neither service_name nor sid is set in connection extras. Fixes apache#62526 * ci: retrigger CI (unrelated static check failures) * fix: remove thick_mode from schema_as_service_name test to avoid CI Oracle client dependency
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.
OracleHook.get_conn()ignoresconn.schemawhen building the DSN. When users fill Host, Port, and Schema in the connection UI without settingservice_namein extras, the DSN is constructed without any service name — causingORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA.The Schema field in the UI maps to
conn.schema, which for Oracle is typically the service name. This fix falls back toconn.schemaasservice_namewhen neitherservice_namenorsidis explicitly set in extras. Explicit extras still take precedence.Added three tests covering: schema-as-service-name fallback, service_name precedence over schema, and sid precedence over schema.
Closes: #62526
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.