-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix/17514 #17786
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: develop
Are you sure you want to change the base?
Fix/17514 #17786
Conversation
You should be able to run E2E tests locally:
This requires docker & pnpm to be setup! |
@0xbad0c0d3 is this ready for review? |
No, not yet, sorry for the delay. |
No worries, just wasn't sure :) When you're ready, please request me as a reviewer. |
and also |
Updated test definitions across multiple suites to accept and pass abort signals (`signal`) for enhanced request handling. Adjusted the `start` method in the test runner to support optional abort signals.
Reworked `copyExecutionContext` to use a dynamic property descriptor approach, enabling method overrides without altering the original object. Expanded test cases to cover additional methods and verify override behavior.
Enhanced the descriptor logic to better handle non-function properties and prevent invalid method overrides. Fixed potential issues with binding non-function properties to the context.
Updated the `OverridesStore` type to strictly associate keys with context-specific methods, improving type safety. Renamed and enhanced the descriptor creation function to better handle method overriding and added checks for function-only properties.
Added `packages/**/*.junit.xml` to `.gitignore` to prevent JUnit report files from being tracked in the repository, keeping the working directory clean and avoiding unnecessary versioning of test artifacts.
a9af430
to
cb97187
Compare
@andreiborza so, it is ready |
Thanks! Will take a look in a bit. |
configurable: true, | ||
enumerable: true, | ||
set: newValue => { | ||
if (typeof newValue !== 'function') throw new Error('Cannot override non-function'); |
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.
h: I don't think that throwing an error is the right choice here since it could fail the entire call.
I'd be nice if there is a way to pass
* @param {ContextType|void} ctx - The execution context to be copied. Can be of type `ContextType` or `void`. | ||
* @return {ContextType|void} A new execution context with the same properties and overridden methods if applicable. | ||
*/ | ||
export function copyExecutionContext<T extends ContextType>(ctx: T): T { |
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.
m: This function is not yet called. I would assume this is intended to be used in here?
const context = wrapperOptions.context as ExecutionContext | undefined; |
Thanks a lot for creating a PR. I added two notes |
I was running tests locally and noticed that they are stays running if something wents wrong that's why I've added: 04d2fbf
fixes #17514
Is there a way to run e2e tests pipeline without merging to develop?
Note
Introduce
copyExecutionContext
with tests; make Cloudflare integration test runner acceptAbortSignal
and update tests; ignore JUnit reports.packages/cloudflare/src/utils/copyExecutionContext.ts
to cloneExecutionContext
/DurableObjectState
with overridable, bound methods.packages/cloudflare/test/copy-execution-context.test.ts
covering method overriding, immutability safety, and symbol property preservation.dev-packages/cloudflare-integration-tests/runner.ts
start
now accepts optionalAbortSignal
and forwards it tospawn
.basic
,tracing/anthropic-ai
,tracing/durableobject
,tracing/openai
) to pass{ signal }
from Vitest and call.start(signal)
..gitignore
: Ignorepackages/**/*.junit.xml
JUnit reports.Written by Cursor Bugbot for commit cb97187. This will update automatically on new commits. Configure here.