-
Notifications
You must be signed in to change notification settings - Fork 2
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
enhanced simularium url and firebase recipe path validation #230
Conversation
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.
Looks good!
cellpack/autopack/AWSHandler.py
Outdated
""" | ||
Uploads a file to S3 and returns the presigned url | ||
""" | ||
file_name = self.upload_file(file_path) | ||
if file_name: | ||
return file_name, self.create_presigned_url(file_name) | ||
base_url = self.create_presigned_url(file_name).split("?")[0] |
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.
Nice!
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 might push this into the the create_presigned_url
function so the function returns a url that the next function knows it can use without any adjustments. I also think this is a good bug for some tests. Ie make a list of urls that you know would be a problem and make sure we catch all of them.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #230 +/- ##
==========================================
+ Coverage 98.63% 98.75% +0.12%
==========================================
Files 18 19 +1
Lines 511 563 +52
==========================================
+ Hits 504 556 +52
Misses 7 7 ☔ View full report in Codecov by Sentry. |
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.
Thanks for adding tests!
Problem
What is the problem this work solves, including
AWSAccessKeyId
were not being stripped from the url when opening in a new tabSolution
What I/we did to solve this problem
recipes/
in firebase, making it easier to copy the firebase recipe path for packingType of change
Please delete options that are not relevant.
Steps to Verify:
We have tested several cases:
dev
but fetching it fromstaging
)some of the expected behaviors:
pack -r wrong_db_name:recipes/one_sphere_v_1.0.0
, get error:pack -r firebase:wrong_collection_name/one_sphere_v_1.0.0
, get error:pack -r firebase:recipes/wrong_id
or choosing the wrong database, get error: