microsoft / microsoft/AzureTRE

AML Compute Instance fails to build - Invalid Name format

Open
#3,661 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug bundles
Dominant language
Python
Stars
235
Forks
192
Avg merge
1d 23h
Merged PRs (30d)
13

Description

Describe the bug
When adding an AML Compute Instance User Resource to a workspace, the deployment will fail if:

  1. the AML workspace name ends in four numeric characters and
  2. the Compute Instance Resource Id ends in four numeric characters

If the above two conditions apply, this results in an 'InvalidResourceName' error, with the following error message: "A name for an Azure ML Compute Instance must be between 3 and 24 characters in length and must use only numbers, letters and minus symbol (-) and must start with letters. Numbers cannot be the ending of the name if the previous character is a minus symbol (-). Please specify a different Azure ML Instance name"

Steps to reproduce

  1. Deploy an AML Workspace Service with a resource id ending in four numbers (e.g. 794d166a-d426-4050-be63-e0de1e174098)
  2. Deploy an AML Compute Instance with a resource id ending in four numbers (e.g. 440c0bae-c370-4b64-a8e5-0000ab006653)
  3. Deployment fails with 'InvalidResourceName' error (ci-40986653)

Source of Error

The error derives from the code in templates/workspace_services/azureml/user_resources/aml_compute/terraform/locals.tf:

  aml_compute_id                 = "${local.short_service_id}${local.short_user_resource_id}"
  aml_compute_instance_name      = "ci-${local.aml_compute_id}"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in templates/workspace_services/azureml/user_resources/aml_compute/terraform/locals.tf and reproduce the deployment using workspace and compute instance resource IDs ending in four digits. Trace how aml_compute_id and aml_compute_instance_name produce ci-40986653, then verify the deployment succeeds with valid Azure ML naming for those inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, terraform
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.