Skip to content

Conversation

@purplecabbage
Copy link
Member

@purplecabbage purplecabbage commented Feb 8, 2024

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d772fdc) to head (965b566).
⚠️ Report is 17 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@purplecabbage
Copy link
Member Author

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

@purplecabbage purplecabbage added the MajorBump This pull request requires a semver major release label Feb 8, 2024
@purplecabbage
Copy link
Member Author

actually, looks like there is an issue with presignedurl sigs now

Copy link
Contributor

@arjuncooliitr arjuncooliitr left a 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) {
Copy link
Member

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?

Copy link
Member

@moritzraho moritzraho left a 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?

@purplecabbage
Copy link
Member Author

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.
Plus I provide all those values when running action code on localhost. https://github.com/adobe/aio-lib-state/blob/ccdb0953ba386387cdf797b30be022b3c3d4f543/lib/utils.js#L51

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MajorBump This pull request requires a semver major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants