Skip to content

Commit b16afa9

Browse files
Merge pull request #88 from Akrog/fix-ocp-rag
Fix the OCP directory to use _ instead of -
2 parents 4d5d3ec + 7aa794b commit b16afa9

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

internal/controller/ocp_version.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ func GetOCPIndexName(version string) string {
113113
}
114114

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

123123
// IsSupportedOCPVersion checks if the version is explicitly supported in RAG DB

internal/controller/ocp_version_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ func TestGetOCPVectorDBPath(t *testing.T) {
6969
{
7070
name: "Version 4.16",
7171
version: "4.16",
72-
expected: "/rag/ocp_vector_db/ocp-4.16",
72+
expected: "/rag/ocp_vector_db/ocp_4.16",
7373
},
7474
{
7575
name: "Version 4.18",
7676
version: "4.18",
77-
expected: "/rag/ocp_vector_db/ocp-4.18",
77+
expected: "/rag/ocp_vector_db/ocp_4.18",
7878
},
7979
{
8080
name: "Latest version",
8181
version: "latest",
82-
expected: "/rag/ocp_vector_db/ocp-latest",
82+
expected: "/rag/ocp_vector_db/ocp_latest",
8383
},
8484
}
8585

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

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

361361
ocpIndexID, ok := ocpConfig["indexID"].(string)

test/kuttl/tests/update-openstacklightspeed/05-assert-olsconfig-update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
indexPath: /rag/vector_db/os_product_docs
3232
- image: quay.io/openstack-lightspeed/rag-content:os-docs-2025.2
3333
indexID: ocp-product-docs-4_16
34-
indexPath: /rag/ocp_vector_db/ocp-4.16
34+
indexPath: /rag/ocp_vector_db/ocp_4.16
3535
userDataCollection:
3636
feedbackDisabled: true
3737
transcriptsDisabled: true

0 commit comments

Comments
 (0)