Skip to content

Configure ORA_TZFILE to match Oracle 11g server in CI#2514

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:configure-ora-tzfile-for-11g-ci
Apr 11, 2026
Merged

Configure ORA_TZFILE to match Oracle 11g server in CI#2514
yahonda merged 1 commit into
rsim:masterfrom
yahonda:configure-ora-tzfile-for-11g-ci

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented Apr 11, 2026

Summary

  • Both 11g CI workflows (test_11g.yml, test_11g_ojdbc11.yml) used DATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCH=true to mask ORA-01805 errors caused by Oracle 11g XE shipping DSTv14 while Instant Client 21.15 embeds v35. Adopt the approach from Bump Oracle to Free 23 and Instant Client to 23.26.1.0.0 ruby-plsql#239: copy the v14 data files out of the running gvenzl/oracle-xe:11 container into the Instant Client's oracore/zoneinfo directory and point the client at them with ORA_TZFILE. ORA_TZFILE is set to just the basename (timezlrg_14.dat) so Instant Client resolves it relative to $ORACLE_HOME/oracore/zoneinfo/; the absolute-path form produces ORA-01804 in sqlplus. This lets the timestamp-with-timezone specs run against 11g instead of being skipped.
  • Drop DATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCH from both 11g workflows and remove the corresponding skip in spec/active_record/oracle_enhanced/type/timestamp_spec.rb. Also remove the stale ORACLE_HOME == "/usr/lib/oracle/21/client64" fallback there — current workflows use /opt/oracle/instantclient_21_15, so it never matched.
  • Rewire the two JDBC network-encryption skips in connection_spec.rb onto DATABASE_VERSION == "11.2.0.2", which is the honest condition — 11g XE genuinely lacks native network encryption regardless of client version.

Test plan

  • test_11g workflow: new Configure ORA_TZFILE to match Oracle 11g server step succeeds and the timestamp-with-timezone examples run (previously skipped) without ORA-01805.
  • test_11g_ojdbc11 workflow: same as above.
  • The two JDBC network-encryption examples in connection_spec.rb remain skipped in the 11g jobs with reason "Oracle 11g XE does not support native network encryption".
  • test.yml (Oracle 23c) is unaffected — it never set the removed env var and does not touch ORA_TZFILE.

🤖 Generated with Claude Code

@yahonda yahonda force-pushed the configure-ora-tzfile-for-11g-ci branch 3 times, most recently from 8178125 to 35ebb70 Compare April 11, 2026 07:08
@yahonda yahonda requested a review from Copilot April 11, 2026 07:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Oracle 11g CI workflows to resolve ORA-01805 (timezone file mismatch) by aligning the Instant Client timezone data with the 11g XE server, and adjusts specs to stop masking the underlying issue via version-mismatch skips.

Changes:

  • Add CI steps in both 11g workflows to copy Oracle 11g timezone files from the DB container into the Instant Client and set ORA_TZFILE.
  • Remove DATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCH from workflows and eliminate the corresponding skip in the timestamp-with-timezone spec.
  • Re-scope JDBC network-encryption skips to trigger based on DATABASE_VERSION == "11.2.0.2".

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
spec/active_record/oracle_enhanced/type/timestamp_spec.rb Removes CI-only skips so timestamp-with-timezone specs run on 11g again.
spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb Adjusts JDBC encryption skips to depend on DB version (11g XE).
.github/workflows/test_11g.yml Adds ORA_TZFILE configuration and removes the old mismatch env flag.
.github/workflows/test_11g_ojdbc11.yml Same as test_11g.yml, for the ojdbc11 JRuby workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test_11g.yml Outdated
Comment thread .github/workflows/test_11g.yml Outdated
Comment thread .github/workflows/test_11g_ojdbc11.yml Outdated
Comment thread .github/workflows/test_11g_ojdbc11.yml Outdated
@yahonda yahonda force-pushed the configure-ora-tzfile-for-11g-ci branch from 35ebb70 to 8171a31 Compare April 11, 2026 07:14
Both 11g workflows (test_11g.yml, test_11g_ojdbc11.yml) set
DATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCH=true to skip tests that
failed because Oracle 11g XE ships timezone file DSTv14 while Instant
Client 21.15 embeds v35, producing ORA-01805 on DATE/TIMESTAMP fetches.
The same flag was later reused to skip two JDBC network-encryption
tests in connection_spec.rb because 11g XE lacks native network
encryption -- an unrelated limitation.

Adopt the approach from rsim/ruby-plsql#239: copy the v14 timezone
data files out of the running gvenzl/oracle-xe:11 container into the
Instant Client's oracore/zoneinfo directory and point the client at
them via ORA_TZFILE. Set ORA_TZFILE to the basename (timezlrg_14.dat)
so Oracle Instant Client resolves it relative to
ORACLE_HOME/oracore/zoneinfo/; the absolute-path form produces
ORA-01804 in sqlplus. With that in place the ORA-01805 error
disappears and the opaque DATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCH
flag can be removed everywhere.

The two network-encryption skips are rewired onto DATABASE_VERSION ==
'11.2.0.2', which is the honest condition -- the limitation is a
property of the 11g server, not of any server/client version mismatch.
Also drop the stale ORACLE_HOME == '/usr/lib/oracle/21/client64'
fallback in timestamp_spec.rb; current workflows use
/opt/oracle/instantclient_21_15, so it never matched.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@yahonda yahonda force-pushed the configure-ora-tzfile-for-11g-ci branch from 8171a31 to 17e5b01 Compare April 11, 2026 07:16
@yahonda yahonda requested a review from Copilot April 11, 2026 07:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yahonda yahonda merged commit 0498beb into rsim:master Apr 11, 2026
19 checks passed
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Apr 11, 2026
…g-ci

Configure ORA_TZFILE to match Oracle 11g server in CI
@yahonda
Copy link
Copy Markdown
Collaborator Author

yahonda commented Apr 11, 2026

Backport to release81 branch 0877c09

@yahonda yahonda deleted the configure-ora-tzfile-for-11g-ci branch April 14, 2026 02:42
@yahonda yahonda mentioned this pull request Apr 14, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants