Skip to content

fix: ignore results that have no activity data (CM-1112)#4033

Open
themarolt wants to merge 4 commits intomainfrom
fix/dsw-fix-CM-1112
Open

fix: ignore results that have no activity data (CM-1112)#4033
themarolt wants to merge 4 commits intomainfrom
fix/dsw-fix-CM-1112

Conversation

@themarolt
Copy link
Copy Markdown
Contributor

@themarolt themarolt commented Apr 17, 2026

Note

Medium Risk
Changes batch-processing behavior to treat missing activity payloads as successful/processed rather than failed, which can silently drop bad inputs but prevents whole-batch failures/crashes.

Overview
Prevents processActivities batches from failing when a payload has no activity data by skipping those items and marking their resultId as successfully processed, with a warning log.

Aligns prepareMemberData handling so missing activity no longer produces an UnrepeatableError; it now warns and returns success for that item, avoiding batch-wide errors from TypeError when accessing activity.username.

Reviewed by Cursor Bugbot for commit e7f3f57. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Uroš Marolt <uros@marolt.me>
@themarolt themarolt requested review from Copilot and mbani01 April 17, 2026 12:25
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 72ac5c3. Configure here.

Comment thread services/apps/data_sink_worker/src/service/activity.service.ts
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 aims to prevent malformed activity results (where data.data is missing / not an activity object) from crashing a batch by treating them as “processed” and skipping further work.

Changes:

  • Changes the !activity guard in prepareMemberData to log a warning and mark the result as success: true instead of failing with an UnrepeatableError.

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

Comment thread services/apps/data_sink_worker/src/service/activity.service.ts
Signed-off-by: Uroš Marolt <uros@marolt.me>
Signed-off-by: Uroš Marolt <uros@marolt.me>
Copilot AI review requested due to automatic review settings April 17, 2026 12:51
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


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

Comment thread services/apps/data_sink_worker/src/service/activity.service.ts
Comment thread services/apps/data_sink_worker/src/service/activity.service.ts
mbani01
mbani01 previously approved these changes Apr 17, 2026
Signed-off-by: Uroš Marolt <uros@marolt.me>
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