-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
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{ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
through graph?
LGTM if you try the graph approach for the ImageGallery then you can use it here. But lets merge this one now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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 grouprelated issue: #313