Skip to content

Add support for oracle-se2-cdb type DBs#1550

Open
PasanT9 wants to merge 1 commit into
wso2:masterfrom
PasanT9:470-0
Open

Add support for oracle-se2-cdb type DBs#1550
PasanT9 wants to merge 1 commit into
wso2:masterfrom
PasanT9:470-0

Conversation

@PasanT9
Copy link
Copy Markdown
Contributor

@PasanT9 PasanT9 commented May 13, 2026

Purpose

$subject

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

📝 Walkthrough

Overview

This pull request adds support for the oracle-se2-cdb database type by introducing a new Oracle configuration entry in the infrastructure setup.

Changes

  • File Modified: jobs/intg-test-resources/infra.json
  • Change Type: Configuration addition

A new Oracle database configuration entry named oracle-se2-cdb has been added to the JDBC configuration. This entry includes:

  • The same JDBC driver artifact (ojdbc8) and driver class (oracle.jdbc.OracleDriver) as the existing oracle-se2 configuration
  • Dedicated connection URLs for WSO2AM_COMMON_DB and WSO2AM_APIMGT_DB
  • A SQL validation query to verify database connectivity

The new entry is positioned immediately after the existing oracle-se2 configuration block.

Lines Changed: +21/-1

Walkthrough

This pull request adds a new Oracle SE2 Container Database (CDB) JDBC configuration entry to the integration test infrastructure. The new oracle-se2-cdb configuration is inserted into the jdbc section of the infrastructure configuration file, providing separate connection URLs for the WSO2AM_COMMON_DB and WSO2AM_APIMGT_DB databases. The configuration uses the same OracleDriver and ojdbc8 artifact as the existing oracle-se2 entry, with a SQL validation query for health checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is substantially incomplete. It contains only a purpose placeholder ('$subject') and lacks all required sections including goals, approach, automation tests, security checks, and test environment details. Complete the pull request description by filling in all required sections from the template, particularly goals, approach, automation tests, security checks, and test environment information.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for a new oracle-se2-cdb database type configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
jobs/intg-test-resources/infra.json (1)

124-135: ⚡ Quick win

Fix 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-se2 pattern 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5785d1f and 272081c.

📒 Files selected for processing (1)
  • jobs/intg-test-resources/infra.json

Comment on lines +119 to +138
{
"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"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 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:


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.

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