Skip to content

Commit

Permalink
[hailctl] Dont show local variables in stacktraces (#13212)
Browse files Browse the repository at this point in the history
`rich` stacktraces will by default show the local variables at each
level of scope, which is nice for debugging but can leak things like
tokens. Best not to have that show up in logs or accidentally pasted
into zulip
  • Loading branch information
daniel-goldstein authored Jun 23, 2023
1 parent 31a0889 commit 65874e6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 3 deletions.
6 changes: 5 additions & 1 deletion hail/python/hailtop/hailctl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
from .hdinsight import cli as hdinsight_cli


app = typer.Typer(help='Manage and monitor hail deployments.', no_args_is_help=True)
app = typer.Typer(
help='Manage and monitor hail deployments.',
no_args_is_help=True,
pretty_exceptions_show_locals=False,
)

for cli in (
auth_cli.app,
Expand Down
1 change: 1 addition & 0 deletions hail/python/hailtop/hailctl/auth/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
name='auth',
no_args_is_help=True,
help='Manage Hail credentials.',
pretty_exceptions_show_locals=False,
)


Expand Down
1 change: 1 addition & 0 deletions hail/python/hailtop/hailctl/batch/billing/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
name='billing',
no_args_is_help=True,
help='Manage billing on the service managed by the Hail team.',
pretty_exceptions_show_locals=False,
)


Expand Down
1 change: 1 addition & 0 deletions hail/python/hailtop/hailctl/batch/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
name='batch',
no_args_is_help=True,
help='Manage batches running on the batch service managed by the Hail team.',
pretty_exceptions_show_locals=False,
)
app.add_typer(billing.cli.app)

Expand Down
1 change: 1 addition & 0 deletions hail/python/hailtop/hailctl/config/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name='config',
no_args_is_help=True,
help='Manage Hail configuration.',
pretty_exceptions_show_locals=False,
)


Expand Down
7 changes: 6 additions & 1 deletion hail/python/hailtop/hailctl/dataproc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@
]


app = typer.Typer(name='dataproc', no_args_is_help=True, help='Manage Hail Dataproc clusters.')
app = typer.Typer(
name='dataproc',
no_args_is_help=True,
help='Manage Hail Dataproc clusters.',
pretty_exceptions_show_locals=False,
)


@app.callback()
Expand Down
1 change: 1 addition & 0 deletions hail/python/hailtop/hailctl/dev/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
name='dev',
no_args_is_help=True,
help='Manage Hail development utilities.',
pretty_exceptions_show_locals=False,
)
app.add_typer(
config.app,
Expand Down
7 changes: 6 additions & 1 deletion hail/python/hailtop/hailctl/hdinsight/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
from .submit import submit as hdinsight_submit


app = typer.Typer(name='hdinsight', no_args_is_help=True, help='Manage and monitor Hail HDInsight clusters.')
app = typer.Typer(
name='hdinsight',
no_args_is_help=True,
help='Manage and monitor Hail HDInsight clusters.',
pretty_exceptions_show_locals=False,
)


@app.command(context_settings={"allow_extra_args": True, "ignore_unknown_options": True})
Expand Down

0 comments on commit 65874e6

Please sign in to comment.