fix(oracle): add project_id to conversation_items and resolve PR #576 feedback - #591
Conversation
…ION_ITEMS table Signed-off-by: Keyang Ru <rukeyang@gmail.com>
…ckend configuration logic - Changed the schema config path to be dynamically resolved in gateway.py. - Refactored the backend configuration logic in main.rs to use a match statement for better readability. - Updated the ci_agentic_svc_deps.sh script to streamline environment variable exports. Signed-off-by: Keyang Ru <rukeyang@gmail.com>
📝 WalkthroughWalkthroughThis PR consolidates and improves code organization across multiple components: dynamic path resolution for Oracle Flyway schema configuration, refactored configuration building in the Rust gateway service via match consolidation, streamlined CI environment variable operations, and a new database column with index for project ID tracking in conversations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
1 similar comment
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/ci_agentic_svc_deps.sh`:
- Around line 211-215: In cmd_create_oracle_user, replace the three separate
echo lines that each redirect to "$GITHUB_ENV" with a single grouped block
(braced { ... } >> "$GITHUB_ENV") so all ATP_FLYWAY_USER, ATP_FLYWAY_PASSWORD
and ATP_FLYWAY_DSN are written with one redirection; locate the echo calls
inside the cmd_create_oracle_user function and convert them to the grouped form
to match the pattern used elsewhere and avoid repeated file opens.
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
e2e_test/infra/gateway.pymodel_gateway/src/main.rsscripts/ci_agentic_svc_deps.shscripts/oracle_flyway/sql/V2__Create_v2_conversations_and_alter_responses.sql
Description
Problem
The Flyway-managed
CONVERSATION_ITEMStable lacks aGENERATIVE_AI_PROJECT_IDcolumn needed for access control(thanks @zhaowenzi for pointing it) , and several review comments from PR #576 were acknowledged but not committed.Solution
Add the
GENERATIVE_AI_PROJECT_IDcolumn (with index) to theCONVERSATION_ITEMSDDL, and apply the three outstanding review fixes from #576.Changes
scripts/oracle_flyway/sql/V2__Create_v2_conversations_and_alter_responses.sql: AddGENERATIVE_AI_PROJECT_ID VARCHAR2(255)column andIDX_CONV_ITEMS_PROJECT_IDindex toCONVERSATION_ITEMStable for access controlmodel_gateway/src/main.rs: Refactor history backend config construction into a singlematchto avoid unnecessaryschema.clone()calls (test(oracle): add E2E tests for Flyway-managed Oracle schema #576 review)e2e_test/infra/gateway.py: Use absolute path viaPath(__file__).resolve().parents[2]for schema-config to avoid CWD-dependent test failures (test(oracle): add E2E tests for Flyway-managed Oracle schema #576 review)scripts/ci_agentic_svc_deps.sh: GroupGITHUB_ENVredirects into a single block per Shellcheck SC2129 (test(oracle): add E2E tests for Flyway-managed Oracle schema #576 review)Summary by CodeRabbit
Database Schema
Infrastructure Improvements