korbit-ai[bot] commented on code in PR #33567: URL: https://github.com/apache/superset/pull/33567#discussion_r2103277408
########## superset/config.py: ########## @@ -765,7 +765,7 @@ class D3TimeFormat(TypedDict, total=False): SCREENSHOT_PLAYWRIGHT_WAIT_EVENT = "load" # Default timeout for Playwright browser context for all operations SCREENSHOT_PLAYWRIGHT_DEFAULT_TIMEOUT = int( - timedelta(seconds=30).total_seconds() * 1000 + timedelta(seconds=60).total_seconds() * 1000 ) Review Comment: ### Inflexible Timeout Configuration <sub></sub> <details> <summary>Tell me more</summary> ###### What is the issue? The timeout value may still be insufficient for extremely large reports or very slow networks, as it's hardcoded without a configuration option for users to adjust it based on their needs. ###### Why this matters In production environments with varying network conditions and report sizes, a fixed 60-second timeout could still lead to failures. Users have no way to adjust this value without modifying the code. ###### Suggested change ∙ *Feature Preview* Make the timeout configurable through environment variables to allow users to adjust it based on their needs: ```python SCREENSHOT_PLAYWRIGHT_DEFAULT_TIMEOUT = int( timedelta(seconds=int(os.environ.get('PLAYWRIGHT_TIMEOUT_SECONDS', 60))).total_seconds() * 1000 ) ``` ###### Provide feedback to improve future suggestions [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/80c68782-367a-4c3d-ba6e-5671a26f56f0/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/80c68782-367a-4c3d-ba6e-5671a26f56f0?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/80c68782-367a-4c3d-ba6e-5671a26f56f0?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/80c68782-367a-4c3d-ba6e-5671a26f56f0?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/80c68782-367a-4c3d-ba6e-5671a26f56f0) </details> <sub> 💬 Looking for more details? Reply to this comment to chat with Korbit. </sub> <!--- korbi internal id:f503875c-094f-4c98-950e-17594d6baf59 --> [](f503875c-094f-4c98-950e-17594d6baf59) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
