-
Notifications
You must be signed in to change notification settings - Fork 40
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
Enable loading any scenario from blob storage #666
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
BainanXia
reviewed
Aug 8, 2022
BainanXia
reviewed
Aug 8, 2022
BainanXia
reviewed
Aug 8, 2022
BainanXia
approved these changes
Aug 8, 2022
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.
This is nice. Thanks!
rouille
approved these changes
Aug 8, 2022
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.
Tested it and it works well. I have, as you do, this annoying CryptographyDeprecationWarning
. I will investigate
Merged
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.
Purpose
Switch to the new esmi blob storage account which is populated with existing scenario data. This is represented as one of a few filesystems which are combined into a single
MultiFS
which acts as a "remote" data store.What the code is doing
InputData
, there is no need to get profiles, so there is no need to add the profiles container as a possible location to check. This is done by passing themake_fs
parameter incontext.py.
server_setup.py
. This is defined (as you can kind of tell by the query params) to allow read and list access on blobs and containers only (not queues, tables, etc). The reason for this is that it turns out anonymous directory listing is not supported for gen2 HNS accounts (as opposed to the original blob storage accounts). See the issue I submitted with azure for more context. The workaround suggested there does work, but it's just as safe to use a SAS instead and is more likely to be stable over time, as it's an officially supported use case.Testing
Ran a scenario in docker container, after deleting existing volumes and containers. Also loaded a scenario that did not exist locally yet and checked that the files are cached locally.
Usage Example/Visuals
Loading a scenario from blob storage.
At this point, if I
cd ScenarioData
andls -la data/output | grep 404
there are no results.So we can load some outputs
And confirm that the files have been downloaded
Note that this example would have worked essentially the same way before, but only for a handful of scenarios, instead of the full set of existing ones.
Time estimate
20 min - I don't think this breaks anything or is super risky