Skip to content

Leverage the autodiscovery indexID feature#44

Merged
openshift-merge-bot[bot] merged 2 commits into
openstack-lightspeed:mainfrom
umago:auto-index-id
Nov 26, 2025
Merged

Leverage the autodiscovery indexID feature#44
openshift-merge-bot[bot] merged 2 commits into
openstack-lightspeed:mainfrom
umago:auto-index-id

Conversation

@umago

@umago umago commented Nov 24, 2025

Copy link
Copy Markdown
Contributor

This patch leverage the autodiscovery indexID feature from OLS.

Prior to this patch, our code started a temporary container to extract the indexID value from an env variable, this is no longer needed for OLS and the code can be removed.

@openshift-ci openshift-ci Bot requested review from Akrog and lpiwowar November 24, 2025 14:13

@Akrog Akrog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention how the autodiscovery mechanism works (implicit directory for the DB in the container image):

  • In the commit message
  • In the code when creating the OLSConfig, explaining why we don't explicitly set thee index ID.

This patch leverage the autodiscovery indexID feature from OLS.

Prior to this patch, our code started a temporary container to extract
the indexID value from an env variable, this is no longer needed for OLS
and the code can be removed.

Now, OLS levarages the rag of the RAG images as the indexID for the
vector database. Since our images already matches the tag with the
IndexID that was used during build time, we no longer need to set it in
OLSConfig.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
@umago

umago commented Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

Please mention how the autodiscovery mechanism works (implicit directory for the DB in the container image):

* In the commit message

* In the code when creating the OLSConfig, explaining why we don't explicitly set thee index ID.

That makes sense. Thank @Akrog, I added a comment in the code and also updated the commit message with that information.

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍, just one comment.

Comment thread internal/controller/funcs.go
Since we no longer are required to start a pod to extract the indexID,
these RBAC permissions for jobs and pods can be removed.

Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
@umago

umago commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

/hold

testing new rbac permissions

@umago

umago commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

/hold cancel

Tested locally with the new RBAC permissions removed and everything worked as expected:

[lucas@giant28 devsetup]$ oc get pods -n openshift-lightspeed
NAME READY STATUS RESTARTS AGE
lightspeed-app-server-57f786d669-kt4ws 2/2 Running 0 91s
lightspeed-console-plugin-6c8c846fbb-49tj7 1/1 Running 0 93s
lightspeed-operator-controller-manager-5945547b4d-fxlmj 1/1 Running 0 2m
lightspeed-postgres-server-6db4d55b7d-qdrhw 1/1 Running 1 (85s ago) 91

@lpiwowar lpiwowar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you 👍

I'm letting the final approval to @Akrog since he had some requests as well.

@lpiwowar lpiwowar requested a review from Akrog November 25, 2025 15:59

@Akrog Akrog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, a small nit though in the commit message there's a typo: levarages the rag of the RAG images says rag where it should be tag.

The comment in the code is correct, so I'm ok to merge it.

@openshift-ci openshift-ci Bot added the lgtm label Nov 26, 2025
@openshift-ci

openshift-ci Bot commented Nov 26, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Akrog, umago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit f5efbc1 into openstack-lightspeed:main Nov 26, 2025
4 checks passed
@umago umago deleted the auto-index-id branch November 26, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants