Skip to content

SNOW-3052213: Add support for the DEFAULT_PYTHON_ARTIFACT_REPOSITORY parameter#4073

Open
sfc-gh-bkogan wants to merge 23 commits intomainfrom
bkogan-default-artifact
Open

SNOW-3052213: Add support for the DEFAULT_PYTHON_ARTIFACT_REPOSITORY parameter#4073
sfc-gh-bkogan wants to merge 23 commits intomainfrom
bkogan-default-artifact

Conversation

@sfc-gh-bkogan
Copy link
Contributor

@sfc-gh-bkogan sfc-gh-bkogan commented Feb 5, 2026

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-3052213

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

    Reads the SYSTEM$GET_DEFAULT_PYTHON_ARTIFACT_REPOSITORY built in system function to determine the default artifact repository to use for function creation. SQL generation is unaffected, just have to change the places that assume artifact_repository is None means we are using conda.

    Some things to note:

  • session._packages removed and merged with session._artifact_repository_packages. This is because we can no longer assume the default repo name, so we must tag each package with it's corresponding repo name.
  • Added session._default_artifact_repository_cache to cache repeated invocations of getting the default repo in the same DB/schema context. The cache introduces a gap where users who manually alter the parameter value in same context will not see that value reflected if the cache is already set. This is a reasonable tradeoff for now, we can follow up if it becomes an issue.

@sfc-gh-bkogan
Copy link
Contributor Author

sfc-gh-bkogan commented Feb 6, 2026

Tests currently failing because the system function isn't available in the test environment yet. EDIT: should be good now

@sfc-gh-bkogan sfc-gh-bkogan marked this pull request as ready for review February 6, 2026 21:39
@sfc-gh-bkogan sfc-gh-bkogan requested review from a team as code owners February 6, 2026 21:39
@sfc-gh-bkogan sfc-gh-bkogan force-pushed the bkogan-default-artifact branch from 9a8e115 to 4a51691 Compare February 10, 2026 21:25
@sfc-gh-bkogan sfc-gh-bkogan changed the title Add support for the DEFAULT_PYTHON_ARTIFACT_REPOSITORY parameter SNOW-3052213: Add support for the DEFAULT_PYTHON_ARTIFACT_REPOSITORY parameter Feb 13, 2026
@sfc-gh-bkogan sfc-gh-bkogan requested a review from a team February 18, 2026 22:06
@sfc-gh-bkogan sfc-gh-bkogan force-pushed the bkogan-default-artifact branch from a04e507 to 586c2ee Compare February 18, 2026 22:28
@sfc-gh-bkogan sfc-gh-bkogan force-pushed the bkogan-default-artifact branch from 586c2ee to 70e97e7 Compare February 18, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments