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

Create batch jobs for preservation #890

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

jazairi
Copy link
Contributor

@jazairi jazairi commented Feb 3, 2022

Why these changes are being introduced:

We need a way to initiate SIP creation, bagging and streaming to
S3.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/ETD-553

How this addresses that need:

This creates two jobs:

  1. PreservationSubmissionJob attempts to send a single thesis to
    preservation and modifies the preservation_status and preserved_at
    fields accordingly.
  2. PreservationSubmissionPrepJob loops through an array of theses
    to preserve.

Side effects of this change:

  • preservation_status is now an enum with three options: unpreserved
    (the default), preserved, and error.
  • Adds preservation.rake task to send a single thesis to
    preservation via Rails CLI.

Developer

  • All new ENV is documented in README
  • All new ENV has been added to Heroku Pipeline, Staging and Prod
  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

YES

Includes new or updated dependencies?

NO

@mitlib mitlib temporarily deployed to thesis-submit-pr-890 February 3, 2022 15:20 Inactive
@jazairi jazairi force-pushed the etd-553-batch-jobs-for-preservation branch from 10c3314 to 3233a5c Compare February 3, 2022 15:22
@jazairi jazairi temporarily deployed to thesis-submit-pr-890 February 3, 2022 15:22 Inactive
@jazairi jazairi force-pushed the etd-553-batch-jobs-for-preservation branch from 3233a5c to 127a637 Compare February 3, 2022 15:28
@jazairi jazairi temporarily deployed to thesis-submit-pr-890 February 3, 2022 15:28 Inactive
@coveralls
Copy link

coveralls commented Feb 3, 2022

Coverage Status

Coverage increased (+0.04%) to 96.897% when pulling 3d35766 on etd-553-batch-jobs-for-preservation into 2f37096 on main.

@jazairi jazairi force-pushed the etd-553-batch-jobs-for-preservation branch from 127a637 to 0a7e294 Compare February 3, 2022 15:59
@jazairi jazairi temporarily deployed to thesis-submit-pr-890 February 3, 2022 15:59 Inactive
@JPrevost JPrevost self-assigned this Feb 3, 2022
README.md Outdated
streamed to an S3 bucket. (See the SubmissionInformationPackage and SubmissionInformationPackageZipper classes for more
details on this part of the process.)

Once the bags are in the S3 bucket, they are replicated to the Digital Preservation S3 bucket, where they can be
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion they are replicated become they are automatically replicated

@@ -2,7 +2,7 @@

class SubmissionInformationPackageZipperTest < ActiveSupport::TestCase

# because we need to actually use the file it's easier to attache it in the test rather
# because we need to actually use the file it's easier to attach it in the test rather
Copy link
Member

Choose a reason for hiding this comment

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

Por'quoi pas le français?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Parce qu'on le parle pas.

Why these changes are being introduced:

We need a way to initiate SIP creation, bagging and streaming to
S3.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/ETD-553

How this addresses that need:

This creates two jobs:
1. PreservationSubmissionJob attempts to send a single thesis to
preservation and modifies the preservation_status and preserved_at
fields accordingly.
2. PreservationSubmissionPrepJob loops through an array of theses
to preserve.

Side effects of this change:

* preservation_status is now an enum with three options: unpreserved
(the default), preserved, and error.
* Adds `preservation.rake` task to send a single thesis to
preservation via Rails CLI.
* The readme now indicates that the publishing workflow automatically
kicks off the preservation workflow. This is not yet accurate, but
will be once ETD-560 is implemented.
@jazairi jazairi force-pushed the etd-553-batch-jobs-for-preservation branch from 0a7e294 to 3d35766 Compare February 3, 2022 20:33
@jazairi jazairi temporarily deployed to thesis-submit-pr-890 February 3, 2022 20:34 Inactive
@jazairi jazairi merged commit 9e33af4 into main Feb 3, 2022
@jazairi jazairi deleted the etd-553-batch-jobs-for-preservation branch February 3, 2022 20:42
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.

4 participants