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

Add Delete Mode #283

Merged
merged 7 commits into from
Oct 1, 2024
Merged

Add Delete Mode #283

merged 7 commits into from
Oct 1, 2024

Conversation

alanking
Copy link
Collaborator

@alanking alanking commented Sep 27, 2024

Addresses #48
Addresses #235
Addresses #281

I'm okay with squashing commits, but I tried to break them up into logical pieces. Not sure how successful that was.

Old tests are passing.

New tests are passing... almost. There are a couple of things to note about the new tests:

  1. There are a LOT of assertions I would like to add regarding what the ingest jobs create in iRODS. So far, it does the bare minimum assertions to make sure collections are being created and deleted appropriately.
  2. There are two tests which fail sometimes. test_PUT_APPEND_and_TRASH_deletes_collections and test_PUT_SYNC_and_TRASH_deletes_collections. The other tests pass consistently, so I think it has to do with the TRASH delete mode. I'll be investigating this.

There's no Delete Mode for S3 buckets yet. See #282.

@trel
Copy link
Member

trel commented Sep 28, 2024

the 'two' tests you mention above... have the same name.

@alanking
Copy link
Collaborator Author

Ah... fixed now. Thanks

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
irods_capability_automated_ingest/tasks/delete_tasks.py Outdated Show resolved Hide resolved
irods_capability_automated_ingest/tasks/delete_tasks.py Outdated Show resolved Hide resolved
@alanking
Copy link
Collaborator Author

I think I've fixed the occasionally failing tests. It seems that it had something to do with the queues the workers are listening to. The spurious failures are gone now.

@trel
Copy link
Member

trel commented Sep 28, 2024

looking good.

@alanking
Copy link
Collaborator Author

Spurious failures turns out to not have been fixed, but now are fixed. It had to do with the order of operations of removing the parent collection after removing data objects. Removing a subcollection needs to also try to remove its own parent collection as long as it's empty and not the root target collection.

I also fixed the /tmp mount directory on the host used by the old test suite because it made me angry. I think this is officially ready for review.

@alanking alanking marked this pull request as ready for review September 30, 2024 16:45
@trel
Copy link
Member

trel commented Sep 30, 2024

i'm happy with it if all the things are behaving.

Copy link
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Still need to review one file. Will do that a little later.

Copy link
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Good stuff.

@korydraughn
Copy link
Contributor

If the tests are passing, squash to taste.

@alanking
Copy link
Collaborator Author

alanking commented Oct 1, 2024

Tests are passing. Squashed.

Copy link
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Pound it!

This commit renames the filesystem_sync and s3_bucket_sync task modules
to filesystem_tasks and s3_bucket_tasks. The Celery application and sync
script utilities have been updated accordingly.
This will act as a sort of requirements document.
This commit adds a base set of tests for the Delete Mode feature. The
tests exercise basic functionality and interactions between the Operations
and Delete Modes.

This adds a new test file, so the ingest-test Docker instructions have been
updated. The ingest-test project now runs both test suites.
This commit adds a new set of tasks to the Automated Ingest Celery
application.

It also affords two new Events - data_obj_delete and coll_delete.
This comes with its own event handlers. The Delete Mode can be set
with a new event handler method named delete_mode which returns a
member of a new enum in utils named DeleteMode.
This removes the /tmp/mountdir Docker volume mount on the host machine.
@alanking
Copy link
Collaborator Author

alanking commented Oct 1, 2024

#'d. Mergin

@alanking alanking merged commit 31a1784 into irods:main Oct 1, 2024
@alanking alanking deleted the 48.m branch October 1, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants