fitzee commented on code in PR #44114:
URL: https://github.com/apache/superset/pull/44114#discussion_r3978184835


##########
.github/actions/setup-backend/action.yml:
##########
@@ -43,6 +43,8 @@ runs:
       if: inputs.install-superset == 'true'
       uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # 
v9.0.0
       with:
+        # Avoid a network-dependent lookup of the latest uv version during 
setup.
+        version: "0.12.12"

Review Comment:
   Agreed. A version pin still goes through setup-uv artifact resolution on a 
cache miss, so it does not remove the failing network lookup. I removed this 
unrelated setup-uv change from the PR in 1d5e341711.



##########
superset/utils/screenshot_utils.py:
##########
@@ -487,6 +488,35 @@ def _unready_chart_holders_js_body(*, viewport_only: bool) 
-> str:
     f"() => {{ {UNREADY_ALL_CHART_HOLDERS_JS_BODY} "
     "return holders.length > 0 && unready.length === 0; }"
 )
+
+
+def _stable_readiness_js(readiness_predicate: str) -> str:
+    """Require a readiness predicate to remain true for a capture dwell."""
+
+    return f"""
+    args => {{
+        const ready = ({readiness_predicate})();
+        const now = performance.now();
+        const previous = window.__supersetCaptureReadiness;
+        if (!ready) {{
+            window.__supersetCaptureReadiness = {{token: args.token, since: 
null}};

Review Comment:
   Added executable coverage in 1d5e341711. The test evaluates the generated 
JavaScript through Node and verifies initial false, success only after 500 ms, 
ready-to-loading-to-ready dwell reset, and token reset. It skips explicitly 
when Node is unavailable rather than adding a Chromium dependency to the Python 
unit suite.



-- 
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]

Reply via email to