-
Notifications
You must be signed in to change notification settings - Fork 14
Fix for URL access from outside runtime actions #143
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #143 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 567 570 +3
Branches 109 107 -2
=========================================
+ Hits 567 570 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This needs to be a major when released because presignedUrls used to always be https://.blob.core.windows.net and now they use our cdn firefly.azureedge.net |
|
actually, looks like there is an issue with presignedurl sigs now |
arjuncooliitr
left a comment
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.
LGTM
| credentials = await utils.wrapTVMRequest(this.tvm.getAzureBlobCredentials()) | ||
| } | ||
|
|
||
| if (credentials || !this.hasOwnCredentials) { |
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 think you are right
@sandeep-paliwal could you double check?
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.
just one open point:
An alternative could be to keep using internal URLs when running in a Runtime action. We could do something similar to what @shazron is doing in lib state
This would add complexity but would guarantee the same behavior within runtime actions (so no major is needed). The CDN likely brings its limitations and we should be a bit careful.
Wdyt?
That is not a reliable way of detecting runtime since it could still be in wskdebug. I'm not crazy about the complexity this would add, but there could potentially be a flag added to say the code is definitively NOT running in a runtime container. |
Description
This changes the default url types returned.
internalUrls are of the form .blob.core.windows.net
and urls are using our files cdn firefly.azureedge.net
Some other fixes to make sure we are formatting urls correctly, switched to use the Url class instead of problematic string modification.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: