Skip to content

Commit

Permalink
Add --memory option to paasta local-run to allow overriding of memory…
Browse files Browse the repository at this point in the history
… limit set in yelpsoa-configs.
  • Loading branch information
EvanKrall committed Apr 3, 2024
1 parent 1579952 commit 06fc55b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions paasta_tools/cli/cmds/local_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,16 @@ def add_subparser(subparsers):
required=False,
default=None,
)
list_parser.add_argument(
"--memory",
help=(
"Specify a memory limit (in megabytes) for the container."
" If not specified, the memory limit is pulled from yelpsoa-configs for your --instance/--cluster."
),
required=False,
default=None,
type=int,
)
list_parser.add_argument(
"-i",
"--instance",
Expand Down Expand Up @@ -1174,6 +1184,9 @@ def configure_and_run_docker_container(
)
return 1

if args.memory:
instance_config.config_dict["mem"] = args.memory

if docker_sha is not None:
instance_config.branch_dict = {
"git_sha": docker_sha,
Expand Down

0 comments on commit 06fc55b

Please sign in to comment.