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

Refactoring for hopefully making 4195 easier #4243

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Feb 1, 2020

This morning, I thought I'd tackle one of the jobs. However, it is not immediately obvious how I should proceed (my Hyrax w/ Valkyrie skills are academic at best). These commits reflect a bit of work to get things into a state that I could make it easier to incorporate Valkyrie.

What would be helpful is to see what the next work should be. I attempted to follow #4213, but did not find that helpful in the limited time that I had to look into the problem. My hope is that this is a "leaves the code-base a little better than before I touched it" set of commits.

I'm very curious what the next steps are regarding Valkyrizing this particular job. I feel once I see a pattern, I may be able to crank out a few more.

Below are the two commits and their messages.

Refactoring ImportUrlJob to ease Valkyrization

369f318

The code changes reflect a simple re-structuring that will make future
work easier:

  1. Extract method from perform into context specific private method
  2. Extract additional attr_reader to allow for common means of using
    instance variables

Refactoring related to #4195

Refactoring object to leverage instance vars

bfd316e

Prior to this commit, there were parameters passed that could be
instead assigned at the beginning of the #perform method. In doing,
we have less chatter on the method calls.

This also involved extract additional instance variables that were
commonly used throughout.

Refactoring related to #4195

@samvera/hyrax-code-reviewers

The code changes reflect a simple re-structuring that will make future
work easier:

1) Extract method from perform into context specific private method
2) Extract additional attr_reader to allow for common means of using
   instance variables

Refactoring related to #4195
Prior to this commit, there were parameters passed that could be
instead assigned at the beginning of the `#perform` method. In doing,
we have less chatter on the method calls.

This also involved extract additional instance variables that were
commonly used throughout.

Refactoring related to #4195
@jeremyf jeremyf force-pushed the 4195-allow-url-import-job-to-receive-valkyrie-or-activefedora-resource branch from 2734977 to bfd316e Compare February 1, 2020 13:01
@jeremyf
Copy link
Contributor Author

jeremyf commented Feb 1, 2020

CircleCI failed (https://circleci.com/gh/samvera/hyrax/17299) which would likely be solved with #4242

@jcoyne jcoyne merged commit 3429d14 into master Feb 1, 2020
@jcoyne jcoyne deleted the 4195-allow-url-import-job-to-receive-valkyrie-or-activefedora-resource branch February 1, 2020 15:53
jeremyf added a commit to notch8/adventist-dl that referenced this pull request Apr 10, 2023
In v2.9.6 of Hyrax we saw the following error:

> File Import Error
>   Error: wrong number of arguments (given 2, expected 1)

It masks other errors, because the message sending for errors is itself
raising an error.

With this change, we ignore all extra parameters and pass the first
parameter.

Related to:

- samvera/hyrax#2821

Resolved in:

- samvera/hyrax#4243
- samvera/hyrax@bfd316e
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.

2 participants