Skip to content

fix: run.py did not correctly handle db_url or HA over sqlite [backport #641] - #643

Merged
kalbasit merged 1 commit into
release-0.7from
backport-641-to-release-0.7
Jan 24, 2026
Merged

kalbasit merged 1 commit into
release-0.7from
backport-641-to-release-0.7

Conversation

@kalbasit

Copy link
Copy Markdown
Owner

Bot-based backport to release-0.7, triggered by a label in #641.

When running in HA mode, the script allowed the user to use sqlite which
is not possible. If HA and sqlite it should throw an error. Also, the
script did not quote the database value leading to shell interpolation
and it was failing to start.

When running in HA mode, the script allowed the user to use sqlite which
is not possible. If HA and sqlite it should throw an error. Also, the
script did not quote the database value leading to shell interpolation
and it was failing to start.

(cherry picked from commit 50a3099)
@kalbasit
kalbasit enabled auto-merge (squash) January 24, 2026 06:53
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jan 24, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @kalbasit, 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 addresses several critical issues within the run.py script to enhance its stability and correctness. It introduces a safeguard against unsupported High Availability configurations with SQLite, rectifies a shell interpolation problem affecting database URL parsing, and ensures proper configuration of the Redis lock backend. These changes collectively improve the script's ability to handle various database and locking setups reliably.

Highlights

  • HA Mode with SQLite Prevention: The script now explicitly checks for and prevents running in High Availability (HA) mode when SQLite is selected as the database, as this configuration is unsupported. An error message is displayed, and the script exits.
  • Database URL Quoting Fix: The --cache-database-url parameter is now properly quoted when passed to the underlying command. This resolves issues where shell interpolation could cause the script to fail to start due to unquoted database values.
  • Redis Lock Backend Configuration: When Redis is chosen as the locker, the --cache-lock-backend=redis argument is now explicitly included in the command, ensuring the correct lock backend is configured.
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. ↩

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request backports several changes to the dev-scripts/run.py script. The additions of a guardrail against using SQLite in HA mode and the flag to enable the Redis lock backend are both good improvements. However, the change to quote the database URL, while it may fix a functional issue, introduces a maintainability concern by passing quoted values to the application. I have left a comment detailing this and suggesting a more robust alternative.

Comment thread dev-scripts/run.py Resolved
@kalbasit
kalbasit merged commit 414a146 into release-0.7 Jan 24, 2026
@kalbasit
kalbasit deleted the backport-641-to-release-0.7 branch January 24, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant