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

Issue 1827: The wrong URLs are being used to deposit. #1831

Merged
merged 6 commits into from
Jul 10, 2023

Conversation

kaladay
Copy link
Contributor

@kaladay kaladay commented Jun 30, 2023

resolves #1827

The current behavior is to set the URL to contain servicedocument, such as http://example.com/sword/servicedocument) to perform the testing.
This ends up being used by both the getCollections() and deposit() end points.

If the Repository URL is set to say http://example.com/sword/servicedocument, then this works for the getCollections() but causes problems for the deposit() end points.

The Repository URL ends up getting used in the deposit() end point but everything except for the host name and port are stripped off.
This leads to confusing error messages and reporting that makes it look like the /deposit end point is not being used.

This end point ends up being used after all but through the sword client via the service document manifest.

The previous behavior of expecting http://example.com/sword and appending /servicedocument and /deposit is reverted. The configuration for single url is no longer needed now that the problem has been identified and that commit has also been reverted.

The current behavior is to set the URL to `servicedocument` to perform the testing.
This ends up being used by both the `getCollections()` and `deposit()` end points.

If the Repository URL is set to say `http://example.com/sword/servicedocument`, then this works for the `getCollections()` and breaks for the `deposit()` end points.
If the Repository URL is set to say `http://example.com/sword/deposit`, then this breaks  for the `getCollections()` and works for the `deposit()` end points.

Both need to work.
Change the Repository URL configuration design to instead except a Repository URL of `http://example.com/sword/`.
Now, when `getCollections()` end point is called, it appends the `/servicedocument` to that URL.
Now, when `deposit()` end point is called, it appends the `/deposit` to that URL.

This could be simplified further to append to not have the `/sword` and then append that as needed.
However, this change is considered out of scope and is left for future discussion.
@kaladay kaladay linked an issue Jun 30, 2023 that may be closed by this pull request
… behavior.

Add a configuration file witht he configuration `vireo.depositor.swordv1.single-url` to designate how to handle the URL.
This allows for backwards compatibility in case the new behavior is a problem in some system.

The `SWORDv1Depositor` itself is not detectable by Spring and so `@Autowired` does not work.
Fix this by adding an `@Bean` in the configuration and calling that loader instead of `new SWORDv1Depositor()` in the system data loader.
…tory URL behavior."

This reverts commit be86fa3.

The reverted commit is not needed now that the problem is identified to be that the repositoryUrl is not being used as original expected.
Partially restore the previous behavior of using the `/servicedocument`.
It turns out that while the repository URL gets used, it gets stripped to just the host name and port number during deposit.
The swordv1 library ends up adding the deposit location from the service document manifest.

Using the Repository URL in the error logs is misleading and confusing.
Change the behavior to better describe what the given URL is on error.
The sword handles the actual deposit location internally and is not as readily available for use in the error log.
@kaladay kaladay requested a review from rmathew1011 July 7, 2023 19:32
@kaladay kaladay merged commit ca275ae into 4.2.3_staging Jul 10, 2023
@kaladay kaladay deleted the 1827-deposit_location-publish-501 branch July 11, 2023 15:06
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.

Deposit Location Publishing is failing with 500.
3 participants