Make text2sql service endpoint configurable at runtime.#2067
Merged
xiguiw merged 3 commits intoopea-project:mainfrom Jun 13, 2025
Merged
Make text2sql service endpoint configurable at runtime.#2067xiguiw merged 3 commits intoopea-project:mainfrom
xiguiw merged 3 commits intoopea-project:mainfrom
Conversation
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull Request Overview
Enable runtime configuration of the Text2SQL service endpoint via an APP_TEXT_TO_SQL_URL environment variable so customers can adjust the URL without rebuilding the Docker image.
- Removed static compile-time binding of the Text2SQL URL in Vite config
- Added
env.shentrypoint script to replace placeholders in built assets at container startup - Updated Docker setup (
.env, Dockerfile, docker-compose) to propagate the newAPP_TEXT_TO_SQL_URLvariable
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/react/vite.config.ts | Commented out static define and now passing full process.env |
| ui/react/env.sh | New script loops over APP_ vars and patches built assets |
| ui/react/.env | Changed VITE_TEXT_TO_SQL_URL to placeholder APP_TEXT_TO_SQL_URL |
| ui/docker/Dockerfile.react | Copied env.sh into image and set it as the entrypoint |
| docker_compose/intel/cpu/xeon/compose.yaml | Sets APP_TEXT_TO_SQL_URL using host IP in the service |
Comments suppressed due to low confidence (2)
DBQnA/ui/react/vite.config.ts:28
- Overriding the entire
import.meta.envwithprocess.envmay embed sensitive environment variables in the client bundle. Prefer explicitly defining only the requiredVITE_*keys or use a runtime placeholder replacement instead of compile-time define.
"import.meta.env": process.env,
DBQnA/ui/react/env.sh:5
- The comment references
MY_APP_but the script greps forAPP_. Update the comment to accurately reflect the prefix being used.
for i in $(env | grep APP_) #// Make sure to use the prefix MY_APP_ if you have any other prefix in env.production file variable name replace it with MY_APP_
Signed-off-by: ichbinblau <theresa.shan@intel.com>
xiguiw
reviewed
Jun 12, 2025
ZePan110
approved these changes
Jun 12, 2025
added 2 commits
June 12, 2025 12:30
Signed-off-by: ichbinblau <theresa.shan@intel.com>
xiguiw
approved these changes
Jun 13, 2025
alexsin368
pushed a commit
to alexsin368/GenAIExamples
that referenced
this pull request
Aug 13, 2025
…#2067) Signed-off-by: ichbinblau <theresa.shan@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
cogniware-devops
pushed a commit
to Cogniware-Inc/GenAIExamples
that referenced
this pull request
Dec 19, 2025
…#2067) Signed-off-by: ichbinblau <theresa.shan@intel.com> Signed-off-by: cogniware-devops <ambarish.desai@cogniware.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The PR makes the endpoint to text2sql service configurable as an environment variable
APP_TEXT_TO_SQL_URL, which is inspired by ChatQnA's UI implementation. In that case, customers don't need to re-build the docker image.Issues
1776
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
n/a
Tests
n/a