Configure ORA_TZFILE to match Oracle 11g server in CI#2514
Merged
Conversation
8178125 to
35ebb70
Compare
Contributor
There was a problem hiding this comment.
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_MATCHfrom 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.
35ebb70 to
8171a31
Compare
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>
8171a31 to
17e5b01
Compare
Contributor
There was a problem hiding this comment.
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
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
Collaborator
Author
|
Backport to release81 branch 0877c09 |
3 tasks
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
test_11g.yml,test_11g_ojdbc11.yml) usedDATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCH=trueto 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 runninggvenzl/oracle-xe:11container into the Instant Client'soracore/zoneinfodirectory and point the client at them withORA_TZFILE.ORA_TZFILEis set to just the basename (timezlrg_14.dat) so Instant Client resolves it relative to$ORACLE_HOME/oracore/zoneinfo/; the absolute-path form producesORA-01804in sqlplus. This lets the timestamp-with-timezone specs run against 11g instead of being skipped.DATABASE_SERVER_AND_CLIENT_VERSION_DO_NOT_MATCHfrom both 11g workflows and remove the corresponding skip inspec/active_record/oracle_enhanced/type/timestamp_spec.rb. Also remove the staleORACLE_HOME == "/usr/lib/oracle/21/client64"fallback there — current workflows use/opt/oracle/instantclient_21_15, so it never matched.connection_spec.rbontoDATABASE_VERSION == "11.2.0.2", which is the honest condition — 11g XE genuinely lacks native network encryption regardless of client version.Test plan
test_11gworkflow: newConfigure ORA_TZFILE to match Oracle 11g serverstep succeeds and the timestamp-with-timezone examples run (previously skipped) without ORA-01805.test_11g_ojdbc11workflow: same as above.connection_spec.rbremain 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 touchORA_TZFILE.🤖 Generated with Claude Code