Page MenuHomeElementl

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

Authored by rexledesma on Jun 11 2021, 6:11 PM.

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