Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify subscribers of auto publish failure #608

Merged
merged 2 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
mongodb-version: 4.2
- name: Setup Maven Cache
uses: actions/cache@v2
uses: actions/cache@v4
id: cache
with:
path: ~/.m2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,19 @@ protected void innerJobLogic() throws Exception {
}
}

// If validation successful, just execute the feed updating process.
if (!status.error) {
// Validation successful, just execute the feed updating process.
FeedVersionController.publishToExternalResource(latestFeedVersion);
LOG.info("Auto-published feed source {} to external resource.", feedSource.id);
} else {
// Notify feed and project subscribed users of failure.
String message = String.format(
Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup Mar 4, 2025

Choose a reason for hiding this comment

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

This will result in two email notifications being sent (for fetched feed versions only):

  1. A useful email with the text outlined in this block,
  2. A more generic email that is already being sent, and that reads: "While attempting to process a new feed version for [feed name], an unrecoverable error was encountered. More details: unknown error". I think we can keep the two, although in some future, it will make sense to propagate the error content from this message to the other one. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How quickly are MTC expecting an update? I think for now we go with two email notifications.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can keep it at two emails for now and iterate based on their feedback.

"WARNING: Auto-published feed source %s failed to deploy. Error: %s.",
feedSource.name,
status.message
);
NotifyUsersForSubscriptionJob.createNotification("feed-updated", feedSource.id, message);
NotifyUsersForSubscriptionJob.createNotification("project-updated", feedSource.projectId, message);
}
}
}
Loading