-
Notifications
You must be signed in to change notification settings - Fork 4
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
Upgrades to browse-everything 2.x-stable #3754
Upgrades to browse-everything 2.x-stable #3754
Conversation
https://circleci.com/gh/pulibrary/figgy/25098#tests/containers/1 is failing due to tests which I cannot trigger failures for locally:
|
I've updated this in order to ensure that the BrowseEverything persistence models are properly namespaced, but pending the CircleCI build passing, this should prepare for the upstream release of the Gem. |
Unfortunately this cannot use a Gem pre-release until there is another Hyrax 2.x release (please see samvera/browse-everything#335 (comment)). |
f21379d
to
2ef4f55
Compare
These commits prevent the Order Manager interface from being rendered on the staging environment, but this is not the case in my local environment. |
2ef4f55
to
1a84027
Compare
The following error is logged when JavaScript dependencies is loaded in the staging environment:
Updating |
I've been trying to isolate the JavaScript packages which might be triggering this. Thus far, I have limited these changes to require only the following:
Once the staging environment is clear, I will attempt walking back through additional dependencies in order to determine which of this is triggering the error with |
Reducing these dependencies did not resolve the error. |
Simply disabling the |
13a487c
to
16ec7ea
Compare
The minified release of |
Adding |
3f20641
to
b9f84c7
Compare
The provider implementation pulls from the hash we used and stubs the appropriate things. We trust that BrowseEverything's google drive implementation works, so we can just use this one to make sure our logic navigates the hierarchy correctly.
7f9c3f2
to
19f1ac2
Compare
@@ -0,0 +1,68 @@ | |||
# BrowseEverything::Provider which is powered off a simple hash. Useful for | |||
# testing cloud functionality without hitting the cloud. | |||
class HashProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments, but overall this looks great. It's quite a bit a of work to get this all wired up. 👏
Also, I'm trying out a comment labeling process I read about recently:
https://conventionalcomments.org/
def upload_files(upload_id) | ||
# Ensure files are downloaded via ActiveStorage. We delay this for | ||
# performance. | ||
BrowseEverything::UploadJob.perform_now(upload_id: upload_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Comment above says this is delayed for performance, however this job is performed synchronously (perform_now). Am I misinterpreting this, or is the comment incorrect?
class Upload | ||
def perform_job; end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: This overrides
directory seems to be a significant piece of new architecture. I've done a fair bit of monkey patching with other projects and this is a good reference:
https://www.justinweiss.com/articles/3-ways-to-monkey-patch-without-making-a-mess/
What about creating a new file in app/overrides/browse_everything/upload/override.rb
:
module BrowseEverything
module Upload
module Override
def perform_job; end
end
end
end
BrowseEverything::Upload.include BrowseEverything::Upload::Override
Alternatively, I've seen monkey patches in config/initializers/
.
question: Are there other monkey patches in Figgy that we should move to this directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include
won't work, but I can use prepend
.
end | ||
end | ||
|
||
class BrowseEverythingLocalIngester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: When I read through the controller code, I was expecting to find BulkCloudIngester
in the same file as BrowseEverythingLocalIngester
, but it's been extracted into a separate class. I wonder if BrowseEverythingLocalIngester
should be extracted as well?
Configure ACTIVE_STORAGE_ROOT for figgy
Configure ACTIVE_STORAGE_ROOT for figgy
Configure ACTIVE_STORAGE_ROOT for figgy
Configure ACTIVE_STORAGE_ROOT for figgy
This will upgrade to the first browse-everything 2.0.0 alpha pre-release. This shall include integrated support for the the React user interface (which also integrates the Google Picker widget for supporting Google Drive uploads).
This is blocked by #3752 due to its dependency on NodeJS 12.x releases.
fixes #3604
fixes #3791
fixes #3724
fixes #3591
fixes #3606
fixes #3505
fixes #3849
On merge please resolve https://app.honeybadger.io/projects/53391/faults/60157535
TODO:
upstream:
mint_new_id
from https://github.com/samvera/browse-everything/blob/2.x-stable/app/jobs/browse_everything/upload_job.rb#L61locally:
spec/resources/scanned_resources/scanned_resources_controller_spec.rb
not stubBrowseEverything::UploadJob
, and send real files.spec/controllers/bulk_ingest_controller_spec.rb
to have accurateBrowseEverything::Uploads
, do not stubBrowseEverything::UploadJob
, and instead stub the Google Drive provider's#find_bytestream
and#find_container
methods.