[Snow] Pass validation when only a subset of devices have valid instance type
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
Currently we loop through the entire device list in snowmachineconfig, if any device does not support the instance type defined, the preflight validation fails.
e.g. I have device list `device-1` and `device-2`, while only `device-1` supports `sbe-g.large` instance type.
When creating a cluster, we get error:
```
Validation failed {"validation": "snow Provider setup is valid", "error": "setting defaults and validate snow config: invalid cluster config: the instance type [sbe-g.large] is not supported in device [device-2]", "remediation": ""}
```
The ideal process should be validating all devices in the device list, and if there is at least one device support the instance type, validation passes and we can create cluster. CAPAS already supports to choose the correct device in the device list to provision.
Contributor guide
Research direction
Start at the snowmachineconfig validation path and trace how the device list is checked against the requested instance type. Compare this with the existing CAPAS device-selection behavior; done means validation succeeds when at least one listed device supports the type and fails when none do.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100