Skip to content

Conversation

@Harriethw
Copy link
Contributor

@Harriethw Harriethw commented Nov 19, 2025

Description

We want an easy and consistent way to identify when a job has run successfully
This adds to our existing context handler for Commands and includes a log if no exceptions are found.

I've created a custom event for each command simply because it's easier to see in my opinion on Insights:

Screenshot 2025-11-19 at 16 28 46

Jira link

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@Harriethw Harriethw force-pushed the DTOSS-11680-completed-event branch from 8875039 to 22ba978 Compare November 19, 2025 16:17
@Harriethw Harriethw changed the title Dtoss 11680 completed event DTOSS-11680: Standardise completed logging for Commands Nov 19, 2025
@Harriethw Harriethw marked this pull request as ready for review November 19, 2025 16:29
@Harriethw Harriethw requested a review from a team as a code owner November 19, 2025 16:29
Copy link
Contributor

@steventux steventux left a comment

Choose a reason for hiding this comment

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

The event monitoring output looks great, very useful as we don't get this without a lot of digging through execution history.
A couple of very minor non-blocking comments. Would merge as is.

We will shortly refactor this context manager to
also log an Insights event if the command finishes
successfully - passing the job name will help
rather than a specific error.
We will shortly replace the existing
exception_handler with this to wrap our Commands.
We want to ensure that shared logic around both
exception handling and logging success events are
shared across Commands. This extends the existing
exception_handler logic.
These are now logged to both insights and stdout
by the command_handler
to ensure any exception from code will be captured
(e.g. if the insights logging call failed)
@Harriethw Harriethw force-pushed the DTOSS-11680-completed-event branch from 2706d9d to c8e60c2 Compare November 20, 2025 12:04
cleaner name for method
@Harriethw Harriethw force-pushed the DTOSS-11680-completed-event branch from c8e60c2 to aa26c22 Compare November 20, 2025 12:20
@Harriethw Harriethw merged commit 039dee5 into main Nov 20, 2025
12 checks passed
@Harriethw Harriethw deleted the DTOSS-11680-completed-event branch November 20, 2025 12:34
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