-
Notifications
You must be signed in to change notification settings - Fork 137
feat(server): add global togle to disable managed provider downscaling #1717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @jezekra1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new feature that allows for the global disabling of managed provider downscaling. This provides administrators with greater control over resource management by preventing the automatic removal or scaling down of providers when this option is enabled. The implementation involves updating the server's configuration, conditionally executing the downscaling cron job, and exposing this setting through the Helm chart for easy deployment configuration. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a global configuration flag to disable the automatic downscaling of managed providers. The implementation looks good, adding the flag to the configuration model, using it to conditionally register the downscaling cron job, and exposing it through Helm chart values.
My review includes a few suggestions for improvement:
- In
provider.py, I suggest moving the configuration check inside the cron task for better testability and explicitness, following existing patterns in the codebase. - For the Helm chart, I recommend restructuring the new value to improve organization and consistency.
- I also noticed a small typo in the pull request title ('togle' should be 'toggle').
apps/agentstack-server/src/agentstack_server/jobs/crons/provider.py
Outdated
Show resolved
Hide resolved
| {{- end }} | ||
| {{- if .Values.features.selfRegistration }} | ||
| - name: PROVIDER__AUTO_REMOVE_ENABLED | ||
| {{- if .Values.disableProviderDownscaling }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| unmanagedProviders: [] # DEPRECATED: use providers instead | ||
| variables: {} # DEPRECATED: use server API to manage variables instead | ||
|
|
||
| disableProviderDownscaling: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better organization and consistency with other configuration blocks like auth and generateConversationTitle, consider nesting disableProviderDownscaling under a provider key and renaming it to disableDownscaling to avoid redundancy. This makes the values.yaml file easier to navigate and understand as more provider-specific configurations are added. I've added a related comment in helm/templates/deployment.yaml to adjust the value access.
provider:
disableDownscaling: falseSigned-off-by: Radek Ježek <[email protected]>
6205582 to
5bc8446
Compare
Summary
Linked Issues
Documentation
If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.