fix-model-endpoint-save - Fixed model endpoint save so that it uses the azure_environment variable to determine default management cloud.#902
Open
chadpalmer wants to merge 2 commits into
Conversation
…he azure_environment variable to determine default management cloud.
…tion and added blank line to end of test file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses a bug where model endpoint saves could incorrectly persist the auth.management_cloud field as public when the cloud selector was hidden in the Admin UI. The update ensures that the management cloud setting always aligns with the AZURE_ENVIRONMENT variable when the field is not user-editable, preventing token audience and scope mismatches for government environments. The release notes and functional tests have also been updated to reflect and verify this behavior.
Bug Fixes: Model Endpoint Management Cloud Enforcement
Enforced management_cloud alignment with AZURE_ENVIRONMENT in normalize_model_endpoints, ensuring the field cannot be set to an incorrect default when the admin UI does not expose cloud selection. This includes new helper functions _get_default_management_cloud_from_environment and _is_management_cloud_user_editable in functions_settings.py. [1] [2]
Added a focused functional test (test_model_endpoint_management_cloud_default.py) to verify that hidden admin UI paths cannot persist incorrect management_cloud defaults.
Documentation
Updated release notes in release_notes.md to describe the bug fix and the new normalization guard for model endpoint management cloud enforcement.
Versioning
Bumped application version to 0.241.008 in config.py.