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

Harvester Email #4582

Closed
1 task
jbrown-xentity opened this issue Jan 5, 2024 · 5 comments
Closed
1 task

Harvester Email #4582

jbrown-xentity opened this issue Jan 5, 2024 · 5 comments
Assignees
Labels
H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0

Comments

@jbrown-xentity
Copy link
Contributor

User Story

In order to notify data providers of harvest job completion and/or errors, data.gov data providers want an email sent out on harvest job completion.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN the email is extractable from the CKAN organization
    WHEN a harvest job occurs for a given harvest source
    THEN an email is sent with a summary to the emails specified above
    AND there is some way to digest the problems (whether in the email, or through a link)

Background

Popped into my brain from this comment, what do we do with errors. This is what we do.

Security Considerations (required)

No security considerations. Some data providers may balk at their harvests being publicly available

Sketch

No idea at this point. Need to investigate airflow options and best practices, possibly utilizing the SES cloud.gov service (to keep email from point consistent). If there are no out of the box items, change this to a spike/discovery ticket on how to approach this problem.

@nickumia
Copy link

@btylerburton btylerburton added H2.0/Orchestrator and removed H2.0/Harvest-General General Harvesting 2.0 Issues labels Feb 16, 2024
@btylerburton btylerburton moved this from 📔 Product Backlog to 📟 Sprint Backlog [7] in data.gov team board Feb 29, 2024
@btylerburton btylerburton moved this from 📟 Sprint Backlog [7] to 📔 Product Backlog in data.gov team board Feb 29, 2024
@hkdctol hkdctol moved this from 📔 Product Backlog to 📟 Sprint Backlog [7] in data.gov team board Mar 28, 2024
@hkdctol hkdctol moved this from 📟 Sprint Backlog [7] to 📔 Product Backlog in data.gov team board Mar 28, 2024
@btylerburton btylerburton added H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0 and removed H2.0/Orchestrator labels Mar 28, 2024
@btylerburton btylerburton moved this from 📔 Product Backlog to Harvester 2.0 in data.gov team board May 2, 2024
@rshewitt
Copy link
Contributor

flask mail extension

@btylerburton btylerburton moved this from H2.0 Backlog to 📥 Queue in data.gov team board Oct 10, 2024
@btylerburton
Copy link
Contributor

Agree for MVP to send a link to the Harvest UI Jobs page

@Jin-Sun-tts Jin-Sun-tts self-assigned this Nov 13, 2024
@Jin-Sun-tts
Copy link
Contributor

Initially, consider using the flask-mail plugin, which allows sending emails directly from a Flask application. However, our requirement is to incorporate the email step into the harvest process as the final action within the report step.

If we use flask-mail, we would need access to the application instance to send emails. This could lead to redundancy in app instances or require creating an API route that the harvest runner would call, potentially increasing network traffic.

Instead, working on Python's built-in smtplib library to send emails directly from the harvest process. This approach avoids the need for a Flask app instance and eliminates the overhead of creating an API route, reducing potential network traffic and simplifying the integration.

@Jin-Sun-tts
Copy link
Contributor

Jin-Sun-tts commented Nov 19, 2024

The email function is now woking in development, sample email like below:

Subject: Harvest Job Completed

Image

@github-project-automation github-project-automation bot moved this from 👀 Needs Review [2] to ✔ Done in data.gov team board Dec 4, 2024
@Bagesary Bagesary moved this from ✔ Done to 🗄 Closed in data.gov team board Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H2.0/Harvest-Runner Harvest Source Processing for Harvesting 2.0
Projects
Archived in project
Development

No branches or pull requests

5 participants