Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class BuildLogServiceImpl implements BuildLogService {
}
return logs.substring(start + CONDA_LOCK_START.length(), end)
.replaceAll(/#\d+ \d+\.\d+\s*/, '')
.stripLeading()
}

String fetchValidCondaLock(String buildId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ class BuildLogsServiceTest extends Specification implements AwsS3TestContainer {
def result = service.extractCondaLockFile(logs)

then:
result == """
# This file may be used to create an environment using:
# \$ conda create --name <env> --file <this file>
# platform: linux-aarch64
@EXPLICIT
""".stripIndent()
result == """# This file may be used to create an environment using:
# \$ conda create --name <env> --file <this file>
# platform: linux-aarch64
@EXPLICIT
"""
}

def 'should extract conda lockfile from s3' (){
Expand Down Expand Up @@ -155,12 +154,11 @@ class BuildLogsServiceTest extends Specification implements AwsS3TestContainer {
service.storeCondaLock(buildID, logs)

then:
service.fetchCondaLockString(buildID) == """
# This file may be used to create an environment using:
# \$ conda create --name <env> --file <this file>
# platform: linux-aarch64
@EXPLICIT
""".stripIndent()
service.fetchCondaLockString(buildID) == """# This file may be used to create an environment using:
# \$ conda create --name <env> --file <this file>
# platform: linux-aarch64
@EXPLICIT
"""
}

def 'should throw no exception when there is no conda lockfile in logs' (){
Expand Down
Loading