Skip to content

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

Merged
kalbasit merged 1 commit into
mainfrom
01-23-fix_run.py_did_not_correctly_handle_db_url_or_ha_over_sqlite
Jan 24, 2026
Merged

kalbasit merged 1 commit into
mainfrom
01-23-fix_run.py_did_not_correctly_handle_db_url_or_ha_over_sqlite

Conversation

@kalbasit

Copy link
Copy Markdown
Owner

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.
@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 refines the run.py script by implementing crucial fixes related to database management and High Availability setups. It introduces a validation to prevent unsupported HA configurations with SQLite, correctly quotes database URLs to avoid shell parsing errors, and ensures the proper setup of the Redis lock backend. These improvements enhance the script's reliability and prevent common operational issues, making the development environment more stable.

Highlights

  • High Availability (HA) with SQLite: The script now explicitly prevents running in HA mode with SQLite, as this is an unsupported configuration. An error message is displayed, and the script exits if this combination is attempted.
  • Database URL Quoting: The database URL passed to the cache service is now properly quoted. This resolves an issue where shell interpolation could occur, causing the service to fail to start.
  • Redis Lock Backend Configuration: When Redis is selected as the locker, the --cache-lock-backend=redis argument is now explicitly included in the command, ensuring correct configuration for Redis-based locking.
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. ↩

kalbasit commented Jan 24, 2026 •

Copy link
Copy Markdown
Owner Author

@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 introduces several important fixes to the dev-scripts/run.py script, enhancing its robustness for High Availability (HA) configurations. The changes correctly enforce that SQLite cannot be used in HA mode, which aligns with documented limitations. The fix for quoting the database URL to prevent shell interpolation is a necessary correction given that watchexec uses a shell. Finally, the addition of the --cache-lock-backend=redis flag when using Redis as a locker ensures the configuration is correctly passed to the application. All changes are logical and well-implemented. This is a good improvement.

@kalbasit
kalbasit merged commit 50a3099 into main Jan 24, 2026
@kalbasit
kalbasit deleted the 01-23-fix_run.py_did_not_correctly_handle_db_url_or_ha_over_sqlite branch January 24, 2026 06:53
kalbasit added a commit that referenced this pull request Jan 24, 2026
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

Copy link
Copy Markdown
Owner Author

Successfully created backport PR for release-0.7:

kalbasit added a commit that referenced this pull request Jan 24, 2026
#641] (#643)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release-0.7 Backport PR automatically 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