Add support for oracle-se2-cdb type DBs#1550
Conversation
📝 WalkthroughOverviewThis pull request adds support for the Changes
A new Oracle database configuration entry named
The new entry is positioned immediately after the existing Lines Changed: +21/-1 WalkthroughThis pull request adds a new Oracle SE2 Container Database (CDB) JDBC configuration entry to the integration test infrastructure. The new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
jobs/intg-test-resources/infra.json (1)
124-135: ⚡ Quick winFix indentation to match existing patterns.
The database object properties have inconsistent indentation compared to other JDBC entries in the file. Align the indentation with the existing
oracle-se2pattern for consistency.📝 Proposed fix for indentation consistency
"database": [ { - "name": "WSO2AM_COMMON_DB", - "url": "jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB", - "username": "WSO2AM_COMMON_DB", - "password": "DB_PASSWORD" + "name": "WSO2AM_COMMON_DB", + "url": "jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB", + "username": "WSO2AM_COMMON_DB", + "password": "DB_PASSWORD" }, { - "name": "WSO2AM_APIMGT_DB", - "url": "jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB", - "username": "WSO2AM_APIMGT_DB", - "password": "DB_PASSWORD" + "name": "WSO2AM_APIMGT_DB", + "url": "jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB", + "username": "WSO2AM_APIMGT_DB", + "password": "DB_PASSWORD" } ],🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@jobs/intg-test-resources/infra.json` around lines 124 - 135, The JSON objects for WSO2AM_COMMON_DB and WSO2AM_APIMGT_DB have inconsistent indentation; update the properties ("name", "url", "username", "password") of both objects to align with the existing oracle-se2 JDBC entries (same number of spaces/tabs before each property) so they visually match other entries and maintain the file's indentation pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@jobs/intg-test-resources/infra.json`:
- Around line 119-138: The JDBC URL entries under the oracle-se2-cdb database
objects must use the CDB-compatible service name syntax; update both "url"
values in the database array for the oracle-se2-cdb entry (the objects with
"name": "WSO2AM_COMMON_DB" and "name": "WSO2AM_APIMGT_DB") by changing the JDBC
URL from "jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB" to the CDB form
"jdbc:oracle:thin:`@//DB_HOST`:1521/WSO2AMDB" (i.e., add the missing "//" after
the "@") so connections use the service-name syntax required for CDB/PDB.
---
Nitpick comments:
In `@jobs/intg-test-resources/infra.json`:
- Around line 124-135: The JSON objects for WSO2AM_COMMON_DB and
WSO2AM_APIMGT_DB have inconsistent indentation; update the properties ("name",
"url", "username", "password") of both objects to align with the existing
oracle-se2 JDBC entries (same number of spaces/tabs before each property) so
they visually match other entries and maintain the file's indentation pattern.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6506ad53-db75-4117-8b4b-a73ada5abe85
📒 Files selected for processing (1)
jobs/intg-test-resources/infra.json
| { | ||
| "name": "oracle-se2-cdb", | ||
| "file_name": "ojdbc8", | ||
| "driver": "oracle.jdbc.OracleDriver", | ||
| "database": [ | ||
| { | ||
| "name": "WSO2AM_COMMON_DB", | ||
| "url": "jdbc:oracle:thin:@DB_HOST:1521/WSO2AMDB", | ||
| "username": "WSO2AM_COMMON_DB", | ||
| "password": "DB_PASSWORD" | ||
| }, | ||
| { | ||
| "name": "WSO2AM_APIMGT_DB", | ||
| "url": "jdbc:oracle:thin:@DB_HOST:1521/WSO2AMDB", | ||
| "username": "WSO2AM_APIMGT_DB", | ||
| "password": "DB_PASSWORD" | ||
| } | ||
| ], | ||
| "validation_query": "SELECT 1 FROM DUAL" | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What are the JDBC URL format differences between Oracle Container Database (CDB) and non-CDB for oracle-se2 engine type?
💡 Result:
For Oracle JDBC (oracle-se2 engine type), the JDBC URL format differences between CDB and non-CDB are primarily in the identifier used after the host:port part: service name (/) for CDB/PDB access versus SID (:) for non-CDB. CDB (Container Database, multitenant): - Connect to PDBs or CDB services using service name format: jdbc:oracle:thin:@//host:port/service_name [1][2][3] - Example for PDB: jdbc:oracle:thin:@localhost:1521/ORCLPDB1 [3] - Service names are required for PDB access in CDB; SID-style often fails with TNS errors [3] non-CDB (traditional single database): - Connect using SID format: jdbc:oracle:thin:@host:port:SID [4][5][6] - Example: jdbc:oracle:thin:@localhost:1521:orcl The oracle-se2 engine supports multitenant (CDB with up to 3 PDBs) [7][8], but JDBC syntax is identical to other editions; difference is listener registration (services for CDB/PDB) [9][10]. Use TNS DESCRIPTION=(... (SERVICE_NAME=...)) for explicit control in both [1][11]. In Amazon RDS oracle-se2-cdb, connect to PDB using SID=pdb_name in full descriptor or service [12].
Citations:
- 1: https://docs.oracle.com/en/database/oracle/oracle-database/26/jajdb/oracle/jdbc/OracleDriver.html
- 2: https://stackoverflow.com/questions/4832056/how-to-connect-to-oracle-using-service-name-instead-of-sid
- 3: https://stackoverflow.com/questions/67126710/oracle-container-database-12c-connecting-using-jdbc
- 4: https://www.baeldung.com/java-jdbc-url-format
- 5: https://stackoverflow.com/questions/1054105/url-string-format-for-connecting-to-oracle-database-with-jdbc
- 6: https://docs.oracle.com/cd/E12518_01/central_office/pdf/141/html/co_ig/Output/appendix_url.htm
- 7: https://www.oracle.com/database/technologies/standard-edition-2-faq.html
- 8: https://redresscompliance.com/oracle-se2-vs-enterprise-edition-licensing-guide.html
- 9: https://docs.oracle.com/en/database/oracle/oracle-database/26/netag/connecting-database-service.html
- 10: https://docs.oracle.com/en/database/oracle/oracle-database/21/cncpt/CDBs-and-PDBs.html
- 11: https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/configuring-thin-jdbc-client-network.html
- 12: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-cdb.configuring.html
Update the JDBC URL format for oracle-se2-cdb to use the CDB-compatible service name syntax.
The oracle-se2-cdb configuration requires the service name format for CDB (Container Database) connections. Update the database URLs from jdbc:oracle:thin:@DB_HOST:1521/WSO2AMDB to jdbc:oracle:thin:@//DB_HOST:1521/WSO2AMDB (note the // after @). CDB and PDB connections require this format; without it, connections will fail.
Current configuration
"url": "jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@jobs/intg-test-resources/infra.json` around lines 119 - 138, The JDBC URL
entries under the oracle-se2-cdb database objects must use the CDB-compatible
service name syntax; update both "url" values in the database array for the
oracle-se2-cdb entry (the objects with "name": "WSO2AM_COMMON_DB" and "name":
"WSO2AM_APIMGT_DB") by changing the JDBC URL from
"jdbc:oracle:thin:`@DB_HOST`:1521/WSO2AMDB" to the CDB form
"jdbc:oracle:thin:`@//DB_HOST`:1521/WSO2AMDB" (i.e., add the missing "//" after
the "@") so connections use the service-name syntax required for CDB/PDB.
Purpose
$subject