Azure / Azure/azure-cli-extensions

"az ml computetarget attach aks" should validate Kubernetes version

Open
#515 1 comment 0 reactions 0 assignees View on GitHub
extension/ml Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Extension name (the extension in question)
Machine Learning CLI extension version 1.0.10

### Description of issue (in as much detail as possible)

-----

The `az ml computetarget attach aks` will report success even if the Kubernetes version of the provided AKS cluster is outside the supported range. The problem can only be discovered later using e.g. `az ml computetarget show`:

```
> az ml computetarget attach aks -n test-aksct -i /subscriptions/e60ce6ff-b000-482a-9db3-1eeb766ac2ff/resourcegroups/test-rg/providers/Microsoft.ContainerService/managedClusters/test-aks -w test-mlsw -g test-rg --verbose
Attaching compute resource...
Resource attach submitted successfully.
To see if your compute target is ready to use, run:
az ml computetarget show -n test-aksct

> az ml computetarget show -n test-aksct -w test-mlsw -g test-rg --verbose
{
"location": "eastus",
"name": "test-aksct",
"provisioningErrors": [
{
"code": "BadRequest",
"error": {
"code": "BadRequest",
"details": [
{
"code": "BadRequestFormat",
"message": "Specified kubernetes version 1.12.4 is not supported. Supported versions are between 1.8 - 1.11 "
}
],
"message": "The request is invalid",
"statusCode": 400
},
"message": "The request is invalid"
}
],
"provisioningState": "Failed"
}

```

The compute target gets attached, but is in an unusable state and needs to be detached manually.

The user experience would be much better if `az ml computetarget attach aks` validated the Kubernetes version immediately and returned an error, instead of silently creating an unusable compute target.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `az ml computetarget attach aks` command with an AKS cluster outside the supported Kubernetes range, then compare it with `az ml computetarget show`. Trace the attach AKS CLI entry point and make the command reject unsupported versions immediately, without creating an unusable compute target.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, kubernetes, python
Domain
cli, cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.