Skip to content

Revert dspace oai harvesting to list method#342

Merged
ghukill merged 1 commit into
mainfrom
TIMX-627-dspace-oai-use-default-list-method
May 12, 2026
Merged

Revert dspace oai harvesting to list method#342
ghukill merged 1 commit into
mainfrom
TIMX-627-dspace-oai-use-default-list-method

Conversation

@ghukill

@ghukill ghukill commented May 12, 2026

Copy link
Copy Markdown
Contributor

Purpose and background context

Why these changes are being introduced:

As we update to DSpace CRIS (8), running some test harvests and revisiting dspace OAI harvesting configurations. We were using --method=get, but it appears this is no longer needed. Doubly so given that we are not providing any records to skip, which relied on that method.

By removing --method=..., we default to list approach, which is orders of magnitude faster and more efficient to DSpace server.

How this addresses that need:

  • Removes dspace from list of sources that should get --method=get passed for OAI harvester CLI command.

Note: we currently have daily dspace runs in TIMDEX paused during the migration. While I have confirmed that the default --method=list method does in fact work for DSpace 6, it's ultimately moot. This will not get run for dspace until we start our daily harvests again.

How can a reviewer manually see the effects of these changes?

1- Build AWS SAM

make sam-build

Note: follow these instructions if having any issues getting SAM to run.

2- Invoke with payload:

echo '{"next-step": "extract", "run-date": "2026-05-12", "run-type": "full", "source": "dspace", "verbose": "true", "oai-pmh-host": "https://mit.dspace.not.real/oai", "oai-metadata-format": "mets"}' | sam local invoke -e -

Response (formatted):

{
  "next-step": "transform",
  "run-date": "2026-05-12",
  "run-type": "full",
  "run-id": "92bd59b4-2d24-4e3c-a147-0e3bacccaf59",
  "source": "dspace",
  "verbose": true,
  "harvester-type": "oai",
  "extract": {
    "extract-command": [
      "--verbose",
      "--host=https://mit.dspace.not.real/oai",
      "--output-file=s3://timdex-bucket/dspace/dspace-2026-05-12-full-extracted-records-to-index.xml",
      "harvest",
      "--metadata-format=mets",
      "--exclude-deleted"
    ]
  }
}

Note that --method=get is not present in the OAI harvester CLI command, where it was formerly.

Includes new or updated dependencies?

YES

Changes expectations for external applications?

YES: DSpace will no longer harvest via ListIdentifiers + GetRecord but will instead default to ListRecords.

What are the relevant tickets?

Code review

  • Code review best practices are documented here and you are encouraged to have a constructive dialogue with your reviewers about their preferences and expectations.

Why these changes are being introduced:

As we update to DSpace CRIS (8), running some test harvests and revisiting dspace
OAI harvesting configurations.  We were using `--method=get`, but it appears this
is no longer needed.  Doubly so given that we are not providing any records to
skip, which relied on that method.

By removing `--method=...`, we default to `list` approach, which is orders of
magnitude faster and more efficient to DSpace server.

How this addresses that need:

*  Removes `dspace` from list of sources that should get `--method=get` passed for
OAI harvester CLI command.

Side effects of this change:
* DSpace will no longer harvest via `ListIdentifiers` + `GetRecord` but will instead
default to `ListRecords`.

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-627
@ghukill ghukill requested a review from a team as a code owner May 12, 2026 19:24
@ghukill ghukill merged commit 760003e into main May 12, 2026
5 checks passed
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.

3 participants