-
-
Notifications
You must be signed in to change notification settings - Fork 25
Refactor editor save/update behaviour to use promise-based utilities #2805
Description
This PR will connect the new lower-level classes from #2804 to the editor save behaviour so dataset submission and update handling are more reliable.
Right now, editor saving is coordinated across DataPackage, DataONEObject, EML211, and related models using listeners, callbacks, and upload-status flags. That makes it difficult to reason about failure cases and is a likely cause of several bugs we are seeing with dataset submissions.
This PR will introduce a new orchestration layer for package writes and use it to replace the current listener-driven save/update process.
This PR will include:
- A new
DataPackageServiceclass to coordinate package write operations. - A promise-based save/update flow for packages that performs operations in a defined order:
- data object creates/replacements
- metadata create/replacement
- resource map create/replacement
- Clear failure behaviour so the package save stops at the correct stage instead of continuing after partial failure.
- Resource map validation before submission.
- Improved network and submission error handling so failures are surfaced more clearly to the user.
- Refactoring of the current editor save path to delegate transport, sysmeta updates, and package write orchestration to
DataPackageService. - Reduced responsibility in
DataPackagefor serialization, transport, and workflow coordination. - Unit tests for the new orchestration logic and failure scenarios.
The purpose of this PR is to make saving and updating data packages more deterministic and testable, and less likely to leave datasets in a broken partial state.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status