Skip to content

Rollback may fail at times  #69

@forman

Description

@forman

Describe the bug

In some not-yet-identified cases, an exception is raised during rollback:
TypeError: Transaction._delete_dir() missing 1 required positional argument: 'target_path'

To Reproduce

Cannot reproduce yet.

Expected behavior

A rollback must reliably roll back.

Python Environment

  • operating system: all
  • zappend version: 0.5

Traceback

...
File ~/Projects/zappend/zappend/processor.py:115, in Processor.process_slice(self, slice_obj, slice_index)
    110 verify_append_labels(ctx, slice_dataset)
    112 transaction = Transaction(
    113     ctx.target_dir, ctx.temp_dir, disable_rollback=ctx.disable_rollback
    114 )
--> 115 with transaction as rollback_callback:
    116     if ctx.target_metadata is slice_metadata:
    117         create_target_from_slice(ctx, slice_dataset, rollback_callback)

File ~/Projects/zappend/zappend/fsutil/transaction.py:155, in Transaction.__exit__(self, exc_type, exc_val, exc_tb)
    153             args = record[1:]
    154             action_method = getattr(self, "_" + action)
--> 155             action_method(*args)
    157 if not self._disable_rollback:
    158     self._rollback_dir.delete(recursive=True)

TypeError: Transaction._delete_dir() missing 1 required positional argument: 'target_path'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions