Skip to content

check if best spot price location supports resource group#353

Merged
adrianriobo merged 1 commit into
redhat-developer:mainfrom
anjannath:issue_313
Dec 17, 2024
Merged

check if best spot price location supports resource group#353
adrianriobo merged 1 commit into
redhat-developer:mainfrom
anjannath:issue_313

Conversation

@anjannath
Copy link
Copy Markdown
Collaborator

it is found that the location suggested by the spot calculation sometimes do not support the creation of Resource Groups which is a requirement for mapt in those cases we use a pre-defined location for creating the Resource group

related issue: #313

the location suggested by the spot calculation sometimes do not
support the creation of Resource Groups  which is a requirement
for `mapt`, In those cases we just use a default region

we get the following error when a region is not usable:

```
Diagnostics:
  azure-native:resources:ResourceGroup (az-ghrunner-awd-rg):
    error: autorest/azure: Service returned an error. Status=400 Code="LocationNotAvailableForResourceGroup" [...]
```
var DefaultCredentials = GetClouProviderCredentials(nil)
var (
DefaultCredentials = GetClouProviderCredentials(nil)
locationsSupportingResourceGroup = []string{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DId you check if is there any api call to know region supporting RG?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did try to find, but couldn't find any API for getting the list of all locations where resource groups are supported, so went with putting a list of good locations in the code

we also need such an API to handle the missing images issue

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

through graph?

@adrianriobo
Copy link
Copy Markdown
Collaborator

LGTM if you try the graph approach for the ImageGallery then you can use it here. But lets merge this one now

Copy link
Copy Markdown
Collaborator

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants