rusackas opened a new pull request, #41301:
URL: https://github.com/apache/superset/pull/41301

   ### SUMMARY
   
   `VERSION_SHA` and `BUILD_NUMBER` were surfaced in the frontend "About" 
section and the common bootstrap payload for every viewer, disclosing the 
precise git commit and build of the deployment (useful reconnaissance for 
mapping to known issues for an exact build).
   
   This gates those precise build details behind a new 
`EXPOSE_BUILD_DETAILS_TO_USERS` config (env: `SUPERSET_EXPOSE_BUILD_DETAILS`, 
default off). The git SHA and build number are included only for admin users 
unless a deployment opts in. The release `version_string` is still shown to 
everyone (it is widely used in the UI/About).
   
   A small pure helper `visible_version_metadata()` encapsulates the gating so 
it is easy to test.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — bootstrap payload contents.
   
   ### TESTING INSTRUCTIONS
   
   Unit tests added in `tests/unit_tests/utils/version_test.py`:
   
   - When not exposed, `version_sha`/`build_number` are blanked while 
`version_string` is kept.
   - When exposed, all details pass through.
   - The input dict is not mutated.
   
   Run: `pytest tests/unit_tests/utils/version_test.py`
   
   Manual: as a non-admin, the bootstrap payload `navbar_right.version_sha` is 
empty and `build_number` is null; as an admin (or with 
`SUPERSET_EXPOSE_BUILD_DETAILS=true`) they are populated.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   > Note: changes default visibility of build details (admin-only by default); 
documented in `UPDATING.md`.
   


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