Skip to content

fix: members-enrichment workflow timeouts and db savepoint errors#3585

Merged
skwowet merged 8 commits into
mainfrom
bugfix/members-enrichment
Nov 10, 2025
Merged

fix: members-enrichment workflow timeouts and db savepoint errors#3585
skwowet merged 8 commits into
mainfrom
bugfix/members-enrichment

Conversation

@skwowet
Copy link
Copy Markdown
Collaborator

@skwowet skwowet commented Nov 10, 2025

Changes

Parent timeouts were cancelling child workflows, and parallel database mutations inside a single transaction caused “savepoint does not exist” and “current transaction is aborted” errors under failure conditions.

I increased the schedule, child, and activity timeouts to allow the enrichment batch and its children to complete within a reasonable window. Also serialized the member update operations within the transaction and adjusted the DAL call path to execute deletes on the provided transaction, avoiding nested savepoints.

This removes the cancellation/timing pressure and eliminates the savepoint errors while keeping behavior unchanged.

@skwowet skwowet self-assigned this Nov 10, 2025
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@skwowet skwowet force-pushed the bugfix/members-enrichment branch from 69c0e64 to 87d60d5 Compare November 10, 2025 09:27
@linuxfoundation linuxfoundation deleted a comment from github-actions Bot Nov 10, 2025
@linuxfoundation linuxfoundation deleted a comment from github-actions Bot Nov 10, 2025
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@skwowet skwowet changed the title fix: prevent premature workflow cancellation in members-enrichment fix: members-enrichment workflow timeouts and db savepoint errors Nov 10, 2025
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@skwowet skwowet requested a review from themarolt November 10, 2025 12:29
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@skwowet skwowet requested review from Copilot and themarolt and removed request for themarolt November 10, 2025 12:36
Copy link
Copy Markdown
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 addresses transaction handling issues and adjusts workflow timeouts to accommodate sequential database operations in the member enrichment worker. The primary changes involve refactoring the deleteMemberOrgById function to accept a transaction directly (avoiding nested savepoints) and converting parallel database operations to sequential execution.

Key changes:

  • Refactored deleteMemberOrgById to accept DbTransaction directly instead of creating nested transactions
  • Increased workflow execution timeouts across the enrichment pipeline (ranging from 2x to 6x increases)
  • Converted parallel database operations to sequential execution in updateMemberUsingSquashedPayload

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
services/libs/data-access-layer/src/old/apps/members_enrichment_worker/index.ts Modified deleteMemberOrgById to accept transaction directly and avoid nested savepoints
services/apps/members_enrichment_worker/src/workflows/getMembersToEnrich.ts Increased activity timeout from 10 to 15 minutes and workflow timeout from 15 to 30 minutes
services/apps/members_enrichment_worker/src/workflows/enrichMember.ts Increased activity timeout from 5 to 10 minutes and workflow timeout from 15 to 25 minutes
services/apps/members_enrichment_worker/src/schedules/getMembersToEnrich.ts Increased schedule workflow timeout from 20 minutes to 2 hours
services/apps/members_enrichment_worker/src/activities/enrichment.ts Converted parallel database operations to sequential execution throughout member update process

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skwowet skwowet merged commit 6e1db36 into main Nov 10, 2025
19 checks passed
@skwowet skwowet deleted the bugfix/members-enrichment branch November 10, 2025 12:58
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