Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/controller/ocp_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ func GetOCPIndexName(version string) string {
}

// GetOCPVectorDBPath returns the full path to OCP vector DB for given version
// Example: "4.16" -> "/rag/ocp_vector_db/ocp-4.16"
// Example: "4.16" -> "/rag/ocp_vector_db/ocp_4.16"
//
// "latest" -> "/rag/ocp_vector_db/ocp-latest"
// "latest" -> "/rag/ocp_vector_db/ocp_latest"
func GetOCPVectorDBPath(version string) string {
return fmt.Sprintf("%s-%s", OpenStackLightspeedOCPVectorDBPath, version)
return fmt.Sprintf("%s_%s", OpenStackLightspeedOCPVectorDBPath, version)
}

// IsSupportedOCPVersion checks if the version is explicitly supported in RAG DB
Expand Down
14 changes: 7 additions & 7 deletions internal/controller/ocp_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ func TestGetOCPVectorDBPath(t *testing.T) {
{
name: "Version 4.16",
version: "4.16",
expected: "/rag/ocp_vector_db/ocp-4.16",
expected: "/rag/ocp_vector_db/ocp_4.16",
},
{
name: "Version 4.18",
version: "4.18",
expected: "/rag/ocp_vector_db/ocp-4.18",
expected: "/rag/ocp_vector_db/ocp_4.18",
},
{
name: "Latest version",
version: "latest",
expected: "/rag/ocp_vector_db/ocp-latest",
expected: "/rag/ocp_vector_db/ocp_latest",
},
}

Expand Down Expand Up @@ -313,8 +313,8 @@ func TestBuildRAGConfigs(t *testing.T) {
if !ok {
t.Fatalf("Expected indexPath to be string, got %T", ocpConfig["indexPath"])
}
if ocpPath != "/rag/ocp_vector_db/ocp-4.16" {
t.Errorf("OCP indexPath = %s, want /rag/ocp_vector_db/ocp-4.16", ocpPath)
if ocpPath != "/rag/ocp_vector_db/ocp_4.16" {
t.Errorf("OCP indexPath = %s, want /rag/ocp_vector_db/ocp_4.16", ocpPath)
}

ocpIndexID, ok := ocpConfig["indexID"].(string)
Expand Down Expand Up @@ -354,8 +354,8 @@ func TestBuildRAGConfigs(t *testing.T) {
if !ok {
t.Fatalf("Expected indexPath to be string, got %T", ocpConfig["indexPath"])
}
if ocpPath != "/rag/ocp_vector_db/ocp-latest" {
t.Errorf("OCP indexPath = %s, want /rag/ocp_vector_db/ocp-latest", ocpPath)
if ocpPath != "/rag/ocp_vector_db/ocp_latest" {
t.Errorf("OCP indexPath = %s, want /rag/ocp_vector_db/ocp_latest", ocpPath)
}

ocpIndexID, ok := ocpConfig["indexID"].(string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
indexPath: /rag/vector_db/os_product_docs
- image: quay.io/openstack-lightspeed/rag-content:os-docs-2025.2
indexID: ocp-product-docs-4_16
indexPath: /rag/ocp_vector_db/ocp-4.16
indexPath: /rag/ocp_vector_db/ocp_4.16
userDataCollection:
feedbackDisabled: true
transcriptsDisabled: true
Loading