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

Validate connection on Preprocess step #227

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

kspurgin
Copy link
Contributor

@kspurgin kspurgin commented Feb 3, 2025

Connection authentication check was added to all workflow steps in PR 200, but removed (kept in only the processing and transferring steps) as part of refactoring/cleanup in PR 204.

This PR adds this check back to the preprocessing step, on the principle of saving the user time and effort. They should find out about an unusable connection to CollectionSpace ASAP when starting on a batch. If that's not at batch creation time, then it should be in the preprocessing step.

Resolves #226

This *could* be fixed in the collectionspace-mapper (see below) but I
am doing it here on the principle of saving the user time and effort. They
shouldn't have to go through the preprocess step (which can take a few
minutes) and click through to Processing and starting that step to
find out their connection credentials will not let them complete a
batch.

The preprocessing step doesn't require a connection to the
CollectionSpace instance, but it does make calls to methods on the
collectionspace-mapper handler associated with the batch.

On instantiation, the handler class attempts to set instance domain
by calling client.domain, which fails if the client cannot
authenticate. It probably shouldn't do that on instantiation, I will
make a note to improve that later, but again, an unusable connection
should be caught/reported to users ASAP by the importer, which means
at the beginning of preprocessing (if not on batch creation).
@mark-cooper mark-cooper merged commit 9f98aeb into master Feb 4, 2025
1 check passed
@mark-cooper mark-cooper deleted the gh226-check-connection-on-preprocess branch February 4, 2025 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants