-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for conda lock file #642
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Good start. To tell the truth, still not sure we should go ahead with this approach or just store the lock file in the surreal db like we are doing for the conda env, even tho it there's the possibility to have the same problem as #559 |
I'm bit confused by this comment in the issue
It seems suggesting the default sql body size is 1 MB, instead the error we are hitting is much smaller. |
we are using /key routes, which is constrained by 16 KiB |
if we use sql to store it then we can bypass this limit |
This sounds like a plan. please give it a try |
ok sure |
There is an issue accessing the Conda lock file. The lock file is present in the generated image, not in the buildkit container we are running in Wave. |
in latter case of generating conda lockfile from conda file, we still need another job to achieve that |
Better to get the file from the container - I was trying to avoid generating the lock file separately because then there's no absolute guarantee that it'll end up the same as the actual environment. If it comes from the environment itself it's certain. |
Can we print the lock file to stdout and then capture that from the build? |
we can do this:
I ran it for conda package 'bwa'
|
Signed-off-by: munishchouhan <[email protected]>
Exactly - that works! Were there a load of lines after the We'd need to remove the line prefixes but that's all I think.. |
A better approach (maybe) could be: 1) creating the container "locally"; 2) copy the lock file from the built container via buildkit; 3) uploading it to the registry. Something similar is done for singularity, here. |
Ok sure, I will try this one |
final query = """\ | ||
INSERT into wave_conda_lock { | ||
buildId: '$buildId', | ||
condaLock = '$condaLock' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the lock file contains a '
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
I have not tested yet with surrealDB
I will use bytes datatype to save it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to byte[]
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
This PR can only be tested on dev once we release new wave-utils after merging this PR |
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Co-authored-by: Phil Ewels <[email protected]>
Do we have an estimation how big can be a lock file? If it's not too big it could be stored in the db as the conda env file. |
not able to find anything on internet, this is from chatgpt:
|
Umm, seems to big. @pinin4fjords do you any clue how big can be - on average - a conda lock file? |
Struggled to get any huge lists of packages to build, so instead pulled out the largest
They're still not that big, so I went back in time to some DSL1 pipelines, where we had a single conda environment for the entire pipeline:
|
So even with the biggest real-life conda environment that I could find, we're no-where near to the MB range.. |
This is a good point to save the lock directly in the db. it would make it much simpler |
What is the upper limit this would place on the size of the locks? I think we all know that even if locks from nf-core are small, there will be that customer that does something funky to get us into the MB range. |
1MB |
OK, then I'm going to out on a limb and suggest that this would eventually come back to bite us. |
depends upon seqeralabs/libseqera#25
the above PR needs 'git revert d088604' before merging
This PR will add the following