🐛 Add enabled property to llm proxy client configmap#558
Conversation
Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
📝 WalkthroughWalkthroughThis pull request enhances the Ansible playbook for Kai by adding a pre-check task to detect if the LLM Proxy client ConfigMap already exists and broadening the creation task's condition to accommodate both new deployments and updates to existing configurations. Additionally, an Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@roles/tackle/tasks/kai.yml`:
- Line 95: The task "Create LLM Proxy Client Configuration" is currently guarded
by "when: kai_llm_proxy_enabled | bool or
(llm_proxy_client_configmap_status.resources | length) > 0" which can skip
creation on fresh installs when kai_solution_server_enabled is true; update the
when condition to also allow the task to run when kai_solution_server_enabled |
bool is true (i.e., change the when to: kai_solution_server_enabled | bool or
kai_llm_proxy_enabled | bool or (llm_proxy_client_configmap_status.resources |
length) > 0) while keeping state: present so the ConfigMap is created on first
deploy.
In `@roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2`:
- Around line 15-16: The template emits the enabled flag as a JSON string;
change the enabled field to output a real JSON boolean by removing the
surrounding quotes and rendering the kai_llm_proxy_enabled variable through the
boolean/default filters so it produces true/false literals; update the template
line that references kai_llm_proxy_enabled in
roles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2 (keep the model
line using kai_llm_proxy_provider_id and kai_llm_proxy_model_id unchanged).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: db8de375-7dd9-44c1-a082-15d10eb6eb56
📒 Files selected for processing (2)
roles/tackle/tasks/kai.ymlroles/tackle/templates/kai/llm-proxy-client-configmap.yaml.j2
Resolves #1365 Operator PR with new configmap property: konveyor/operator#558 If the `enabled` property is not present in the configmap, it is assumed to be true to ensure compatibility with older versions of the operator. To prevent the bug from occurring, both the operator and the extension will need to be updated <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * The LLM proxy client now supports an `enabled` configuration setting to control whether the proxy is active in your environment. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com>
Resolves #1365 Operator PR with new configmap property: konveyor/operator#558 If the `enabled` property is not present in the configmap, it is assumed to be true to ensure compatibility with older versions of the operator. To prevent the bug from occurring, both the operator and the extension will need to be updated <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * The LLM proxy client now supports an `enabled` configuration setting to control whether the proxy is active in your environment. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com> Signed-off-by: Cherry Picker <noreply@github.com> Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com> Signed-off-by: Cherry Picker <noreply@github.com> Co-authored-by: Alejandro Brugarolas <117646518+abrugaro@users.noreply.github.com>
Resolves konveyor#1365 Operator PR with new configmap property: konveyor/operator#558 If the `enabled` property is not present in the configmap, it is assumed to be true to ensure compatibility with older versions of the operator. To prevent the bug from occurring, both the operator and the extension will need to be updated <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * The LLM proxy client now supports an `enabled` configuration setting to control whether the proxy is active in your environment. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com> Signed-off-by: ibolton336 <ibolton@redhat.com>
|
PR cherry-picked to branch release-0.9. Backport PR: #563 |
Resolves konveyor#1365 Operator PR with new configmap property: konveyor/operator#558 If the `enabled` property is not present in the configmap, it is assumed to be true to ensure compatibility with older versions of the operator. To prevent the bug from occurring, both the operator and the extension will need to be updated <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * The LLM proxy client now supports an `enabled` configuration setting to control whether the proxy is active in your environment. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Alejandro Brugarolas <abrugaro@redhat.com> Signed-off-by: ibolton336 <ibolton@redhat.com>
Relates to konveyor/editor-extensions#1365
Summary by CodeRabbit