Loopback service stubs accept a dynamic version (cohort) parameter#6111
Loopback service stubs accept a dynamic version (cohort) parameter#6111
Conversation
47269b7 to
5e97e28
Compare
|
The generated output of |
5e97e28 to
117d265
Compare
Merging this PR will improve performance by 19.42%
Performance Changes
Comparing Footnotes
|
117d265 to
d5a70e0
Compare
|
@sohpeach Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
Similar to `props`, this allows a worker to call the service stub as a
function, passing along the given version information (currently only a
cohort string) to the runtime.
workerd's server implementation currently ignores this information, so
the test included in this commit is very minimal. We could come up with
a better test once we've decided how this information will be exposed to
the worker, assuming it also makes sense in the workerd runtime. The
internal codebase tests this feature in more depth.
The feature is behind the experimental `enable_version_api` flag. Usage
looks like:
`let service = ctx.exports.default({ version: { cohort: "blah" } });`
d5a70e0 to
4fa1ce8
Compare
|
/bonk review |
|
Review posted. Here's a summary of the findings: Review SummaryI reviewed PR #6152 which adds a dynamic Findings posted:
Non-issues confirmed:
Note: I was unable to post inline comments because the remote PR head appears to have been overwritten with a different commit. The overall review comment was posted successfully. Time for a pun! I tried to review a cohort parameter, but it just kept versioning away from me. |
Ha!! Bonk picked up on the |
Similar to
props, this allows a worker to call the service stub as a function, passing along the given version information (currently only a cohort string) to the runtime.workerd's server implementation currently ignores this information, so the test included in this commit is very minimal. We could come up with a better test once we've decided how this information will be exposed to the worker, assuming it also makes sense in the workerd runtime. The internal codebase tests this feature in more depth.
The feature is behind the experimental
enable_version_apiflag. Usage looks like:let service = ctx.exports.default({ version: { cohort: "blah" } });