-
Notifications
You must be signed in to change notification settings - Fork 110
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
SNOW-878135 is_permanent behavior fix #989
Changes from 6 commits
d949b45
8f2a11f
5082600
ea9e513
5dd27fd
d979db2
9b889b3
d12ab33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -548,6 +548,7 @@ def register( | |
api_call_source="StoredProcedureRegistration.register", | ||
source_code_display=source_code_display, | ||
anonymous=kwargs.get("anonymous", False), | ||
is_permanent=is_permanent, | ||
) | ||
|
||
def register_from_file( | ||
|
@@ -687,6 +688,7 @@ def register_from_file( | |
api_call_source="StoredProcedureRegistration.register_from_file", | ||
source_code_display=source_code_display, | ||
skip_upload_on_content_match=skip_upload_on_content_match, | ||
is_permanent=is_permanent, | ||
) | ||
|
||
def _do_register_sp( | ||
|
@@ -709,6 +711,7 @@ def _do_register_sp( | |
anonymous: bool = False, | ||
api_call_source: str, | ||
skip_upload_on_content_match: bool = False, | ||
is_permanent: bool = False, | ||
external_access_integrations: Optional[List[str]] = None, | ||
secrets: Optional[Dict[str, str]] = None, | ||
) -> StoredProcedure: | ||
|
@@ -790,7 +793,7 @@ def _do_register_sp( | |
object_name=udf_name, | ||
all_imports=all_imports, | ||
all_packages=all_packages, | ||
is_temporary=stage_location is None, | ||
is_temporary=not is_permanent, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if it makes sense to rename We probably should have made the public param There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could rename |
||
replace=replace, | ||
if_not_exists=if_not_exists, | ||
inline_python_code=code, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need to call out that the default behavior is changing because the default value of
is_permanent
isNone
. So the behavior of a UDF that only hasstage_name
specified will see their UDF becomes temporary.