Skip to content

[19.0][ADD] data_import_log_fs - #3745

Open
AungKoKoLin1997 wants to merge 1 commit into
OCA:19.0from
AungKoKoLin1997:19.0-add-data_import_log_fs
Open

AungKoKoLin1997 wants to merge 1 commit into
OCA:19.0from
AungKoKoLin1997:19.0-add-data_import_log_fs

Conversation

@AungKoKoLin1997

@AungKoKoLin1997 AungKoKoLin1997 commented Sep 28, 2026 •

Copy link
Copy Markdown

This module picks import files up from a filesystem storage and logs them.

A pick-up definition is a storage backend, the directories a file travels
through, the pattern the files are named by and the layout of their columns. A
scheduled scan lists the incoming directory, skips the files still being
written, creates one import log per file with the file attached, and holds the
file aside while it is imported, so that a later scan neither takes it again
nor overwrites it.

The file is released when its log closes. One that was read is filed as done
whatever became of its units, and the units that were rejected are written back
to the error directory on their own, for the sender to correct and resend. One
that could not be read is moved to the error directory whole. A file whose
earlier import succeeded in full is left where it is.

It relies on data_import_log for the log and on fs_storage for the
transport, which is any filesystem fsspec supports — sftp, S3, or a local
directory.

Depends on #3744

Assisted-by: Claude Opus 5

@qrtl QT7028

@OCA-git-bot OCA-git-bot added series:19.0 mod:data_import_log_fs Module data_import_log_fs labels Sep 28, 2026
@AungKoKoLin1997
AungKoKoLin1997 force-pushed the 19.0-add-data_import_log_fs branch 2 times, most recently from b70b237 to d7c1a25 Compare September 28, 2026 09:40
Pick import files up from a filesystem storage and log them, so that a feed of
files becomes a feed of import logs without either side knowing about the
other: data_import_log stays independent of where a file is stored, and
fs_storage of what the file is for.

A pick-up definition holds the storage, the directories a file travels through
and the pattern its files are named by. The scan skips the files still being
written, which a sender names with a suffix until it has finished, and
recognizes a file it has already imported in full by the hash of its content
rather than by its name alone.

A file is held aside while it is imported, so a scan running before that import
has finished neither takes it again nor overwrites it, and is released only
when the log is closed. A file that was read is filed as done whatever became
of its units, with the rejected ones written back on their own for the sender
to correct; a file that could not be read is isolated whole.

Assisted-by: Claude Opus 5
@AungKoKoLin1997
AungKoKoLin1997 force-pushed the 19.0-add-data_import_log_fs branch from d7c1a25 to 4879dc8 Compare September 29, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:data_import_log_fs Module data_import_log_fs series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants