-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
chore(ci): Start Celery worker as a background process #29371
chore(ci): Start Celery worker as a background process #29371
Conversation
@@ -117,6 +117,20 @@ testdata() { | |||
say "::endgroup::" | |||
} | |||
|
|||
celery-worker() { |
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.
DRY.
2d6805f
to
55feb68
Compare
celery \ | ||
--app=superset.tasks.celery_app:app \ | ||
worker \ | ||
--concurrency=2 \ |
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.
This seems clearer than -c 2
.
worker \ | ||
--concurrency=2 \ | ||
--detach \ | ||
--optimization=fair |
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.
This seems clearer than -Ofair
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #29371 +/- ##
==========================================
+ Coverage 60.48% 70.40% +9.91%
==========================================
Files 1931 1956 +25
Lines 76236 78405 +2169
Branches 8568 8958 +390
==========================================
+ Hits 46114 55201 +9087
+ Misses 28017 21007 -7010
- Partials 2105 2197 +92
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
SUMMARY
I've been fighting with inconsistencies between running CI locally and remote. Whilst working on a specific PR the Celery tests would always succeed locally whereas they would fail in a remote setting. The errors were always suppressed, but my hunch was that maybe the Celery worker(s) weren't responsive as queries remained in the pending state.
If I mangled the
python_tests.sh
script to only run thetests/integration_tests/celery_tests.py
tests everything seemed to be fine which indicated that maybe there was a temporal facet to the flakiness of the tests. Reading through the GitHub actions/workflows it seems like we manually background the task (via the&
) yet one can actually run Celery in a detached state, which seems more robust.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI. Also verified that the tests on my other PR successfully ran.
ADDITIONAL INFORMATION