-
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
fixed conda lockfile rendering in build view #727
base: master
Are you sure you want to change the base?
fixed conda lockfile rendering in build view #727
Conversation
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
src/main/groovy/io/seqera/wave/controller/ViewController.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
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.
I'm not convinced but this solution because still keep the problem unsolved for the stream API.
Also, this not prevent the upload of lock files that just contains the invalid content.
Instead of patching the view of the broken conda file containing cat environmeny.lock
string, it would have more sense to move this logic when *uploading* the conda lock content.
Sure, I will move the logic in uploading section |
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
|
||
/* When a container image is cached, dockerfile does not get executed. | ||
In that case condalock file will contain "cat environment.lock" because its not been executed. | ||
So wave will check the previous builds of that container image | ||
and render the condalock file from latest successful build | ||
and replace with the current build's condalock file. | ||
*/ | ||
if( condaLock.contains('cat environment.lock') ){ | ||
log.info "Container Image is already cached, uploading previously successful build's condalock file for buildId: $buildId" | ||
def builds = persistenceService.allBuilds(buildId.split('-')[1].split('_')[0]) | ||
for (def build : builds) { | ||
if ( build.succeeded() ){ | ||
def curCondaLock = fetchCondaLockString(build.buildId) | ||
if( curCondaLock && !curCondaLock.contains('cat environment.lock') ){ | ||
condaLock = curCondaLock | ||
} | ||
} | ||
} | ||
} |
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.
let's isolate this logic into a separate method, so it can be tested independently
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.
done
Signed-off-by: munishchouhan <[email protected]>
Tests again locally:
|
This PR will add a check on conda lockfile and if its not correct, wave will fetch it from previous succcessful build