-
Notifications
You must be signed in to change notification settings - Fork 80
Remote Dev Plugin Part 1 - Register the remote dev plugin and add utils #2545
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
base: main
Are you sure you want to change the base?
Conversation
f6da57b to
2ff889f
Compare
2ff889f to
ecd97e7
Compare
ecd97e7 to
c970827
Compare
c970827 to
d974a63
Compare
d974a63 to
440fe61
Compare
440fe61 to
5a2e34a
Compare
| return ( | ||
| COMMON_INSTANCE_FAMILIES.get(instance_family) | ||
| or CLOUD_INSTANCE_FAMILIES[cloud][instance_family] | ||
| ) |
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.
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.
| 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
Is this helpful? React 👍 or 👎 to let us know.
5a2e34a to
3137229
Compare
Register the remote dev plugin and add remote dev container spec
3137229 to
2f06000
Compare

Pre-review checklist
Changes description
This PR adds a new
remoteplugin to the Snowflake CLI that provides functionality for creating and managing remote development environments. The implementation includes: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