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

refactor(xmlupload): refactor resource creation #917

Merged
merged 76 commits into from May 8, 2024

Conversation

jnussbaum
Copy link
Collaborator

@jnussbaum jnussbaum commented Apr 22, 2024

Problem statement

The processes of xmlupload during resource creation are not tested, because they are not testable. It is unclear if the error handling, the preservation of the current state, and the user communication are correct.

Approach

Make the UploadState mutable, and create it at the very beginning at a high level. Then, modify it in the lower level functions. This allows testing the higher level functions, using mocking.

Challenges

The things stored in UploadState must be slightly rearranged. So the new DSP-TOOLS version won't be able to continue an xmlupload aborted with an older version. -> Don't forget to inform RDU.

Because of logging/printing, _tidy_up_resource_creation_idempotent() is not really idempotent any more.

@jnussbaum jnussbaum self-assigned this Apr 22, 2024
Copy link

linear bot commented Apr 22, 2024

@jnussbaum jnussbaum enabled auto-merge (squash) May 8, 2024 08:34
@jnussbaum jnussbaum merged commit cdad095 into main May 8, 2024
9 checks passed
@jnussbaum jnussbaum deleted the wip/DEV-3522-refactor-resource-creation branch May 8, 2024 08:36
@daschbot daschbot mentioned this pull request May 8, 2024
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.

None yet

2 participants