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

FileFetcher should always reflect use-local-file config #4035

Merged
merged 38 commits into from
Nov 3, 2023

Conversation

paul-m
Copy link
Contributor

@paul-m paul-m commented Oct 6, 2023

Depends on GetDKAN/file-fetcher#32

Since FileFetcher is an AbstractPersistentJob, any part of DKAN which creates a FileFetcher object will end up persisting that object within the database.

This means that if you were to check the status of a file being fetched (which will create a FileFetcher object), and then changed the configuration to always use local files, that configuration would be ignored on all subsequent calls to create a FileFetcher object for that file.

One solution to this would be to refactor the way such status items are checked. This requires a great deal of refactoring.

Instead, this PR subclasses FileFetcher and allows for changing the way the file is fetched to reflect the runtime configuration.

@paul-m paul-m changed the title dataset_info service should only report and not modify FileFetcher should always reflect use-local-file config Oct 29, 2023
Copy link
Contributor

@jastraat jastraat left a comment

Choose a reason for hiding this comment

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

These changes work when added to PDC, so no problem there.

@paul-m paul-m marked this pull request as ready for review October 31, 2023 16:49
@dafeder dafeder merged commit 2be99b4 into 2.x Nov 3, 2023
12 checks passed
@dafeder dafeder deleted the 17093-importinfo-refactor branch November 3, 2023 21:37
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

3 participants