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

[WIP] File count validation #3641

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[WIP] File count validation #3641

wants to merge 3 commits into from

Conversation

peetucket
Copy link
Member

@peetucket peetucket commented Nov 22, 2024

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 or FetchGlobus 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-L210

Screenshot 2024-11-25 at 9 44 09 AM

How was this change tested? 🤨

Localhost

@peetucket peetucket force-pushed the file-count-validation branch from c713937 to dcf5ebf Compare November 22, 2024 18:35
@peetucket peetucket force-pushed the file-count-validation branch from dcf5ebf to 3fbf0f8 Compare November 22, 2024 20:57
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.

1 participant