-
Notifications
You must be signed in to change notification settings - Fork 649
Resolve Database Inconsistency for APP_ATTRIBUTE in Oracle 19c #13063
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
Conversation
📝 Walkthrough""" WalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant C as Caller
participant DAO as ApiMgtDAO.getApplicationAttributes
participant RS as ResultSet
C->>+DAO: Call getApplicationAttributes()
DAO->>+RS: Execute query to retrieve APP_ATTRIBUTE
RS-->>-DAO: Return APP_ATTRIBUTE value
alt APP_ATTRIBUTE is not null
DAO->>DAO: Use the returned value
else APP_ATTRIBUTE is null
DAO->>DAO: Set empty string for APP_ATTRIBUTE
end
DAO-->>-C: Return application attributes map
Assessment against linked issues
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Graph Analysis (1)components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS3Parser.java (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (6)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
pulling latest master updates
Purpose
This PR addresses a JWTTest failure encountered during integration testing when using Oracle 19c as the database. The failure occurs due to a discrepancy in how Oracle 19c handles empty values compared to other databases.
Approach
Issue with Oracle 19c: In Oracle, when an optional attribute has an empty value, the
APP_ATTRIBUTE
column is stored asNULL
. This contrasts with other databases, which return an empty string (""
) when the value is empty.Impact: The difference in handling empty values between Oracle and other databases causes inconsistencies in the returned response, leading to test failures during integration.
Solution:
APP_ATTRIBUTE
value isNULL
. If so, it is set to an empty string (""
).By implementing this change, we can ensure database consistency and eliminate the discrepancies between Oracle and other databases.
Test Cases
Conclusion
This change improves database consistency across different database platforms (Oracle and others), ensuring a stable and predictable response during JWT tests.