-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
queue remove: can remove successed,failed tasks msgs #7924
queue remove: can remove successed,failed tasks msgs #7924
Conversation
c97735f
to
58db6d7
Compare
@pmrowla |
@karajan1001 it's likely due to using the celery pytest worker inside multiple fixtures at once. In general, we should try to move away from adding complex func tests in favor of unit testing whenever possible. In this case, for celery we do need a couple of func tests to make sure that execution and the UI work properly (in both failed and successful cases), but for testing specific backend or API calls (like remove/status) it's better to use unit tests + mocked celery behavior |
One other thing to note here regarding commits, ideally we want to keep changes in separate commits where possible. In this PR it would be nice to have the separation with:
Basically for small "review fix" type changes it makes sense to squash them into the larger commit, but for larger independent changes that affect different parts of the code base or different parts of the CLI/API, having separate commits makes it easier to keep track of what changed and when. So follow-up changes/fixes to This isn't really a requirement for this PR, but it's something to be aware of in the future |
After removing the functional test of |
0ad89c5
to
3293471
Compare
Followed from iterative#7592 1. Seperate remove method to a new file. 2. Add queued, failed, processed flags to remove. 3. Add new unit tests for queue status --queue/fail/success 4. Implement methods to remove done tasks. 5. add some new unit and functional test for celery_queue.remove 6. bump into dvc-task version 0.0.13
3293471
to
8efda22
Compare
assert "failed to reproduce 'failed-copy-file'" in captured.out | ||
|
||
|
||
def test_queue_remove_done(dvc, failed_tasks, success_tasks): |
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.
Do we need still need this test? With unit tests for remove()
we should not need any additional func tests here
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 we can simplify them. We tested the remove method case by case as well as the cli test. But we don't have a place to test the whole process. This is why I added a functional test here, But I think we can simplify it, We don't need to test all of the cases, but only one of them.
…remove.py Co-authored-by: Peter Rowlands (변기호) <peter@pmrowla.com>
97db11f
to
000133a
Compare
Followed from #7592
remove
method to a new file.queued
,failed
,processed
flags to remove.queue status --queue/fail/success
celery_queue.remove
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
A demo for this PR.
