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

Cannot sort Channel #109

Closed
maxulysse opened this issue Aug 28, 2023 · 20 comments
Closed

Cannot sort Channel #109

maxulysse opened this issue Aug 28, 2023 · 20 comments
Labels

Comments

@maxulysse
Copy link

Hej,

I'm seeing this warning, while trying to make a test at the workflow level, any idea on how to deal with it?

Warning: Cannot sort channel, order not deterministic. Unsupported objects types: class org.apache.groovy.json.internal.LazyMap vs. class org.apache.groovy.json.internal.LazyMap

@lukfor
Copy link
Collaborator

lukfor commented Aug 28, 2023

Thanks for reporting this. do you have an example at hand or a link to the test file?

@maxulysse
Copy link
Author

yes, I'm currently trying to use nf-test to assess workflows in the fetchngs pipeline cf nf-core/fetchngs#191

@lukfor
Copy link
Collaborator

lukfor commented Aug 28, 2023

Thanks! I will look into this. I think it depends on the nested elements of the output channel.

I noticed you disabled autoSort in nf-test.config for all testcases. If you add for exampple process.out to a snapshot, this could lead to failed tests, because the order of elements is not deterministic without sorting. Thus, the order in the snapshot could be different as the order of the current test run.

@maxulysse
Copy link
Author

Yeah, I disabled autoSort to get rid of the warning.
Since it couldn't sort, the workflow.out snapshot were failing anyway, so I'm currently just looking at the files.

@lukfor lukfor added the nf-core label Aug 28, 2023
@maxulysse
Copy link
Author

made a more tiny reproducible example: https://github.com/maxulysse/nf-test_109

@lukfor
Copy link
Collaborator

lukfor commented Aug 29, 2023

Thanks, this helps us a lot! 🙌

A first try with this fix seems to solve the auto-sort problem.But I will check it again tomorrow 👍

However, I noticed that the zip files (e.g. test_pair_1_fastqc.zip) have a different md5 on each run. Thus, the snapshot matching failes :/

@maxulysse
Copy link
Author

yeah, but no worries about that, my plan was to catch the snapshot of the versions, not the zip.

@lukfor
Copy link
Collaborator

lukfor commented Aug 30, 2023

PR #115 should fix this issues. Same here, I'm leaving the issue open until we create a new release and you confirm its resolution.

@lukfor
Copy link
Collaborator

lukfor commented Sep 8, 2023

We have just released RC1 of version 0.8.0 🎉
This is a pre-release and can be installed using the following command:

curl -fsSL https://code.askimed.com/install/nf-test | bash -s 0.8.0-rc1

If everything works as expected, please feel free to close this issue. Thanks for your support! 🙏

@adamrtalbot
Copy link

I'm still seeing this problem on v0.8.0 rc1 when I'm using a channel of 1 file with the same name (versions.yml and different md5 values:

https://github.com/nf-core/modules/actions/runs/6147043260/job/16677642592?pr=3809

@lukfor
Copy link
Collaborator

lukfor commented Sep 11, 2023

Thank you for testing! 👍 Did you recreate the snapshots with v0.8.0 rc1? Since nf-test < 0.8.0 created unsorted snapshots.

@adamrtalbot
Copy link

Yep - interestingly the test runs fine on my laptop (Mac) but not the Github Action runner.

@lukfor
Copy link
Collaborator

lukfor commented Sep 11, 2023

Thanks 👍 I will look at it in detail

@adamrtalbot
Copy link

Thank you!

Related PR: nf-core/modules#3809

@maxulysse
Copy link
Author

Still having the issue as well: nf-core/fetchngs#192

@drpatelh
Copy link

Hola @lukfor ! We are trying to finalise our nf-test implementation in the nf-core/fetchngs pipeline before the Hackathon and this is the only remaining issue (for now) that we would love to see fixed and in a release. Would you have any timeline for when you can squeeze this in? Thank you!

@lukfor
Copy link
Collaborator

lukfor commented Sep 22, 2023

Hi guys, I was unfortunately very busy the last few weeks 🤯 I'll see that I have a release ready by the beginning of next week. Maybe I will find some time on the weekend 🚀

@lukfor
Copy link
Collaborator

lukfor commented Sep 23, 2023

I have just built 0.8.0-rc2. You can install it as follows:

curl -fsSL https://code.askimed.com/install/nf-test | bash -s 0.8.0-rc2

The snapshots have to be recreated and then it should now work with the versions channel.

If this fixes your issues, I will build and release 0.8.0 👍

@maxulysse
Copy link
Author

I'll test it right away

@maxulysse
Copy link
Author

looking good for me: nf-core/fetchngs#201

@lukfor lukfor closed this as completed Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants