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

Previously PDF.js => UV resplit is not working #239

Open
1 task
ShanaLMoore opened this issue Feb 12, 2025 · 4 comments
Open
1 task

Previously PDF.js => UV resplit is not working #239

ShanaLMoore opened this issue Feb 12, 2025 · 4 comments
Assignees
Labels
bug something isn't working needs rework issue needs additional work

Comments

@ShanaLMoore
Copy link
Contributor

ShanaLMoore commented Feb 12, 2025

Summary

This work was previously imported using PDF.js. When we ReSplit, nothing seems to happen (splits and no child work attachments)

https://au-archives.palni-palci-staging.notch8.cloud/concern/generic_works/97025525-7b7f-40a3-a40d-a2041445b5b0?locale=en#

related

Acceptance Criteria

  • If works were previously uploaded without split, then should still be able to split if the user enables the UV

Screenshots or Video

I was able to reproduce this from Hyku main -

Image

Testing Instructions

🚧 🛑 Resplitting will create valkyrie child works. If done on a work that is NOT valkyrie, it will fail to index correctly.

Until works are migrated to valkyrie, the work should be edited and saved (even without changes) which will migrate it to Valkyrie. Then you can safely use the resplit option.

Notes

@ShanaLMoore ShanaLMoore added the bug something isn't working label Feb 12, 2025
@ndroark ndroark changed the title Previoulsy PDF.js => UV resplit is not working Previously PDF.js => UV resplit is not working Feb 12, 2025
@kirkkwang kirkkwang self-assigned this Feb 18, 2025
kirkkwang pushed a commit to samvera/hyku that referenced this issue Feb 18, 2025
This commit will add a fix for re-splitting PDFs, the problem was
because of keyword arguments.

Ref:
- notch8/palni_palci_knapsack#239
ShanaLMoore added a commit that referenced this issue Feb 19, 2025
pulls in the following issues from hyku:

- #239
- notch8/palni-palci#1019
- #194
- #240
@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 19, 2025

QA RESULTS: ❌ Needs Rework

tested on STAGING

I clicked the resplit button but no jobs spawn.

Additionally when I re checked the work I expected to see the child works deleted but that never happened and it looks like this could has been deployed to staging.

Image

Image

@ShanaLMoore ShanaLMoore added the needs rework issue needs additional work label Feb 19, 2025
@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 20, 2025

Update: maybe this line is returning false for this tenant? I'll confirm in staging.

return [] unless TenantConfig.use_iiif_print?

Udpate 2: IiifPrint::TenantConfig.use_iiif_print? => true for this tenant so the code should've continued.

Update 3: this is working for me locally so now I'm wondering again if this code has been deployed 🤔

@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 20, 2025

QA RESULTS: ✅ ⚠ PASS (previously imported pdfs [pdf.js] can be split after enabling [UV] and clicking re split)

tested on STAGING

I retested this on the demo tenant and it's working. Perhaps something else is going on with the tenant referenced in the description.

⚠ Since April is transferring staging to a new cluster, we will likely lose access to the referenced tenant for further investigation so I'd recommend reopening this if it happens again.

Image

@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 20, 2025

More on au-archives debugging:

Calling the resplit job returned => :no_pdfs_for_splitting

locations => "/tmp/b23fa1ad-3b74-4864-97b8-03ae15ea0b04-fedora___palni-palci-knapsack-staging-fcrepo_8080_rest_4a8987c8-3c17-4784-9fc4-22eb9b021182_43_9b_75_fb_439b75fb-7327-4e67-8348-0bd11...
irb(main):030:0>         IiifPrint.conditionally_submit_split_for(work: work, file_set: file_set, locations: [location], user: user)
=> :no_pdfs_for_splitting

this issue is happening because the file path doesn't end with .pdf 🤔 why? I'm tempted to try re uploading this file but should't have to

return false unless path.downcase.end_with?('.pdf')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working needs rework issue needs additional work
Projects
Status: No status
Development

No branches or pull requests

2 participants