Skip to content

Conversation

@MichalKalita
Copy link
Contributor

@MichalKalita MichalKalita commented Aug 20, 2025

Closes: #160

Tested in:

I tried to write a test using manually sending a cancel notification, but I need a request ID, and I don't know where to find it because it's managed internally in the MCP client.

@MichalKalita MichalKalita requested a review from MQ37 August 20, 2025 09:59
@MichalKalita MichalKalita self-assigned this Aug 20, 2025
@MichalKalita
Copy link
Contributor Author

We could add a test to check that cancelled requests don't send any response. Now is only tested than request is cancelled.

Copy link
Contributor

@MQ37 MQ37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I already menitoned in person, please change the Actor in tests to either apify/python-example or apify/rag-web-browser. These are already on staging and I would prefer to not add a new Actor there to our testing suite. If that is not possible we can include this Actor (if truly needed). Otherwise LGTM, thank you 👍

Copy link
Collaborator

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @MQ37. I also left a couple of comments that should be taken care of.

It should also be possible to send the cancel/notification to actor-mcp, but let’s not complicate this issue with that.

Please create a new issue so we don’t forget.

@MichalKalita
Copy link
Contributor Author

I also need to check if the Actorized MCP server receives a cancel notification. I could try to make some tests, but it can be hard/impossible with actual source code.

@github-actions github-actions bot added the t-ai Issues owned by the AI team. label Aug 21, 2025
Copy link
Collaborator

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of questions, if you can please address them

@MichalKalita
Copy link
Contributor Author

I tested the cancellation of the job working for the actor and the call-actor tool. Checked with VSCode.
I keep tests there, only for the streamable transfer type.

I found a bug where the client in test is not closed when some test fails. It's fixed when the client is always closed in afterEach

Copy link
Collaborator

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked the tests ... the rest look good to me. Thanks

@MichalKalita MichalKalita merged commit 9fc9094 into master Sep 3, 2025
4 checks passed
@MichalKalita MichalKalita deleted the feat/cancellable-actor branch September 3, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Abort Actor run on notifications/cancelled

3 participants