Skip to content

fix: conflictError when multiple Zope instances start simultaneously …#16

Merged
remdub merged 1 commit intomainfrom
DEVOPS-339
Mar 24, 2026
Merged

fix: conflictError when multiple Zope instances start simultaneously …#16
remdub merged 1 commit intomainfrom
DEVOPS-339

Conversation

@remdub
Copy link
Member

@remdub remdub commented Mar 24, 2026

…and commit OIDC settings

DEVOPS-339

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Resolved a ConflictError that occurred when multiple Zope instances started simultaneously while committing OIDC settings. The system now gracefully handles the conflict and preserves configuration integrity.
  • Tests

    • Added test coverage for OIDC settings initialization and conflict scenario handling.

@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0c2dbad4-8e69-4a00-a45f-7742e8094db0

📥 Commits

Reviewing files that changed from the base of the PR and between e1284be and 2e3be74.

📒 Files selected for processing (3)
  • CHANGES.md
  • src/pas/plugins/kimug/utils.py
  • tests/utils/test_utils.py

📝 Walkthrough

Walkthrough

This pull request fixes a ConflictError that occurs when multiple Zope instances simultaneously commit OIDC settings. The fix adds error handling in set_oidc_settings() to gracefully catch and abort conflicting transactions, with corresponding test coverage and changelog documentation.

Changes

Cohort / File(s) Summary
Documentation
CHANGES.md
Added changelog entry documenting DEVOPS-339 fix for ConflictError during concurrent OIDC settings commits.
Core Functionality
src/pas/plugins/kimug/utils.py
Modified set_oidc_settings() to wrap transaction.commit() in try/except, catching ZODB.POSException.ConflictError, aborting the transaction, and logging a warning instead of propagating the exception.
Test Coverage
tests/utils/test_utils.py
Added TestSetOidcSettings suite with tests for ConflictError handling (verifying graceful abort without exception propagation) and OIDC settings update from environment variables.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Two Zope hops tried to commit at once,
A conflict arose—what unlucky bunts!
But now our fix catches that messy blur,
Aborts with grace, no more ruffled fur. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a ConflictError when multiple Zope instances start simultaneously and commit OIDC settings.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DEVOPS-339

Comment @coderabbitai help to get the list of available commands and usage tips.

@remdub remdub merged commit 6514b8c into main Mar 24, 2026
8 checks passed
@remdub remdub deleted the DEVOPS-339 branch March 24, 2026 15:10
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.

1 participant