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

19105 Use Drupal entity API for harvest_runs table, with refactor #4144

Merged
merged 63 commits into from
Apr 17, 2024

Conversation

paul-m
Copy link
Contributor

@paul-m paul-m commented Mar 13, 2024

  • Creates an entity called harvest_run. This entity has the following features:
    • Various UUID-oriented fields from the JSON data blob are normalized into the following base fields with unlimited cardinality:
      • extracted_uuid
      • load_new_uuid
      • load_updated_uuid
      • load_unchanged_uuid
      • orphan_uuid
    • This allows for instance doing a normalized query to find which run created which dataset, etc.
    • Data not stored in entity base fields remains in the JSON blob, which is written to a column called data.
  • Many calls to HarvestService::getAllHarvestRunInfo() only need the IDs, so add HarvestService::getAllHarvestRunIds() so we can just do an entity query for IDs without the overhead of loading entities or parsing JSON.
  • Do entity conversion on update.
  • Add HarvestRunRepository for ease of calling between HarvestService and HarvestRun entity methods.
  • Some refactor of harvest Drush commands
  • Update HarvestService to use new run repo.
  • Update HarvestUtility for the new run repo.
  • Update tests to use run entity/repo.

@paul-m paul-m changed the title 19105 Use Drupal entity API for harvest_runs table, bonus points 19105 Use Drupal entity API for harvest_runs table, full refactor Apr 4, 2024
@paul-m paul-m changed the title 19105 Use Drupal entity API for harvest_runs table, full refactor 19105 Use Drupal entity API for harvest_runs table, with refactor Apr 4, 2024
@paul-m paul-m marked this pull request as ready for review April 5, 2024 18:25
@paul-m paul-m requested a review from dafeder April 8, 2024 16:39
Copy link
Member

@dafeder dafeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have a winner

@dafeder dafeder merged commit 4f9c999 into 2.x Apr 17, 2024
10 checks passed
@dafeder dafeder deleted the 19105-harvest-runs-entity-wide branch April 17, 2024 15:52
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