bxsx commented on code in PR #42495: URL: https://github.com/apache/superset/pull/42495#discussion_r3670087150
########## docker/pythonpath_dev/superset_config.py: ########## @@ -114,7 +114,11 @@ class CeleryConfig: } EXTENSIONS_PATH = "/app/docker/extensions" ALERT_REPORTS_NOTIFICATION_DRY_RUN = True -WEBDRIVER_BASEURL = f"http://superset_app{os.environ.get('SUPERSET_APP_ROOT', '/')}/" # When using docker compose baseurl should be http://superset_nginx{ENV{BASEPATH}}/ # noqa: E501 +# The Docker Compose app service is named "superset" and listens on 8088. Only the +# scheme/host/port matter here (paths are joined with urljoin). For screenshots in +# the dev stack (unbuilt static assets) point this at the nginx service instead: +# http://nginx{SUPERSET_APP_ROOT}/ +WEBDRIVER_BASEURL = f"http://superset:8088{os.environ.get('SUPERSET_APP_ROOT', '/')}/" Review Comment: For report screenshots and links the base path of `WEBDRIVER_BASEURL` doesn't participate in URL building: joined paths are root-relative (`url_for()` output), `urljoin` replaces the base path entirely, and when an app root is configured `get_url_path()` prepends it from `APPLICATION_ROOT` on the path side. A reader running under a non-root prefix gets correct report URLs from this snippet as-is - adding `SUPERSET_APP_ROOT` to the base URL wouldn't change the outcome. It's also a Docker-Compose-specific env var, while this section is deployment-agnostic; path-prefix setups are covered in https://github.com/apache/superset/blob/master/docs/admin_docs/configuration/configuring-superset.mdx. Trailing-slash behavior is likewise moot here, since every joined path starts with `/`. -- 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]
