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

Force job #642

Merged
merged 7 commits into from
Nov 16, 2022
Merged

Force job #642

merged 7 commits into from
Nov 16, 2022

Conversation

severo
Copy link
Collaborator

@severo severo commented Nov 16, 2022

  • it automatically forces the refresh of a /first-rows entry if it's missing but should exist
  • it adds two endpoints (behind authentication) to force the refresh of cache entries:
    • POST /admin/force-refresh/splits?dataset={dataset}
    • POST /admin/force-refresh/first-rows?dataset={dataset}&config={config}&split={split}

See #640

Also: add unit test, don't ignore the "force" field when retrieving the
next job, and remove a duplicate line
Used to force the refresh of the cache entries, even if the job should
have been skipped.
Also: fix: query first rows responses, not splits responses
Also: add force argument to compute method of workers
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Base: 90.16% // Head: 76.20% // Decreases project coverage by -13.96% ⚠️

Coverage data is based on head (a1de302) compared to base (ef930e8).
Patch coverage: 47.12% of modified lines in pull request are covered.

❗ Current head a1de302 differs from pull request most recent head a3cc298. Consider uploading reports for the commit a3cc298 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #642       +/-   ##
===========================================
- Coverage   90.16%   76.20%   -13.97%     
===========================================
  Files          55       14       -41     
  Lines        2400      353     -2047     
===========================================
- Hits         2164      269     -1895     
+ Misses        236       84      -152     
Flag Coverage Δ
jobs_mongodb_migration ?
libs_libcache ?
libs_libcommon ?
libs_libqueue ?
services_admin 76.20% <47.12%> (-9.57%) ⬇️
services_api ?
workers_first_rows ?
workers_splits ?

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

Impacted Files Coverage Δ
...admin/src/admin/routes/force_refresh_first_rows.py 38.46% <38.46%> (ø)
...ces/admin/src/admin/routes/force_refresh_splits.py 41.66% <41.66%> (ø)
services/admin/src/admin/dataset.py 50.00% <50.00%> (ø)
services/admin/src/admin/utils.py 87.03% <63.63%> (-6.15%) ⬇️
services/admin/src/admin/app.py 91.30% <100.00%> (+0.82%) ⬆️
...ngodb_migration/src/mongodb_migration/collector.py
jobs/mongodb_migration/tests/test_collector.py
libs/libqueue/src/libqueue/queue.py
libs/libqueue/src/libqueue/worker.py
libs/libqueue/tests/test_queue.py
... and 39 more

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.

Note: it includes a database migration for queue (add the "force" field
to all the jobs).
@severo severo merged commit 1a48e05 into main Nov 16, 2022
@severo severo deleted the force-job branch November 16, 2022 14:37
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.

None yet

2 participants