Skip to content

Conversation

@hsong-rh
Copy link
Contributor

@hsong-rh hsong-rh commented Feb 2, 2026

https://issues.redhat.com/browse/AAP-64560

  • Add WorkerUnavailable exception for activation worker health
  • Implement check_dispatcherd_health() function for worker availability
  • Integrate health checks into activation create/restart/enable/disable/delete operations
  • Add comprehensive test coverage for health check functionality
  • Update all activation tests with proper health check mocking

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 95.16129% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.43%. Comparing base (937cf5e) to head (2b5b418).

Files with missing lines Patch % Lines
src/aap_eda/core/health.py 91.17% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main    #1460      +/-   ##
==========================================
- Coverage   91.45%   91.43%   -0.03%     
==========================================
  Files         234      235       +1     
  Lines       10089    10122      +33     
==========================================
+ Hits         9227     9255      +28     
- Misses        862      867       +5     
Flag Coverage Δ
unit-int-tests-3.11 91.43% <95.16%> (-0.03%) ⬇️
unit-int-tests-3.12 91.43% <95.16%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
src/aap_eda/api/exceptions.py 100.00% <100.00%> (ø)
src/aap_eda/api/views/activation.py 97.20% <100.00%> (+0.15%) ⬆️
src/aap_eda/api/views/project.py 100.00% <100.00%> (ø)
src/aap_eda/core/views.py 89.18% <100.00%> (-3.27%) ⬇️
src/aap_eda/settings/core.py 100.00% <100.00%> (ø)
src/aap_eda/tasks/orchestrator.py 73.43% <ø> (ø)
src/aap_eda/tasks/project.py 78.46% <100.00%> (ø)
src/aap_eda/core/health.py 91.17% <91.17%> (ø)

... and 1 file with indirect coverage changes

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

@hsong-rh
Copy link
Contributor Author

hsong-rh commented Feb 5, 2026

The multinode tests failures passed in https://github.com/ansible/eda-server/actions/runs/21753743749

AlanCoding
AlanCoding previously approved these changes Feb 5, 2026
Copy link
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

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

Looks well-designed, and actually very small in terms of the code practice change.

There was already a health-checking method, and looks good to continue expanding that out in the code patterns you have here.

Answering the review question I was going to ask - this appears to try to make the checks targeted, as for project update, it only checks the default workers, but activations legitimately require both default & activation workers to process tasks

@hsong-rh
Copy link
Contributor Author

hsong-rh commented Feb 5, 2026

Answering the review question I was going to ask - this appears to try to make the checks targeted, as for project update, it only checks the default workers, but activations legitimately require both default & activation workers to process tasks

Yes, projects only needs default workers, but activations need both default & activation workers

hsong-rh and others added 2 commits February 10, 2026 11:10
- Add ActivationWorkerUnavailable exception for activation worker health
- Implement check_dispatcherd_health() function for worker availability
- Integrate health checks into activation create/enable operations
- Add comprehensive test coverage for health check functionality
- Update all activation tests with proper health check mocking

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants