check if best spot price location supports resource group#353
Merged
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" [...]
```
adrianriobo
reviewed
Dec 17, 2024
| var DefaultCredentials = GetClouProviderCredentials(nil) | ||
| var ( | ||
| DefaultCredentials = GetClouProviderCredentials(nil) | ||
| locationsSupportingResourceGroup = []string{ |
Collaborator
There was a problem hiding this comment.
DId you check if is there any api call to know region supporting RG?
Collaborator
Author
There was a problem hiding this comment.
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
Collaborator
|
LGTM if you try the graph approach for the ImageGallery then you can use it here. But lets merge this one now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
maptin those cases we use a pre-defined location for creating the Resource grouprelated issue: #313