Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented May 26, 2025

What do these changes do?

Suppresses CouldNotAcquireLockError in the cases of background task in replicas are not getting a lock because one of the replicas own it. (which is as expected)!

Related issue/s

How to test

Dev-ops

@pcrespov pcrespov self-assigned this May 26, 2025
@pcrespov pcrespov added the a:services-library issues on packages/service-libs label May 26, 2025
@pcrespov pcrespov added this to the Bazinga! milestone May 26, 2025
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.13%. Comparing base (8f187a7) to head (68518b8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7757      +/-   ##
==========================================
- Coverage   87.35%   87.13%   -0.22%     
==========================================
  Files        1841     1433     -408     
  Lines       71462    59838   -11624     
  Branches     1214      616     -598     
==========================================
- Hits        62427    52142   -10285     
+ Misses       8693     7497    -1196     
+ Partials      342      199     -143     
Flag Coverage Δ
integrationtests 64.39% <ø> (-0.14%) ⬇️
unittests 86.22% <100.00%> (+0.27%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library 71.92% <100.00%> (+0.01%) ⬆️
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 84.89% <ø> (-0.18%) ⬇️
agent 96.46% <ø> (ø)
api_server 91.79% <ø> (ø)
autoscaling 96.07% <ø> (ø)
catalog 92.29% <ø> (ø)
clusters_keeper 99.25% <ø> (ø)
dask_sidecar 91.67% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.87% <ø> (ø)
director_v2 90.99% <ø> (-0.23%) ⬇️
dynamic_scheduler 96.76% <ø> (ø)
dynamic_sidecar 90.19% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.63% <ø> (ø)
resource_usage_tracker 89.13% <ø> (+0.10%) ⬆️
storage 87.74% <ø> (+0.17%) ⬆️
webclient ∅ <ø> (∅)
webserver 85.70% <ø> (-0.01%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f187a7...68518b8. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov pcrespov changed the title 🐛 Fixes exclusive_periodic decorator to handle CouldNotAcquireLockErr… 🐛 Fixes exclusive decorator to handle CouldNotAcquireLockError gracefully May 26, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug by updating the exclusive_periodic decorator to gracefully handle CouldNotAcquireLockError.

  • Added silence_exceptions decorator to suppress specific errors from replicas raising CouldNotAcquireLockError.
  • Retains the original periodic and exclusive logic for background tasks.

@pcrespov pcrespov enabled auto-merge (squash) May 26, 2025 16:05
@pcrespov
Copy link
Member Author

@mergify queue

@pcrespov pcrespov added the 🤖-automerge marks PR as ready to be merged for Mergify label May 26, 2025
@mergify
Copy link
Contributor

mergify bot commented May 26, 2025

queue

🟠 Waiting for conditions to match

  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = system-tests
        • check-neutral = system-tests
        • check-skipped = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

great, thanks

@pcrespov pcrespov merged commit a0d9481 into ITISFoundation:master May 26, 2025
95 checks passed
@pcrespov pcrespov deleted the is7574/fix-log-replicat-exclusive-lock branch May 26, 2025 16:35
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:services-library issues on packages/service-libs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replica-exclusive lock is wrongly reporting errors when another service replica owns the lock

3 participants