-
Notifications
You must be signed in to change notification settings - Fork 32
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
Deno hydrate using deno cache #585
base: main
Are you sure you want to change the base?
Conversation
…ependencies are used
src/lib/maybe-hydrate.js
Outdated
@@ -91,6 +91,18 @@ module.exports = function maybeHydrate (inventory, callback) { | |||
} | |||
else callback() | |||
}, | |||
function _deno(callback) { |
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 this block needs to be linted
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.
Sorry 👍
src/lib/maybe-hydrate.js
Outdated
@@ -91,6 +91,18 @@ module.exports = function maybeHydrate (inventory, callback) { | |||
} | |||
else callback() | |||
}, | |||
function _deno(callback) { | |||
if(inv.lambdasBySrcDir[path] !== undefined) { |
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 check is unnecessary, this function only got called on Lambdas that exist in the project inventory
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.
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.
OK, happens when the path is the shared
or views
dir path. Have added that to the isDenoRuntime
condition
src/lib/maybe-hydrate.js
Outdated
@@ -91,6 +91,18 @@ module.exports = function maybeHydrate (inventory, callback) { | |||
} | |||
else callback() | |||
}, | |||
function _deno(callback) { | |||
if(inv.lambdasBySrcDir[path] !== undefined) { | |||
let isDenoRuntime = (inv.lambdasBySrcDir[path].config.runtime === 'deno') |
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 this is the only check you need to run to install!
Sorry this has lingered, this is an absolutely necessary problem for us to solve. The current Deno runtime bootstrap is These PRs make sense to merge, but only once we can update that runtime, otherwise it won't be looking in the correct place. Any reason we should use Additionally: as I'm looking into it, our Deno runtime is extraordinarily old. Do you have a preferred target version you feel we should have Deno pinned at for a little while? |
No probs.
Personally, I would pin to There were a number of changes introduced to
If you mean locally in sandbox, then doing so would give you the benefit of Deno's cache, but it wouldn't help with the remote function coldstart as your cache would be in Using If we didn't have it in Does that help? sorry if I've misunderstood the question |
Thank you for helping out! ✨
Hi 👋
This PR would work alongside this one in Hydrate - architect/hydrate#136
Together they enable hydration for deno runtime arc functions by setting the
DENO_DIR
tovendor/.deno_cache
within each lambda and usingdeno cache
to pre-cache the remote dependenciesThis massively speeds up individual invocation and stops issues where the lambda times out while Deno is caching the remote dependencies.
Also could prove to be a handy pre-cache that could be used by the Deno lambda layer, moving the
.deno_cache
to/tmp
to deploy pre-cached / hydrated Deno functionsWe really appreciate your commitment to improving Architect
To maintain a high standard of quality in our releases, before merging every pull request we ask that you've completed the following:
master
npm it
from the repo root)readme.md
, help docs, inline docs & comments, etc.)changelog.md
Please also be sure to completed the CLA (if you haven't already).
Learn more about contributing to Architect here.
Thanks again!