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

Option-forked nodeblock missing resource name reporting #2028

Merged
merged 5 commits into from
Dec 14, 2023

Conversation

nx10
Copy link
Contributor

@nx10 nx10 commented Dec 6, 2023

Description & Technical details

Option-forked nodeblock lists only report the name of the last nodeblock in the list when a missing resource is reported.

E.g.:

Users will see

LookupError: When trying to connect one of the node blocks 'bold_mask_ccs' to workflow 'cpac_sub-01_ses-1' after node block 'motion_estimate_filter': 

[!] C-PAC says: None of the listed resources are in the resource pool:

['space-template_desc-T1w_mask']

while the nodeblock not necessarily has anything to do with the missing resource.

Now they will see:

LookupError: When trying to connect one of the node blocks ['bold_mask_afni', 'bold_mask_fsl', 'bold_mask_fsl_afni', 'bold_mask_anatomical_refined', 'bold_mask_anatomical_based', 'bold_mask_anatomical_resampled', 'bold_mask_ccs'] to workflow 'cpac_sub-01_ses-1' after node block 'motion_estimate_filter': 

[!] C-PAC says: None of the listed resources are in the resource pool:

['space-template_desc-T1w_mask']

Which is also not ideal, as it also does not point to the specific nodeblock that causes the problem, but at least it will contain it.

To properly point the issue-causing one out bigger engine modifications are necessary (such as appending nodeblock information to the LookupError as it happens).

Generally the mechanism by which some NodeBlock instances can be lists of nodeblocks while others are single ones might be worth to restructure a bit as in this loop every time a local field like name is set it will end up being the name of the last nodeblock in that list which could cause similar unexpected behavior throughout the codebase.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@sgiavasis sgiavasis merged commit 2f21586 into develop Dec 14, 2023
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants