[IMP] quickstart: add an argument and config to avoid cloning the repository automatically#105
Open
[IMP] quickstart: add an argument and config to avoid cloning the repository automatically#105
Conversation
Contributor
Author
|
@brinkflew may I have your opinion on the idea please ? If your are okay with it I'll see if I can add tests etc. |
brinkflew
reviewed
Nov 18, 2025
5977328 to
2ce6cbb
Compare
…ository automatically [IMP] quickstart: add an argument and config to avoid cloning the repository automatically Locally running custom python code from an unknown author is a security risk. Users willing to easily download a database dump and restore it cannot currently do it in one command (would need to use `dump` then `restore`) which is inconvenient. Introducing a new parameter for `quickstart` command called `--toggle_clone_repo` that will override the default quickstart behavior of always pulling the instance GitHub repository. As certain users would rarely need to clone database custom code, we also introduced a configuration parameter: `toggle_clone_repo` in (`quickstart` section) to avoid cloning the repository. If the config parameter is not set (so, the default behavior) is to always download the custom code Adding `--toggle_clone_repo` will negate the config value. Example: - User A: "I generally want to have databases repository custom code" -> `odev quickstart <db>` "but sometime not" -> `odev quickstart --toggle_clone_repo <db>` - User B: "I generally don't want to have the database custom code" -> first set the config `odev config quickstart.should_clone_repo False` (on the first time only!) then `odev quickstart <db>` "but this time I want the custom code" -> (assuming he already ran `odev config quickstart.should_clone_repo False`): `odev quickstart --toggle_clone_repo <db>`
2ce6cbb to
7f268bb
Compare
Contributor
|
@sea-odoo is also looking at implementing a "no dump" feature for this command so I think there is something at play here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Locally running custom python code from an unknown author is a security risk. Users willing to easily download a database dump and restore it cannot currently do it in one command (would need to use
dumpthenrestore) which is inconvenient.Introducing a new parameter for
quickstartcommand called--toggle_clone_repothat will override the default quickstart behavior of always pulling the instance GitHub repository.As certain users would rarely need to clone database custom code, we also introduced a configuration parameter:
toggle_clone_repoin (quickstartsection) to avoid cloning the repository. If the config parameter is not set (so, the default behavior) is to always download the custom codeAdding
--toggle_clone_repowill negate the config value.Example:
odev quickstart <db>"but sometime not" ->
odev quickstart --toggle_clone_repo <db>odev config quickstart.should_clone_repo False(on the first time only!) thenodev quickstart <db>"but this time I want the custom code" ->
(assuming he already ran
odev config quickstart.should_clone_repo False):odev quickstart --toggle_clone_repo <db>Linked Issues
None
Compliance
docsdirectoryrequirements.txtfile, if any