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

update the logic to skip a job #761

Merged
merged 2 commits into from
Feb 2, 2023
Merged

update the logic to skip a job #761

merged 2 commits into from
Feb 2, 2023

Conversation

severo
Copy link
Collaborator

@severo severo commented Feb 2, 2023

Instead of retrying for any non-successful response in the cache, we
only retry if the error is in the list of "retry-able" errors. Also:
refactor the logic and add complete tests

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2023

Codecov Report

Base: 92.01% // Head: 92.02% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (535b0e9) compared to base (a968dc5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #761   +/-   ##
=======================================
  Coverage   92.01%   92.02%           
=======================================
  Files          33       33           
  Lines        2204     2206    +2     
=======================================
+ Hits         2028     2030    +2     
  Misses        176      176           
Flag Coverage Δ
workers_datasets_based 92.02% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...orkers/datasets_based/src/datasets_based/worker.py 88.05% <100.00%> (+0.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@severo
Copy link
Collaborator Author

severo commented Feb 2, 2023

This kind of error should lead to retrying the job.

Capture d’écran 2023-02-02 à 09 44 02

it's easier to list the reasons for which we want to run a job, instead
of the reason to skip it
Instead of retrying for any non-successful response in the cache, we
only retry if the error is in the list of "retry-able" errors. Also:
refactor the logic and add complete tests
@severo severo force-pushed the skip_job_even_on_error branch from 7a43f9d to f8e43f1 Compare February 2, 2023 11:25
@severo severo marked this pull request as ready for review February 2, 2023 11:25
@severo severo changed the title refactor: 💡 express should_skip_job as the reverse rules update the logic to skip a job Feb 2, 2023
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

Cool !

return False
return dataset_git_revision is not None and cached_response["dataset_git_revision"] == dataset_git_revision
Copy link
Member

Choose a reason for hiding this comment

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

Can we also make sure to not emit jobs if this condition is met ? This could help making the queue less full of unnecessary jobs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, sure, I'd planned to do it for #736. But I'm trying to do small PRs, I think it will work better now that we work as a team

Copy link
Member

Choose a reason for hiding this comment

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

nice !

@severo severo merged commit 3bd06ab into main Feb 2, 2023
@severo severo deleted the skip_job_even_on_error branch February 2, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants