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

Generate a Data Export Report and send Email - DAG failure #1079

Open
1 task
ahafele opened this issue Jun 17, 2024 · 5 comments
Open
1 task

Generate a Data Export Report and send Email - DAG failure #1079

ahafele opened this issue Jun 17, 2024 · 5 comments
Assignees
Labels
data export Related to Data Export out of FOLIO to external vendors

Comments

@ahafele
Copy link

ahafele commented Jun 17, 2024

When an export DAG (select OR send) has failed (and will not be retried) email should go out to [email protected] and [email protected] with:

Subject/body:

"Vendor Name: A data export has failed ..."

  • Vendor name
  • on Date
  • Link to DAG failure
  • Link to UI for downloading mrc or reports

For example, orafin dags generate emails.

No report needed for FULL DUMP

Acceptance Criteria

Generated by Zenhub AI.

  • Scenario: Generate Data Export Report and send Email - DAG failure
  • Given a DAG has failed (and will not be retried)
  • When an email is sent to [email protected] and [email protected]
  • Then the email should have the following content:
    1. Subject: "A data export has failed ..."
    2. Vendor name
    3. Date of failure
    4. Link to DAG failure
    5. Link to UI for downloading mrc or reports
@ahafele ahafele added the data export Related to Data Export out of FOLIO to external vendors label Jun 17, 2024
@ahafele ahafele transferred this issue from sul-dlss/FOLIO-Project-Stanford Jun 17, 2024
@jgreben jgreben self-assigned this Jun 19, 2024
@jgreben
Copy link
Contributor

jgreben commented Jun 19, 2024

We should maybe have a story time about this...

As I see it, currently if the selection dag fails, it will not be retried for the same day, so we should always send out an email for a failed selection dag.

For the transmission dag failures there is already an email that is sent to sul-unicorn-devs each time there are failures in the file list. The failures do not get archived and will keep getting re-tried every day until someone clears them out, so there is no current state kept about the re-tries, and they will always be re-tried.

So maybe for this ticket we just need to send a notification about a failed selection dag, and maybe reformat the failed transmission email?

@ahafele
Copy link
Author

ahafele commented Jun 20, 2024

Can you point me to an example of the transmission dag failure email?

@jgreben
Copy link
Contributor

jgreben commented Jun 28, 2024

@ahafele

def _failed_transmission_email_body(

@jgreben
Copy link
Contributor

jgreben commented Jun 28, 2024

It will basically look something like this example:

Failed to Transmit Files for send_pod_records scheduled__2024-06-26T07:00:00+00:00

scheduled__2024-06-26T07%3A00%3A00%2B00%3A00

These files failed to transmit
data-export-files/some-vendor/marc-files/new/2024062801.mrc
data-export-files/some-vendor/marc-files/updates/2024062802.mrc
data-export-files/some-vendor/marc-files/updates/2024062803.mrc

@ahafele
Copy link
Author

ahafele commented Jul 1, 2024

This looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data export Related to Data Export out of FOLIO to external vendors
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants