Skip to content

fix: wrap pgvector port as string to prevent parse error as int - #45

Merged
Jdubrick merged 1 commit into
redhat-ai-dev:mainfrom
Jdubrick:fix-pgvector-jul31
Jul 31, 2026
Merged

fix: wrap pgvector port as string to prevent parse error as int#45
Jdubrick merged 1 commit into
redhat-ai-dev:mainfrom
Jdubrick:fix-pgvector-jul31

Conversation

@Jdubrick

Copy link
Copy Markdown
Contributor

What does this PR do?:

  • Wraps the pgvector port in quotes so it parses through LCORE as string, currently being parsed as an int and breaking startup

Which issue(s) this PR fixes:

N/A

PR acceptance criteria:

Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened and linked to this PR, if they are not in the PR scope due to various constraints.

  • Tested and Verified

  • Documentation (READMEs, Product Docs, Blogs, Education Modules, etc.)

How to test changes / Special notes to the reviewer:

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Quote PGVector port in generated GitOps manifests to avoid LCORE parse error

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Quote the pgvector port value in generated manifests so LCORE reads it as a string.
• Prevent startup failures caused by the port being parsed as an integer.
Diagram

graph TD
  A["generate-gitops-manifests.sh"] --> B["GitOps manifests"] --> C["LCORE config loader"] --> D[("PGVector Postgres")]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Fix LCORE type coercion for port fields
  • ➕ Addresses the root cause for all configs, not just this generated manifest
  • ➕ Avoids needing quoting conventions in YAML generation
  • ➖ Broader behavior change with higher regression risk
  • ➖ Requires coordinating changes in the LCORE codebase/release
2. Add explicit schema/validation for pgvector config
  • ➕ Early, clear errors when config types are wrong
  • ➕ Improves maintainability as more vector stores/config fields are added
  • ➖ More code and process overhead than needed for a one-line hotfix
  • ➖ Still may require updating generators to satisfy the schema

Recommendation: Keep the current approach (quoting the port in generated manifests) as the fastest, lowest-risk fix to restore startup. Consider a follow-up to improve LCORE config type handling or introduce config schema validation if similar type-parsing issues recur.

Files changed (1) +1 / -1

Bug fix (1) +1 / -1
generate-gitops-manifests.shQuote PGVECTOR_PORT when emitting pgvector connection config +1/-1

Quote PGVECTOR_PORT when emitting pgvector connection config

• Wraps the generated 'port' value in quotes so downstream config parsing treats it as a string. Prevents startup failure when LCORE incorrectly parses the port as an integer.

scripts/generate-gitops-manifests.sh

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@michael-valdron michael-valdron 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

@Jdubrick
Jdubrick merged commit 92311cc into redhat-ai-dev:main Jul 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants