You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This prototype encapsulates extracting region and profile in a new method on the BotocoreClient to allow the client code to look reasonable. It's not quite what I had in mind, but with the current structure it's the best I could come up with in an hour.
I also factored out the results list into its own class. It was a bit weird that the client stored the results in itself and then modified itself with extract_key() and flatten(). I simply moved that to a separate class, so subsequent calls to the client don't overwrite the previous results.
The test is now working and passing, but it's terribly slow. I tried it for the dev account, and it makes some 3,000 API calls, so you get rate limited and the client waits and retries. When I limit it to 300 subscriptions, it returns quite quickly, but running it for all subscriptions takes ages.
If the general approach seems reasonable, at least as an incremental improvement over the current situation, I can factor out the changes in the client in a separate PR and clean them up a bit.
I also factored out the results list into its own class. It was a bit weird that the client stored the results in itself and then modified itself with extract_key() and flatten(). I simply moved that to a separate class, so subsequent calls to the client don't overwrite the previous results.
That'd be great! I used to write clojure and wanted something like https://clojuredocs.org/clojure.core/-%3E or a fluent interface, but it turned out badly (strange and incomplete). refs: #11
I pulled out a separate frost CLI entrypoint recently in #341 and adding a new subcommand e.g. frost fetch might provide the flexibility to try a saner client (e.g. boto3) and caching (refs #117) without having to deal with pytest.
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
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.
This prototype encapsulates extracting region and profile in a new method on the
BotocoreClientto allow the client code to look reasonable. It's not quite what I had in mind, but with the current structure it's the best I could come up with in an hour.I also factored out the results list into its own class. It was a bit weird that the client stored the results in itself and then modified itself with
extract_key()andflatten(). I simply moved that to a separate class, so subsequent calls to the client don't overwrite the previous results.The test is now working and passing, but it's terribly slow. I tried it for the dev account, and it makes some 3,000 API calls, so you get rate limited and the client waits and retries. When I limit it to 300 subscriptions, it returns quite quickly, but running it for all subscriptions takes ages.
If the general approach seems reasonable, at least as an incremental improvement over the current situation, I can factor out the changes in the client in a separate PR and clean them up a bit.
Related: #334