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

feat(admin): add task field to search_fields #857

Merged
merged 1 commit into from
Mar 22, 2025

Conversation

kyonlee
Copy link
Contributor

@kyonlee kyonlee commented Mar 19, 2025

Extended the search functionality in the PeriodicTaskAdmin by adding 'task' to the search_fields. This allows users to search periodic tasks by their task names, improving the admin interface usability.

Issue: #856

Extended the search functionality in the PeriodicTaskAdmin by adding
'task' to the search_fields. This allows users to search periodic tasks
by their task names, improving the admin interface usability.
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

can you please check why the builds are failing?

@kyonlee
Copy link
Contributor Author

kyonlee commented Mar 20, 2025

It looks like the builds were failing due to a flaky test (t/unit/test_schedulers.py::test_DatabaseScheduler::test_get_excluded_hours_for_crontab_tasks), introduced in fc64741.

The test does not account for the default Celery cleanup task hour, causing it to fail when ran at specific times.
https://github.com/celery/django-celery-beat/blob/main/django_celery_beat/schedulers.py#L414

I do not think fixing this test is within scope of this PR, but I'm happy to open a separate PR to address it. Let me know how you would like me to approach it. e.g. freezing time, assert only if statements do not result in '4', etc.

@auvipy
Copy link
Member

auvipy commented Mar 20, 2025

it would be highly appreciated if you can open a separate PR to address this flaky test. I will ping @alirafiei75 to review it

@kyonlee
Copy link
Contributor Author

kyonlee commented Mar 21, 2025

Here's the PR that will remove the flake from `t/unit/test_schedulers.py::test_DatabaseScheduler::test_get_excluded_hours_for_crontab_tasks 🙏

@alirafiei75
Copy link
Contributor

I have reviewed the mentioned PR and approved it. @kyonlee thanks for fixing the test.

@auvipy auvipy closed this Mar 22, 2025
@auvipy auvipy reopened this Mar 22, 2025
Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.42%. Comparing base (a70a9dc) to head (d25d22c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #857   +/-   ##
=======================================
  Coverage   87.42%   87.42%           
=======================================
  Files          32       32           
  Lines         954      954           
  Branches       76       76           
=======================================
  Hits          834      834           
  Misses        102      102           
  Partials       18       18           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@auvipy auvipy merged commit d75a850 into celery:main Mar 22, 2025
29 of 46 checks passed
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