-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[all] Updated builders to version: 3
#3273
Conversation
This reverts commit 4c495ba.
Co-Authored-By: Steven <steven@ceriously.com>
…builder-version-3
Co-Authored-By: Steven <steven@ceriously.com>
} else if (builder.version === 3) { | ||
const { output, ...rest } = buildResultOrOutputs; | ||
|
||
if ((output as BuilderOutput).type !== 'Lambda') { |
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 can separate the possible output types by doing:
if (Array.isArray(output)) {
throw new Error(`The result of "builder.build" must be a single Lambda, not an array'`);
}
if (output.type !== 'Lambda') {
throw new Error(`The result of "builder.build" must be of type Lambda'`);
}
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.
Unfortunately that doesn't work, I couldn't find a way around the casting
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.
@styfle I've tried to reduce the casting. However, those are sort of assertion checks, so if we wouldn't cast them TypeScript would complain that this is always true
, but this is the builder result, which could actually be any
, since we don't control what it returns.
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 test is failing every time:
✖ deploy a Lambda with a specific runtime
* [now-node] Use builder version 3 * [now-cgi] Use builder version 3 * [now-go] Use builder version 3 * [now-python] Use builder version 3 * [now-ruby] Use builder version 3 * Adjust docs * [now-ruby] Remove unused import * Temp. test in iad1 * Revert "Temp. test in iad1" This reverts commit 4c495ba. * [now-cli] Adjust `now dev` for builder version 3 * [now-build-utils] Do not allow non Community Runtimes * Temp. Force Build in iad1 * Update DEVELOPING_A_RUNTIME.md Co-Authored-By: Steven <steven@ceriously.com> * Update docs * Update test/lib/deployment/now-deploy.js Co-Authored-By: Steven <steven@ceriously.com> * Remove temp. iad1 check * Check memory and maxDuration * Use memory for Lambda * Only cast once * Skip tests
now dev
support runtime version 3runtime
PRODUCT-27