-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run CI with GitHub Actions to support Oracle database 18c #198
Conversation
|
The remaining failure.
|
I've got reason why it fails against Oracle database 18c. This spec simulates the connection as if it connects to Oracle database 9.2. ruby-plsql/spec/plsql/procedure_spec.rb Lines 1512 to 1514 in 4c33681
Then ruby-plsql/lib/plsql/procedure.rb Lines 85 to 91 in 4c33681
Both I'm going to skip this test if the database version is higher than 18c.
|
f20d343
to
a795ef2
Compare
- Run Oracle Database 18c - Only CRuby versions executed since due to rsim#176 - No Active Record matrix added yet
dbms_lock.sleep is also supported which requires explicit grant statement executed like 'grant execute on sys.dbms_lock to hr'. dbms_session.sleep can be executed without additional grant statement, which is convenient for CI environments. Refer https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SESSION.html#GUID-27CCC2F7-6564-41D2-8C42-CFFBF25A69B5 https://oracle-base.com/articles/18c/dbms_session-sleep-18c
Without this skip, this spec will fail as follows. ``` Failures: 1) Parameter type mapping / Function with table indexed by bynary integer parameter using Oracle 9.2 should create temporary tables when using Oracle 9.2 Failure/Error: case element_metadata[:data_type] NoMethodError: undefined method `[]' for nil:NilClass # ./lib/plsql/procedure.rb:314:in `block in ensure_tmp_tables_created' # ./lib/plsql/procedure.rb:311:in `each' # ./lib/plsql/procedure.rb:311:in `ensure_tmp_tables_created' # ./lib/plsql/procedure_call.rb:15:in `initialize' # ./lib/plsql/procedure.rb:545:in `new' # ./lib/plsql/procedure.rb:545:in `exec' # ./lib/plsql/package.rb:67:in `method_missing' # ./spec/plsql/procedure_spec.rb:1522:in `block (4 levels) in <top (required)>' Finished in 44.29 seconds (files took 0.56531 seconds to load) 453 examples, 1 failure, 3 pending Failed examples: rspec ./spec/plsql/procedure_spec.rb:1521 # Parameter type mapping / Function with table indexed by bynary integer parameter using Oracle 9.2 should create temporary tables when using Oracle 9.2 ``` Here is the reason why: This spec simulates the connection as if it connects to Oracle database 9.2. https://github.com/rsim/ruby-plsql/blob/4c336819759d08c076eb0c351620f21eb5225161/spec/plsql/procedure_spec.rb#L1512-L1514 ```ruby # simulate Oracle 9.2 connection plsql(:oracle_9).connection = get_connection allow(plsql(:oracle_9).connection).to receive(:database_version).and_return([9, 2, 0, 0]) ``` Then `get_argument_metadata` executes `get_argument_metadata_below_18c`. https://github.com/rsim/ruby-plsql/blob/4c336819759d08c076eb0c351620f21eb5225161/lib/plsql/procedure.rb#L85-L91 ```ruby def get_argument_metadata #:nodoc: if (@schema.connection.database_version <=> [18, 0, 0, 0]) >= 0 get_argument_metadata_from_18c else get_argument_metadata_below_18c end end ``` Both `get_argument_metadata_from_18c` and `get_argument_metadata_below_18c` methods depend on each Oracle database dictionary implentation then only mocking database version is not enough.
CI failure against Rails main branch is due to rails/rails#42773, at least not relevant to this pull request. |
This pull request runs CI with GitHub Actions.