Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why was this change made? 🤔
Because when users deposit more than a certain number of files via H2, it causes pain downstream. This blocks the DepositJob from even starting.
Unclear what the error messaging looks like in production (it causes a state machine transition exception in localhost), but there is a similar pattern for version mismatches.Will produce a flash validation message telling the user what went wrong (and will notify HB for our benefit). Will also do this for a version mismatch issue (which currently will just throw a 500 and not give the user any useful message).
One thing I am wondering about is why the
Unzip
orFetchGlobus
jobs happen after the state transition to depositing on https://github.com/sul-dlss/happy-heron/blob/main/app/controllers/works_controller.rb#L204 (which will kick off the deposit job via https://github.com/sul-dlss/happy-heron/blob/main/app/services/work_observer.rb#L30-L33). I think this logic means that the validation in this PR won't run in time to catch large globus/zip objects (which is what we want), but i'm an unclear as to how this all fits together (see https://github.com/sul-dlss/happy-heron/blob/main/app/controllers/works_controller.rb#L202-L210How was this change tested? 🤨
Localhost