Skip to content

MICNO-684: Added check that input file not already exist in input_dir/archive#157

Merged
linnbjornerud merged 2 commits intomainfrom
archived-files
Mar 27, 2025
Merged

MICNO-684: Added check that input file not already exist in input_dir/archive#157
linnbjornerud merged 2 commits intomainfrom
archived-files

Conversation

@linnbjornerud
Copy link
Contributor

Added a small check that a dataset does not already exist in input_dir/archive before moving it there.

This is to avoid error when trying to reimport a dataset that is already in the archived-folder (i.e. from a previously failed import).
Since datastore admin allows reimport of archived files/failed imports, now job-executor will only try to import the archived dataset even if a dataset with the same name also exists in the input directory. And there will be no conflicts.

If I have understood the dataflow and problem correctly - is this a sufficient solution?

@linnbjornerud linnbjornerud requested a review from a team as a code owner March 27, 2025 13:40
Copy link
Collaborator

@DanielElisenberg DanielElisenberg left a comment

Choose a reason for hiding this comment

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

This is so simple and does actually fix the whole issue 💯 10/10 would review again

Co-authored-by: Daniel Elisenberg <33904479+DanielElisenberg@users.noreply.github.com>
@sonarqubecloud
Copy link

Copy link
Collaborator

@DanielElisenberg DanielElisenberg left a comment

Choose a reason for hiding this comment

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

Actually got to review it again 🎉
Still 10/10

@linnbjornerud linnbjornerud merged commit c911859 into main Mar 27, 2025
6 checks passed
@linnbjornerud linnbjornerud deleted the archived-files branch March 27, 2025 13:57
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