-
Notifications
You must be signed in to change notification settings - Fork 488
feat: Clarify Azure OpenAI configuration in model serving provider #5310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
brandonhawi
wants to merge
13
commits into
databricks:main
Choose a base branch
from
brandonhawi:azure-openai-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
ddfa9cc to
7393413
Compare
…tation This commit fixes three critical issues identified in code review: 1. Silent Failure Prevention: Changed index boundary checks to return errors instead of silently continuing when served_entities index mismatches occur, preventing incomplete endpoint configurations. 2. Nil Pointer Safety: Added explicit nil check for ServedEntities in handleAzureOpenAI to prevent potential nil pointer dereference. 3. State Corruption Prevention: Modified handleAzureOpenAIRead to only transform openai -> azure-openai provider when azure_openai_config already exists in state, preventing state corruption for existing users with manual Azure configurations. These changes improve error handling, prevent silent failures, and maintain backwards compatibility with existing configurations.
- Add DiffSuppressFunc for plaintext secrets to prevent perpetual drift - Refactor handleAzureOpenAIRead to prevent partial state corruption - Improve error handling to catch malformed configurations early - Add comprehensive unit tests for error cases - Remove ConflictsWith constraints that don't work with nested lists Runtime validation now enforces mutual exclusion between authentication methods.
2158150 to
41a3dfb
Compare
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
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.
Changes
Adds a dedicated
azure-openaiprovider andazure_openai_configblock todatabricks_model_serving.Why: The current
openaiprovider mixes native and Azure fields, making it impossible to enforce Azure-specific requirements at the schema level.Technical Reasoning:
The
databricks-sdk-gois auto-generated from Databricks OpenAPI specs and cannot be modified directly. This PR implements a provider-side shim to translate theazure_openai_configHCL into SDK-nativeopenai_configstructures at runtime, delivering better DevEx without requiring backend API schema changes.Implementation Details:
AddNewFieldviaCustomizeSchemaPathto extend the schema robustly.Tests
make testrun locallydocs/folderinternal/acceptance(TestAccModelServingAzureOpenAI)serving/resource_model_serving_test.go(TestModelServingCreateAzureOpenAI)NEXT_CHANGELOG.mdfile