Skip to content

Conversation

@sfc-gh-yixie
Copy link
Collaborator

@sfc-gh-yixie sfc-gh-yixie commented Dec 30, 2025

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

    Fixes SNOW-2317965

  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.

    1. When context_configure_development_features is called, call an internal API to enable AST instead of the public session.ast_enabled = True.
    2. Refactored to be able to config dev features if there are no active sessions or multiple sessions. When a new session is created, the new session reads the developer feature config.

@sfc-gh-yixie sfc-gh-yixie requested review from a team as code owners December 30, 2025 02:16
@sfc-gh-yixie sfc-gh-yixie changed the title Refactor ontext_configure_development_features SNOW-2317965: Refactor context_configure_development_features Dec 30, 2025
raise SnowparkClientExceptionMessages.SERVER_NO_DEFAULT_SESSION()
if require_at_least_one:
raise SnowparkClientExceptionMessages.SERVER_NO_DEFAULT_SESSION()
return []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type mismatch: Returns an empty list [] but the function signature declares return type as Set["Session"]. This should return an empty set instead.

return set()

While iteration works with both lists and sets, this type inconsistency could cause runtime errors if callers use Set-specific methods like .add(), .union(), etc. or type checkers will flag this as an error.

Suggested change
return []
return set()

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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.

3 participants