-
Notifications
You must be signed in to change notification settings - Fork 644
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
Resolve Database Inconsistency for APP_ATTRIBUTE in Oracle 19c #13063
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe 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
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.31.1)components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 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
|
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.