Repository navigation
Conversation
CreateSession accepts either a bare session template ID or a
fully-qualified projects/.../locations/.../sessionTemplates/... resource
name on Session.session_template, whereas GetSessionTemplateRequest.name
requires a fully-qualified resource name.
When a bare session template ID is configured and MANAGED_SPARK_CONNECT_*
execution environment variables are present, qualify the template name
to projects/{project}/locations/{region}/sessionTemplates/{template}
before calling GetSessionTemplate so template field precedence is
respected.
Add ManagedSparkSession.Builder.runtimeProfile(profile) to align with the Runtime Profile terminology in Cloud Console and public documentation, while keeping sessionTemplate(profile) as a supported alias.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the concept of Runtime Profiles as a replacement for Session Templates, renaming the sessionTemplate builder method to runtimeProfile and keeping sessionTemplate as an alias. Additionally, it updates _get_session_template to automatically qualify bare session template names into full resource URIs when project and region details are available. Corresponding unit tests and documentation updates have been added. I have no further feedback to provide.
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.
Summary
Qualify bare template/profile names in
_get_session_template:CreateSessionaccepts either a bare session template ID or a fully-qualifiedprojects/.../locations/.../sessionTemplates/...resource name onSession.session_template, whereasGetSessionTemplateRequest.namerequires a fully-qualified resource name.MANAGED_SPARK_CONNECT_*execution environment variables are set, qualify the name toprojects/{project}/locations/{region}/sessionTemplates/{template}before callingGetSessionTemplateso template field precedence is respected.Add
ManagedSparkSession.Builder.runtimeProfile(profile)as an alias forsessionTemplate(profile):sessionTemplate(profile)as a supported alias.