Skip to content

fix(webapp): downgrade retryable directory-sync effect failures to warn#4200

Merged
0ski merged 1 commit into
mainfrom
oskar/fix-dsync-role-serialization
Jul 9, 2026
Merged

fix(webapp): downgrade retryable directory-sync effect failures to warn#4200
0ski merged 1 commit into
mainfrom
oskar/fix-dsync-role-serialization

Conversation

@0ski

@0ski 0ski commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Directory-sync effects are idempotent and the accounts-webhook worker retries
the whole event, so a single failed attempt (typically a role assignment
losing a serializable race during a backfill burst) is self-healing rather
than alert-worthy. Tag those thrown errors with logLevel "warn" so the worker
logs at warn instead of error, keeping them visible for triage without paging.

Directory-sync effects are idempotent and the accounts-webhook worker retries
the whole event, so a single failed attempt (typically a role assignment
losing a serializable race during a backfill burst) is self-healing rather
than alert-worthy. Tag those thrown errors with logLevel "warn" so the worker
logs at warn instead of error, keeping them visible for triage without paging.
@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0ec12d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a helper function, retryableEffectError, in directorySyncEffects.server.ts that creates an Error object tagged with logLevel: "warn". This helper replaces plain Error throws in two failure paths within the applyEffect switch: the "provision" role overwrite failure and the "set_role" failure, changing the logging severity of these thrown errors used in the worker retry flow. No exported or public entity signatures are changed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it does not follow the repository template or include the required issue, testing, changelog, or screenshots sections. Add the template sections: Closes #..., checklist items, testing steps, changelog summary, and screenshots or note if none.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: downgrading retryable directory-sync failures to warn.
✨ 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 oskar/fix-dsync-role-serialization

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@0ski 0ski marked this pull request as ready for review July 9, 2026 12:25

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread apps/webapp/app/services/directorySyncEffects.server.ts
@0ski 0ski self-assigned this Jul 9, 2026
@0ski 0ski enabled auto-merge (squash) July 9, 2026 15:44
Comment thread apps/webapp/app/services/directorySyncEffects.server.ts
@0ski 0ski merged commit e57fd9c into main Jul 9, 2026
40 checks passed
@0ski 0ski deleted the oskar/fix-dsync-role-serialization branch July 9, 2026 15:57
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.

2 participants