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

ORM: Fix ProcessNode.get_builder_restart #6284

Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Feb 9, 2024

Fixes #5977

The get_builder_restart would fail if the process input specification contained the inputs of a CalcJob. The method would first assign the regular inputs to the builder followed by the metadata. However, each time the builder is updated, the validation is triggered. The normal inputs do not contain the required metadata, such as the resources option, causing the validation to fail.

The solution is to update the builder with the complete set of inputs in one go, merging the normal inputs with the metadata inputs prior to that.

@sphuber sphuber force-pushed the fix/5977/get-builder-restart-metadata branch from a98fe31 to 1640f99 Compare February 9, 2024 21:10
@sphuber sphuber requested a review from mbercx February 12, 2024 08:24
@sphuber
Copy link
Contributor Author

sphuber commented Feb 12, 2024

@mbercx this should fix the issue you opened. Got a reproducible case from someone else and they confirm that this fix solves the problem.

@sphuber
Copy link
Contributor Author

sphuber commented Feb 23, 2024

@mbercx want to have a look at this? Otherwise I am going to merge this

The `get_builder_restart` would fail if the process input specification
contained the inputs of a `CalcJob`. The method would first assign the
regular inputs to the builder followed by the metadata. However, each
time the builder is updated, the validation is triggered. The normal
inputs do not contain the required metadata, such as the `resources`
option, causing the validation to fail.

The solution is to update the builder with the complete set of inputs in
one go, merging the normal inputs with the metadata inputs prior to that.
@sphuber sphuber force-pushed the fix/5977/get-builder-restart-metadata branch from 1640f99 to 9bdcc09 Compare February 23, 2024 11:14
@sphuber sphuber merged commit 0dee9d8 into aiidateam:main Feb 28, 2024
19 checks passed
@sphuber sphuber deleted the fix/5977/get-builder-restart-metadata branch February 28, 2024 09:24
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.

get_builder_restart() failing due to absence of resources
1 participant