Skip to content

Commit 353407c

Browse files
rishupkclaude
andcommitted
fix(azure): make location optional for spot allocation
- Restore DefaultHostingPlace() to return nil, nil when no location env is set, with an info-level log instead of a hard error - Requiring location at mc.Init() broke spot workflows that don't need it (fixes #839); the non-spot path in allocation.go already enforces location explicitly when missing Co-Authored-By: Claude <Sonnet 4.6> <noreply@anthropic.com> Signed-off-by: Rishabh Kothari <rkothari@redhat.com>
1 parent 4519410 commit 353407c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/provider/azure/azure.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ func (a *Azure) DefaultHostingPlace() (*string, error) {
4242
if len(hp) > 0 {
4343
return &hp, nil
4444
}
45-
return nil, fmt.Errorf("missing default value for Azure Location, set ARM_LOCATION_NAME or AZURE_DEFAULTS_LOCATION environment variable")
45+
logging.Infof("missing default value for Azure Location, if needed it should set using ARM_LOCATION_NAME or AZURE_DEFAULTS_LOCATION")
46+
return nil, nil
4647
}
4748

4849
// Envs required for auth with go sdk

0 commit comments

Comments
 (0)