Skip to content

Conversation

@sfc-gh-zzhu
Copy link

@sfc-gh-zzhu sfc-gh-zzhu commented Aug 16, 2025

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

This PR adds a new remote plugin to the Snowflake CLI that provides functionality for creating and managing remote development environments. The implementation includes:

  1. Core constants and configuration for remote development environments
  2. Utilities for working with Snowflake regions and compute resources
  3. Container specification generation for SPCS-based remote environments

The plugin aims to enable users to create remote development environments with appropriate resource configurations based on the selected compute pool, including support for both CPU and GPU instances across different cloud providers. More details can be found in https://docs.google.com/document/d/1M0gV7soTy3dOadwgaUQrdKdkgR6YEUiwmBgMPlj_h5I/edit?usp=sharing

@sfc-gh-zzhu sfc-gh-zzhu changed the title Add remote dev plugin Register the remote dev plugin and add remote dev container spec Remote Dev Plugin Part1 - Register the remote dev plugin and add remote dev container spec utils Aug 16, 2025
@sfc-gh-zzhu sfc-gh-zzhu marked this pull request as ready for review August 16, 2025 18:24
@sfc-gh-zzhu sfc-gh-zzhu requested a review from a team as a code owner August 16, 2025 18:24
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from f6da57b to 2ff889f Compare August 16, 2025 20:06
@sfc-gh-zzhu sfc-gh-zzhu requested a review from a team as a code owner August 16, 2025 20:06
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from 2ff889f to ecd97e7 Compare August 17, 2025 20:18
@sfc-gh-zzhu sfc-gh-zzhu changed the title Remote Dev Plugin Part1 - Register the remote dev plugin and add remote dev container spec utils Remote Dev Plugin Part 1: Register the remote dev plugin and add utils Aug 17, 2025
@sfc-gh-zzhu sfc-gh-zzhu changed the title Remote Dev Plugin Part 1: Register the remote dev plugin and add utils Remote Dev Plugin Part 1 - Register the remote dev plugin and add utils Aug 17, 2025
sfc-gh-dhung
sfc-gh-dhung previously approved these changes Aug 20, 2025
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from ecd97e7 to c970827 Compare August 22, 2025 23:02
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from c970827 to d974a63 Compare August 25, 2025 18:16
sfc-gh-dhung
sfc-gh-dhung previously approved these changes Aug 25, 2025
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from d974a63 to 440fe61 Compare September 5, 2025 00:47
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from 440fe61 to 5a2e34a Compare September 15, 2025 05:30
Comment on lines +106 to +109
return (
COMMON_INSTANCE_FAMILIES.get(instance_family)
or CLOUD_INSTANCE_FAMILIES[cloud][instance_family]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Logic error: The fallback logic will cause a KeyError when the instance_family is not found in COMMON_INSTANCE_FAMILIES. The code uses or operator which means if COMMON_INSTANCE_FAMILIES.get(instance_family) returns None, it will try to access CLOUD_INSTANCE_FAMILIES[cloud][instance_family] without checking if the key exists. This should use proper error handling or check if the key exists in the cloud-specific families before accessing it.

Suggested change
return (
COMMON_INSTANCE_FAMILIES.get(instance_family)
or CLOUD_INSTANCE_FAMILIES[cloud][instance_family]
)
return (
COMMON_INSTANCE_FAMILIES.get(instance_family)
or CLOUD_INSTANCE_FAMILIES.get(cloud, {}).get(instance_family)
)

Spotted by Diamond

Fix in Graphite


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

@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from 5a2e34a to 3137229 Compare September 19, 2025 19:18
@sfc-gh-zzhu sfc-gh-zzhu mentioned this pull request Sep 29, 2025
9 tasks
Register the remote dev plugin and add remote dev container spec
@sfc-gh-zzhu sfc-gh-zzhu force-pushed the 08-16-add_remote_dev_plugin_register_the_remote_dev_plugin_and_add_remote_dev_container_spec branch from 3137229 to 2f06000 Compare October 17, 2025 18:42
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