Skip to content

Conversation

@jezekra1
Copy link
Collaborator

Summary

Linked Issues

Documentation

  • No Docs Needed:

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 12, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • New Configuration Option: A new boolean field, disable_downscaling, has been added to the ManagedProviderConfiguration model, allowing for a global toggle to control provider downscaling.
  • Conditional Downscaling Execution: The scale_down_providers cron job will now only execute if the disable_downscaling configuration is set to false, effectively allowing the downscaling process to be halted.
  • Helm Chart Integration: The Helm chart has been updated to include a disableProviderDownscaling value, which maps to the PROVIDER__DISABLE_DOWNSCALING environment variable, providing a deployment-level control for this feature.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@jezekra1 jezekra1 requested a review from JanPokorny December 12, 2025 09:13
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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').

{{- end }}
{{- if .Values.features.selfRegistration }}
- name: PROVIDER__AUTO_REMOVE_ENABLED
{{- if .Values.disableProviderDownscaling }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To align with the suggested change in values.yaml for better organization, please update this to use the nested value. This improves consistency across the Helm chart.

            {{- if .Values.provider.disableDownscaling }}

unmanagedProviders: [] # DEPRECATED: use providers instead
variables: {} # DEPRECATED: use server API to manage variables instead

disableProviderDownscaling: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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: false

@jezekra1 jezekra1 force-pushed the add-global-toggle-to-disable-downscaling branch from 6205582 to 5bc8446 Compare December 12, 2025 09:21
@jezekra1 jezekra1 merged commit 8f12363 into main Dec 12, 2025
10 of 11 checks passed
@jezekra1 jezekra1 deleted the add-global-toggle-to-disable-downscaling branch December 12, 2025 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants