rusackas commented on code in PR #41301:
URL: https://github.com/apache/superset/pull/41301#discussion_r3456965624
##########
superset/views/base.py:
##########
@@ -279,8 +279,16 @@ def menu_data(user: User) -> dict[str, Any]:
if callable(brand_text := app.config["LOGO_RIGHT_TEXT"]):
brand_text = brand_text()
- # Get centralized version metadata
- version_metadata = get_version_metadata()
+ # Get centralized version metadata. Precise build details (git SHA and
+ # build number) let a viewer map the deployment to a specific commit/build,
+ # so expose them only to admins unless the deployment opts in via
+ # EXPOSE_BUILD_DETAILS_TO_USERS. The release version string is always
shown.
+ expose_build_details = (
+ app.config["EXPOSE_BUILD_DETAILS_TO_USERS"] or
security_manager.is_admin()
+ )
+ version_metadata = visible_version_metadata(
+ get_version_metadata(), expose_build_details
+ )
Review Comment:
This PR didn't introduce that call, though - `menu_data` already invoked
`get_version_metadata()` before this change; I'm only wrapping the result for
redaction. The `git rev-parse` fallback on the bootstrap path predates this, so
I'd rather not fold a separate perf refactor in here.
--
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]