-
Notifications
You must be signed in to change notification settings - Fork 23
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
Hardcode discovery engine environment variables in search-api-v2 #712
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
# e.g. "projects/search-api-v2-dev/locations/global/collections/default_collection/dataStores/ | ||
# local-my-name/servingConfigs/default_serving_config" | ||
DISCOVERY_ENGINE_SERVING_CONFIG: "${DISCOVERY_ENGINE_SERVING_CONFIG}" | ||
DISCOVERY_ENGINE_DATASTORE_BRANCH: "projects/780375417592/locations/global/collections/default_collection/dataStores/govuk_content/branches/default_branch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come to think of it, it'll look more readable if we use the "pretty" GCP project name (search-api-v2-integration
) instead of the numeric one for both of these 🎁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we can use "projects/search-api-v2-integration/locations/global/collections/default_collection/dataStores/govuk_content/branches/default_branch"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@csutter I've updated to use the pretty name.
We've decided it's easier for the local setup of search-api-v2 to pull in search results from integration whenever search results are needed for local testing rather than making everyone set up their own personal discovery engine on gcloud. Therefore the env var values can be hardcoded rather than being set in the local session.
f1c8917
to
9f46ef2
Compare
We are about to start some work that hooks Search Admin up to Discovery Engine (aka Google Vertex AI Search), so we need to: - Mount the `gcloud` tool config directory into the container (which allows the Google Cloud gem(s) to pick up on locally configured credentials) - Set appropriate environment variables for the engine and serving config that the app should use locally (`integration` as we no longer have a separate dev environment) These changes are analogous to the ones made in #695 and #712 for `search-api-v2`.
We've decided it's easier for the local setup of search-api-v2 to pull in search results from integration whenever search results are needed for local testing rather than making everyone set up their own personal discovery engine on gcloud. Therefore the env var values can be hardcoded rather than being set in the local session.