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

Use literal identifier for ImportJobStoreFactory #4083

Merged
merged 8 commits into from
Jan 8, 2024

Conversation

paul-m
Copy link
Contributor

@paul-m paul-m commented Dec 18, 2023

Moves some table logic from JobStoreFactory to DeprecatedJobStoreFactoryTrait. This trait contains all the behavior we want to leave behind, for both deprecated table names, and deriving the table name from an identifier.

Adds AbstractJobStoreFactory, which allows subclasses to dictate the table name. Also uses DeprecatedJobStoreFactoryTrait as a fallback to performs all the logic for determining the table name.

Adds ImportJobStoreFactory, which is a subclass of AbstractJobStoreFactory. This hard-codes the table name as jobstore_2613055649_importjob for historical reasons.

Adds dkan.datastore.import_job_store_factory service, which is ImportJobStoreFactory.

Deprecates JobStoreFactory, which now basically only uses DeprecatedJobStoreFactoryTrait.

Finds all code occurrences which uses the old calling system like this: $this->jobStoreFactory->getInstance(ImportJob::class), and replaces them with $this->importJobStoreFactory->getInstance(). This includes replacing or adding the import job store factory service.

Updates tests to pass.

Adds tests for AbstractJobStoreFactory.

@paul-m paul-m marked this pull request as ready for review December 26, 2023 21:30
@paul-m paul-m requested a review from dafeder December 28, 2023 16:35
@janette janette merged commit c2ae3b5 into 2.x Jan 8, 2024
12 checks passed
@dafeder dafeder deleted the 17149-importjobstorefactory-literal branch January 9, 2024 15:29
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.

None yet

2 participants