Skip to content
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

Test job cancel when scheduled on Docker #9

Open
wvengen opened this issue Jan 25, 2024 · 3 comments
Open

Test job cancel when scheduled on Docker #9

wvengen opened this issue Jan 25, 2024 · 3 comments
Labels
docker Docker

Comments

@wvengen
Copy link
Member

wvengen commented Jan 25, 2024

Stopping jobs mostly works, but it has a number of cases to test.

  1. Just created, but not running yet -> remove container without stopping it (not tested)
  2. Running -> send signal (tested in PR Integration tests #21)
  3. Finished -> do nothing (tested in PR Integration tests #21)

Can you think of more corner-cases?
Especially in the first case, there might be various stages.

See also documentation on scrapyd's cancel endpoint.

Note that in PR #21 tests have been added, including some for job cancellation. The main thing now is testing that a container is removed when a job in cancelled before it has started. This issue is now about implementing that, including finding a way to test it reliably.

@wvengen
Copy link
Member Author

wvengen commented Jan 25, 2024

Related: #8.

@wvengen
Copy link
Member Author

wvengen commented Feb 16, 2024

Basic testing added in PR #21. See #8 for things that could still be improved there.

@wvengen wvengen changed the title Make job cancel on Docker more robust Test job cancel when scheduled on Docker Feb 27, 2024
@wvengen
Copy link
Member Author

wvengen commented Mar 13, 2024

One approach to make this, is to add an option to create a Docker instance without starting it, e.g. when the schedule endpoint is called with a special query parameter (one that wouldn't be used as a setting), or perhaps a special header. Then the test can use it for testing this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Docker
Projects
No open projects
Status: Todo
Development

No branches or pull requests

1 participant