Skip to content

[feat] : Common Response Schema (CRS) #3

@brian-pond

Description

@brian-pond

Scenario

  1. Assume a BTU Task runs a Python function, whether on-demand or via a schedule.
  2. Thet Python function loops through 100 documents.
  3. For each document, it transmits an email via Mandrill (Mailchimp)
    • A try + except wisely prevents a failure in 1 iteration from terminating the entire loop.
  4. The function ends after the final loop.

Functionally, what are the possible outcomes?

  • All emails transmitted successfully (there was an "ok" response from Mandrill on every iteration)
  • Some emails transmitted successfully.
  • No emails transmit successfully.

What is the Result in the BTU Task Log?

  • It will always be a "Success", because of the try-except inside the Python function.

The Problem

Unless a human examines every single BTU Task Log every day, then failures will go ignored.

If 3 of the 100 emails failed, the root cause might exist in the documents themselves (e.g. typo in the email address).
But if 100% of the emails fail to transmit, the root cause might be a TCP network failure. In that case, the solution might be waiting 5 minutes, and trying again. Whether automatically, or with manual human intervention.

But today, there exists no means to programmatically identify and act on these results. The Task succeeds because of the loop handling, and the true results must be examined with human eyes.

Desired Enhancement

  • BTU to somehow capture the inner details about its Task's execution.
  • BTU to trigger alerts or warnings, based on those details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions