pulumi/tests/integration/log_debug/python
Justin Van Patten 707b4c05ff
[sdk/python] Significantly reduce debug log calls (#17489)
With #15744 (shipped in v3.112.0) the Python SDK is now making a
significant number of debug log calls. So much so that it has broken our
performance benchmarks for Python, as the tools aren't able to crunch
the data in a reasonable time before timing out.

Before #15744, running `pulumi preview --debug > out.txt` on
https://github.com/pulumi/examples/tree/master/aws-py-s3-folder would
result in around 140 lines of output.

After #15744, running the same command results in ~30K lines.

The lines aren't even really that useful. They just output lines like
the following over and over:

```
    debug: waiting for quiescence; 138 outputs outstanding
    debug: waiting for quiescence; 138 outputs outstanding
    debug: waiting for quiescence; 138 outputs outstanding
    debug: waiting for quiescence; 138 outputs outstanding
    debug: waiting for quiescence; 138 outputs outstanding
```

until eventually it goes to zero.

This PR fixes the issue by only logging "waiting for quiescence"
messages if `excessive_debug_output` has been programmatically set to
`True`.

Integration tests are included to ensure each of the SDKs emits a
reasonable number of debug log messages.

Fixes #17481
2024-10-07 08:46:04 +00:00
..
.gitignore [sdk/python] Significantly reduce debug log calls (#17489) 2024-10-07 08:46:04 +00:00
Pulumi.yaml [sdk/python] Significantly reduce debug log calls (#17489) 2024-10-07 08:46:04 +00:00
__main__.py [sdk/python] Significantly reduce debug log calls (#17489) 2024-10-07 08:46:04 +00:00
requirements.txt [sdk/python] Significantly reduce debug log calls (#17489) 2024-10-07 08:46:04 +00:00