-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix provider updaters #149
Merged
Merged
Conversation
This file contains 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
* This might have caused the Amazon updater to fail on Windows the first on `rake db:reset`
Usage: * `rake jobs:update_providers` * `rake jobs:update_providers_async`
* No pricing data included in API responses ! * Region area is not detected yet Options: a) Write a new crawler for the updated pricing Web page b) Combine the data from API somehow with the pricing Web page c) Query a 3rd party service that maintains their own crawlers or manually updates prices
Trying to query the endpoints for the pricing calculator: https://azure.microsoft.com/en-us/pricing/calculator/ RegionsRequest: GET https://azure.microsoft.com/api/v1/regions/ Virtual machinesRequest: GET https://azure.microsoft.com/api/v1/pricing/virtual-machines/calculator/?culture=en-us |
Discard Azure API approach
Using the 3 major provider produces a nicer curve
* Add comment about speedup using a transaction
The `MeanTimeReporter` is very helpful to identify slow test, which is particularly useful when optimizing code.
We currently do not consider storage at all. Whenever we need it back, we have it in the Git history.
Provides a helper method that generalizes the heuristic to identify region areas.
* Use the `RegionArea` module to reduce duplications across provider updaters * Break class into smaller methods * Add transaction to make creating 428 resources ~0.4 seconds faster * Remove storage mocks from test (the mock files are still left in fixtures) * Raise error instead of fail silently :( * Add useful test assertions (e.g., check for unmatched region area)
This speeds up bulk updates. Needed to split up some long methods into a `update_compute` method. * Also fixed the prefix constant causing issues when running multiple tests * Some minor test refactorings
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.
AzureUpdaterTest
rake db:reset
now?Fixes #139
Options to fix the Azure updater