I don’t know who or what happened to the modules C...
# modules
m
I don’t know who or what happened to the modules CI, but I’m not sure I’m liking the change 🤔 The previous iteration resulted in more jobs, but it was also clearer to see what was failing exactly
n
You can still click on the failing tests to see what exactly is failing :)
m
I know, but instead of ‘at a glance’ you have to scroll through an endless log
🤔 1
n
Hmm good point, but for most PRs this shouldn't be an issue?
I'm wondering if we could increase the shard size dependent on the amount of tests that need to be run 🤔
m
my mega PR could be an edgecase though
n
yep most PRs are not that big 😁
m
if only someone could be a merge-cowboy and be done with it
🤣 2
n
Gotta fix your tests first 😉
e
Commented back, in a case like this I think we should've given up on CI a long time ago and just posted the GitPod screenshot
m
Merge it, do it now!
It’s a relief to get that one of my back
3 frickin’ weeks of fixing tests...
❤️ 1
n
merged
e
How important are the GATK4 updates?
m
Depends on the update 🤷🏻
I don’t think they’re really adhering to the semantic versioning, since they’ve just deprecated a tool in this point release
😂 2
shocked 1
e
Just wondering on the renovate front, but it should come in once a month
m
There’s no real timed release cycle, so I think it’ll be some time before there’s another update
(I hope)
e
Going back to the original post and @James Fellows Yates: Working on adopting nf-test sharding, so we kill less polarbears by running multiple jobs on a CI job. Should also be faster and clog up less per @Simon Pearce https://github.com/nf-core/modules/issues/7018 Looks bad for the moment but the jobs are quick and @mashehu is working on a smarter number of shards. Just taking it one step at a time because these CI changes get complicated to test the tests themselves when you try to make all of the changes at once.
👍 1
m
Maybe we can add the basic summary we have in #sarek for now?
maxime 3
s
Sarek is using it
Sarek is using it
j
Huh does spinning up loads more short VMs (presumably) kill less polar bears than one long one? Although I'm not complaining with shorter tests ;)
Was there a big 'ping whole channel' announcement of this testing that I missed?
s
Sarek is using it
e
Huh does spinning up loads more short VMs (presumably) kill less polar bears than one long one?
Idk if it really spins up a VM behind the scenes. @Adam Talbot had a lot of insight into it, I think the TLDR of it is each action yaml file get's it's own VM. Hence why everything was in one file. So technically we might spin up a pytest-workflow VM every-time, but we're probably never scaling it, and we can make the trade off and focus on being more efficient with our nf-test tests. There's also the GPU tests now, which have completely separate runners that have to spin up. In summary, there's a couple of things the get "spun" up. 1. The runners (An EC2 instance) 2. The jobs(which how the get passed to different runners is the confusing bit) The number of jobs doesn't really matter, it's about the number of runners idling IMO. See the chart for an example, the CPUs are sipping a third of the power idling(which it's not like they're turning them on and off at AWS anyways 😆) So we can optimize for: 1. Developer time(failed CI because who knows, waiting for tests to pass, rerunning tests) 2. % of Runner usage 3. Being most "efficient" in the 1-to-1 match with jobs and tests The third IMO just makes us feel good, but isn't actually the best, because we end up just using CI time testing the "modules that changed" when a PR branch get's out of date, or re-running for conda errors. There's bigger fish to fry is what I'm trying to get across. All that considering these are 2 CPU jobs that we're spinning up, and if you're talking about nf-core's overall global carbon footprint we could probably do a lot more bang for our buck focusing on https://github.com/nf-core/modules/issues/6629 not optimizing our module testing. So I'd be interested in opinions on where to focus given our limited resource is time. Should we focus on figuring out how to actually track our GitHub action CO2 emissions, focus on making progress on developer experience and hope it evens out in the case we're actually being less efficient?
Was there a big 'ping whole channel' announcement of this testing that I missed?
No there was not. There's been a lot of discussion in the PR and various slack threads https://github.com/nf-core/modules/pull/6286 if anyone wants to catch up on the discussion, but I didn't hear anyone holding back on update anymore, and got tired of the PR getting out of date, and wasting more time merging in CI changes.
👍 1
s
It was mentioned on #wg-modules-update
e
I think the takeaway I'm getting is we need to do a better job of tracking these things and have some more insight into our GitHub actions usage so we can know if changes are making these things better or worse actually and not theorizing.
🙌 1
Other aspect that you may be missing @James Fellows Yates is https://github.com/nf-core/modules/blob/1999eff2c530b2b185a25cc42117a1686f09b685/.github/workflows/nf-test.yml#L58-L61 Set the number of shards to 5 to start to avoid the GitHub runners crashing because they run out of space if there's too many tests per runner. I didn't want to merge this and wake up with a bunch of pings of "Why are my tests failing?", instead there were 2 of "Why are there so many jobs?".
😆 1
👍 1
a
> Huh does spinning up loads more short VMs (presumably) kill less polar bears than one long one?
Idk if it really spins up a VM behind the scenes. @Adam Talbot had a lot of insight into it, I think the TLDR of it is each action yaml file get's it's own VM. Hence why everything was in one file.
Each job item gets it's own VM, with each item in the matrix being considered 1 job. Therefore you get 1 * number of jobs VMs. Previously this meant 1 vm to check for changes, 1 vm to check for completion at the end, plus whatever tasks were ran. In terms of which is better for polar bears, it's hard to quantify. All these machines are sat idle on Azure (GHA) or AWS (nf-core self hosted) anyway, they're virtual slices of larger machines that already exist so we can't control that. We pay an overhead for every machine we spin up (install Nextflow, nf-core, nf-test etc) but we get it back when there are few tasks. If a single nf-test is triggered, we will install Nextflow 3 times (conda, singularity, docker) and with the new method we will install it 15 times. On the other hand, when there are more than 13 jobs, we will spend less time performing the overheads. Complexity and turnaround time will decrease, which is a good thing, but visibility goes down. I would focus on developer experience first because the worst thing for killing polar bears is having to do something 3 million times because it's not obvious what the problem is.
❤️ 2
j
Thanks for the clarifications all!
a
Also, polar bears eat seals and seals are way more cute.
m
Yeah but seals eat penguins and they are the cutest
m
baby seal
s
penguin
m
penguin batman
😆 2
@mashehu /@Edmund, most jobs seem to be failing now.
Copy code
File was unable to be removed Error: EACCES: permission denied, rmdir '/opt/actions-runner/_work/modules/modules/~/tests/b40b8b32f66f0fcbee77a801ab0b4b8b/work/53/776cd4b431c0beea7deabcafe031e9'
a
Link?
m
yep, that one
and multiple other PR’s
a
Interesting, this is nothing to do with nf-test. It's failing way before it gets that far
"interesting" like a contagious disease is interesting
😆 5
Copy code
/usr/bin/git clean -ffdx
  warning: failed to remove ~/tests/ce86f02e6ade16371c1d4c7ce8553def/work/67/7603c0ec921804d4dfaa5eecb30443/test.md5: Permission denied
  warning: failed to remove ~/tests/ce86f02e6ade16371c1d4c7ce8553def/work/67/7603c0ec921804d4dfaa5eecb30443/test_1.fastq.gz: Permission denied
  // repeated a bunch more times
  warning: failed to remove ~/tests/ce86f02e6ade16371c1d4c7ce8553def/work/67/7603c0ec921804d4dfaa5eecb30443/.command.sh: Permission denied
  Removing .nf-test-1e247c80cacf91ffbfd4d4214a3b2ab4.nf
  // repeated a bunch more times
  Removing .nf-test-f6bd83ade916ce1b4896170b6a33c77b.nf
  Removing .nf-test.log
  Removing .nf-test/
  Removing ~/tests/ce86f02e6ade16371c1d4c7ce8553def/work/stage-a527d840-276c-4640-9138-d3b4ffd63970
  Removing ~/tests/ce86f02e6ade16371c1d4c7ce8553def/meta
  Removing ~/tests/ce86f02e6ade16371c1d4c7ce8553def/output
  Removing ~/tests/ce86f02e6ade16371c1d4c7ce8553def/.nextflow
  Removing ~/tests/cd8e4969e48fe8280406fc7b5dd4d3fe
  // repeated a bunch more times
  Removing ~/tests/e7d38eadbb75d173e6ef5ec73260da03
On the self-hosted runners, it's re-using the existing working directory. it has to clean them before running but it isn't the owner, so it fails.
It's running now, did you make any changes or just kick it off again? https://github.com/nf-core/modules/actions/runs/11931048374/job/33253101062?pr=7026
m
I pushed some commits just now
m
"interesting" like a contagious disease is interesting
that's the kind of interesting I like
a
so is it random failure?
m
the jobs seem to be running now 🤷🏻
a
it looks like when a job is resubmitted to an existing runner
that has already been used, so there's an element of chance in it
m
message from beyond the baby-veil: yes, the problem is if a previously used runner is reused. should be solved by https://github.com/nf-core/modules/blob/master/.github/actions/nf-test-action/action.yml#L96-L100 but maybe with the split up not all jobs clean up nicely after them.
over and out
a
Shall we add this at the beginning as a failsafe? https://github.com/marketplace/actions/clean-workspace
👍🏻 2
f
Will you ping again when this is fixed? I have a couple of open PRs and would only continue with them when I know the CI is back and running 😅
a
Open them now, I've lost track of the CI/CD failures and more errors are good
f
The PRs are already open, but here is one which looks weird to me: https://github.com/nf-core/modules/pull/6584
And basically all gpu based modules (parabricks), example: https://github.com/nf-core/modules/pull/6996
a
What am I missing?
Could @Famke Bäuerle or @Matthias De Smet cherry pick this commit? Might need to
git fetch
git cherry-pick a9f36eac0178b8b18f08e943b9080555a42843ce
a
No cherry-pick, you stole my commit sadpanda
😭 2
m
sowwy 🥺
a
I'll get over it...eventually.
m
Yeah, I’m not sure how the whole cherry picking works, so I’d rather not touch it
a
Lookin' good so far
m
Seems to do it’s thing indeed 👍🏻
Now all that’s left is to fix the GPU stuff
e
What did I miss
a
Need to purge the working dir before running the GHA, we can use this: https://github.com/nf-core/modules/pull/7026/commits/c881deeb9d6c379e3af881da1d632c99dc2c30f5
But also fix the GPU stuff
e
Okay so first one is in. Second one, the GPU stuff meaning modules that are GPU dependancies?
a
Okay so first one is in
Not yet - still blocked by rules and passing tests and stuff
e
a
tbh I'm a bit lost
e
Okay I think I'm on the same page now, even if it's the wrong page.
https://github.com/nf-core/modules/pull/7033/checks Nothing in this world is free. That action wants to build a Dockerfile everytime
a
Is that much worse than installing nextflow + nf-core + nf-test + software packaging tool every time?
toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading:
Oh
e
Yeah that
a
😠
e
Accidentally pushed my fix to master while trying to make a PR flushed cowboy
So we’ll see it that works?
a
yolo, I guess
it's just running
rm -rf
, what could possibly go wrong?
e
Copy code
Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/opt/actions-runner/_work/modules/modules/.github/actions/self-hosted-cleanup'. Did you forget to run actions/checkout before running your local action?
shakefist
a
That won't work because you still need to checkout the repo before it runs facepalm
sad cowboy 1
e

https://tenor.com/brr1e.gif▾

I give up
a
Why not add this step?
Copy code
- name: 'Cleanup build folder'
      run: |
        ls -la ./
        rm -rf ./* || true
        rm -rf ./.??* || true
        ls -la ./
🎉 1
m
a-man-in-a-suit-is-holding-three-boxes-of-pizza.gif
😆 1
anything I can help with?
m
what was wrong with the cleanup action from marketplace?
e
It wanted the docker container to build everytime.
Which is fine
Until Dockerhub rate limited it
m
why would it trigger a docker build? sorry if I am bringing up things you discussed elsewhere, but not so easy to follow through the different PRs
a
Just the way it was programmed https://github.com/AutoModality/action-clean
It might have used docker to iron out any docker related issues?
e
Idk why it didn't cache it, or maybe it did? Don't worry about it, it's not even PRs it's in the action logs 🫠
m
why did it work with the previous setup? or did we just add multiple things at once and they broke for different reasons?
e
No it worked, but it wanted to pull a Ubuntu container, and then it spiraled itself out
👍🏻 1
TL;DR Docker has yet to figure out a way to monetize 💸
a
I think a GHA using Docker always rebuilds right? Never managed to get one to cache properly yet
*using a Dockerfile
f
I am still a bit confused about how it is now rendered in the CI. There is now a lot of different tests going on.
and something is off with the GPU based nf-test changes but that might be another story... sorry I really lost track here
e
Hey @Famke Bäuerle can you link the GPU test that seems off?
f
https://github.com/nf-core/modules/pull/7014 This is just a few changes to the module - and it had GPU based tests passing before and now the CI runs conda tests again even though I disabled them in the test.yml
👍🏻 1
elmofire 2
e
Yeah, maybe we just do GPU tests on the honor system for the moment?
m
https://github.com/nf-core/modules/actions/runs/11956408754/job/33331090984#step:5:24 this is a very weird detect-nf-test-changes error. investigating now
ah, a renovatebot PR broke the include line into multiple lines and then the function breaks https://github.com/nf-core/modules/pull/5561/files#diff-87c689a16266c4cb0a928d557721fbe4850f3ee4470034aac950c667dbe3b962R1-R5 cc @Adam Talbot
e
I can't let renovate take the fall, that was me ✋🏻
m
Screenshot 2024-11-21 at 17.59.12.png
😂 3
fixing it in this PR now
e
GitHub Actions gave up
m
@Famke Bäuerle how difficult would it be to move this pytest to nf-test? the change detection can’t handle pytest paths atm
f
now i am confused all of my PRs should be ports from pytest to nf-test. Maybe I forgot a file or removing something in a config somewhere??? 😕 I'll check all of the PRs in around an hour.
👍🏻 1
I checked all of my parabricks related PRs and they all prot to nf-test. (removed all pytest related files and the entries in the pytest config)
m
Ah okay, we need to check not to test deleted files then.
👍 1