Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if best spot price location supports resource group #353

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

anjannath
Copy link
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
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
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
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
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
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
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

@adrianriobo adrianriobo merged commit 0515c52 into redhat-developer:main Dec 17, 2024
4 checks passed
@anjannath anjannath deleted the issue_313 branch December 18, 2024 07:42
@anjannath anjannath self-assigned this Dec 18, 2024
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