Page MenuHomeElementl

feat: add flag to disable all warnings when running dagit
ClosedPublic

Authored by rexledesma on Jun 11 2021, 6:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 17, 10:37 PM
Unknown Object (File)
Wed, May 17, 3:22 AM
Unknown Object (File)
Sun, May 14, 2:45 PM
Unknown Object (File)
Sat, May 13, 9:17 PM
Unknown Object (File)
Fri, May 12, 5:42 AM
Unknown Object (File)
Apr 30 2023, 5:21 AM
Unknown Object (File)
Mar 24 2023, 10:36 AM
Unknown Object (File)
Feb 15 2023, 4:18 AM
Subscribers
None

Details

Summary

A spew of experimental errors always pops up when running dagit,
which can be a little verbose.

Although this can be supressed by adding "warnings.simplefilter" to your
user code, it sounds tedious to put that all over the place.

Instead, add a flag to suprress all warnings in the user code. Unfortunately,
using a context manager is not enough since repository locations are loaded
in individual threads, and warning supression is not thread safe.
https://docs.python.org/3/library/warnings.html#available-context-managers

To get around this, we set the PYTHONWARNINGS environment variable.

Test Plan

run dagit, see no experimental errors

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sandyryza added inline comments.
python_modules/dagit/dagit/cli.py
92

Maybe call it "--suppresswarnings"? Worried about conflict with other meanings of quiet, e.g. suppressing all output.

This revision now requires changes to proceed.Jun 11 2021, 6:45 PM
This revision is now accepted and ready to land.Jun 11 2021, 8:33 PM