Skip to content

Commit 978fbd8

Browse files
authored
Merge branch 'master' into 6570-slurm-job-state-query
2 parents 4069f66 + 0f86933 commit 978fbd8

File tree

19 files changed

+245
-69
lines changed

19 files changed

+245
-69
lines changed

docker/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ release: build
3737

3838
dist/docker/amd64:
3939
mkdir -p dist/linux/amd64
40-
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce.tgz | tar --strip-components=1 -xvz -C dist/linux/amd64
40+
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-19.03.15.tgz | tar --strip-components=1 -xvz -C dist/linux/amd64
4141

4242
dist/docker/arm64:
4343
mkdir -p dist/linux/arm64
44-
curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-17.09.0-ce.tgz | tar --strip-components=1 -xvz -C dist/linux/arm64
44+
curl -fsSL https://download.docker.com/linux/static/stable/aarch64/docker-19.03.15.tgz | tar --strip-components=1 -xvz -C dist/linux/arm64
4545

docs/reference/config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ The following settings are available:
871871
: Enable Fusion snapshotting (preview, default: `false`). This feature allows Fusion to automatically restore a job when it is interrupted by a spot reclamation.
872872

873873
`fusion.tags`
874+
: *Currently only supported for S3.*
874875
: The pattern that determines how tags are applied to files created via the Fusion client (default: `[.command.*|.exitcode|.fusion.*](nextflow.io/metadata=true),[*](nextflow.io/temporary=true)`). Set to `false` to disable tags.
875876

876877
(config-google)=

docs/reference/process.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,17 +1656,17 @@ The `stageOutMode` directive defines how output files are staged out from the sc
16561656
: Output files are copied from the scratch directory to the work directory.
16571657

16581658
`'fcp'`
1659-
: :::{versionadded} 23.02.0-edge
1659+
: :::{versionadded} 23.04.0
16601660
:::
1661-
: Output files are copied from the scratch directory to the work directory by using the [fcp](https://github.com/Svetlitski/fcp) utility (note: it must be available in your cluster computing nodes).
1661+
: Output files are copied from the scratch directory to the work directory by using the [fcp](https://github.com/Svetlitski/fcp) utility (note: it must be available in the task environment).
16621662

16631663
`'move'`
16641664
: Output files are moved from the scratch directory to the work directory.
16651665

16661666
`'rclone'`
1667-
: :::{versionadded} 23.01.0-edge
1667+
: :::{versionadded} 23.04.0
16681668
:::
1669-
: Output files are copied from the scratch directory to the work directory by using the [rclone](https://rclone.org) utility (note: it must be available in your cluster computing nodes).
1669+
: Output files are copied from the scratch directory to the work directory by using the [rclone](https://rclone.org) utility (note: it must be available in the task environment).
16701670

16711671
`'rsync'`
16721672
: Output files are copied from the scratch directory to the work directory by using the `rsync` utility.

modules/nextflow/src/main/groovy/nextflow/config/Manifest.groovy

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,11 @@ class Manifest implements ConfigScope {
170170
.map(opts -> new Contributor(opts))
171171
.toList()
172172
}
173-
catch( ClassCastException | IllegalArgumentException e ){
174-
throw new AbortOperationException("Invalid config option `manifest.contributors` -- should be a list of maps")
173+
catch( IllegalArgumentException e ){
174+
throw new AbortOperationException(e.message)
175+
}
176+
catch( ClassCastException e ){
177+
throw new AbortOperationException("Invalid setting for `manifest.contributors` config option -- should be a list of maps")
175178
}
176179
}
177180

@@ -208,17 +211,23 @@ class Manifest implements ConfigScope {
208211
affiliation = opts.affiliation as String
209212
email = opts.email as String
210213
github = opts.github as String
211-
contribution = parseContributionTypes(opts.contribution)
214+
contribution = parseContributionTypes(opts.contribution as List<String>)
212215
orcid = opts.orcid as String
213216
}
214217

215-
private List<ContributionType> parseContributionTypes(Object value) {
216-
if( value == null )
218+
private List<ContributionType> parseContributionTypes(List<String> values) {
219+
if( values == null )
217220
return []
218-
return (value as List<String>).stream()
219-
.map(c -> ContributionType.valueOf(c.toUpperCase()))
220-
.sorted()
221-
.toList()
221+
final result = new LinkedList<ContributionType>()
222+
for( final value : values ) {
223+
try {
224+
result.add(ContributionType.valueOf(value.toUpperCase()))
225+
}
226+
catch( IllegalArgumentException e ) {
227+
throw new IllegalArgumentException("Invalid contribution type '$value' in `manifest.contributors` config option")
228+
}
229+
}
230+
return result.toSorted()
222231
}
223232

224233
Map toMap() {

modules/nextflow/src/main/groovy/nextflow/splitter/AbstractSplitter.groovy

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,24 @@ abstract class AbstractSplitter<T> implements SplitterStrategy {
141141

142142
setSource(source)
143143

144-
145-
final chunks = collector = createCollector()
146-
if( chunks instanceof CacheableCollector && chunks.checkCached() ) {
147-
log.debug "Operator `$operatorName` reusing cached chunks at path: ${chunks.getBaseFile()}"
148-
result = resumeFromCache(chunks)
144+
this.collector = createCollector()
145+
if( collector instanceof CacheableCollector && collector.checkCached() ) {
146+
log.debug "Operator `$operatorName` reusing cached chunks at path: ${collector.getBaseFile()}"
147+
result = resumeFromCache(collector)
149148
}
150-
151149
else {
152150
try {
153-
def stream = normalizeSource(source)
151+
final stream = normalizeSource(source)
154152
result = process(stream)
153+
154+
if( collector instanceof CacheableCollector )
155+
collector.markComplete()
155156
}
156157
catch ( StopSplitIterationException e ) {
157158
log.trace 'Split iteration interrupted'
158159
}
159160
}
160161

161-
162162
/*
163163
* now close and return the result
164164
* - when the target it's a channel, send stop message
@@ -246,7 +246,7 @@ abstract class AbstractSplitter<T> implements SplitterStrategy {
246246
* @param index the current split count
247247
* @return Either {@link groovyx.gpars.dataflow.DataflowChannel} or a {@code List} which holds the splitted chunks
248248
*/
249-
protected abstract process( T targetObject )
249+
abstract protected process( T targetObject )
250250

251251
/**
252252
* Normalise the source object to be splitted

modules/nextflow/src/main/groovy/nextflow/splitter/AbstractTextSplitter.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ abstract class AbstractTextSplitter extends AbstractSplitter<Reader> {
5656

5757
private long itemsCount
5858

59+
@Override
5960
AbstractTextSplitter options(Map options) {
6061
super.options(options)
6162

@@ -108,6 +109,7 @@ abstract class AbstractTextSplitter extends AbstractSplitter<Reader> {
108109
* @return A {@link Reader} for the given object.
109110
* @throws IllegalArgumentException if the object specified is of a type not supported
110111
*/
112+
@Override
111113
protected Reader normalizeSource( obj ) {
112114
Reader reader = normalizeSource0( obj )
113115
// detect if starts with bom and position after it
@@ -178,6 +180,7 @@ abstract class AbstractTextSplitter extends AbstractSplitter<Reader> {
178180
* @param offset
179181
* @return
180182
*/
183+
@Override
181184
protected process( Reader targetObject ) {
182185

183186
def result = null
@@ -244,6 +247,7 @@ abstract class AbstractTextSplitter extends AbstractSplitter<Reader> {
244247
* @return A {@link CollectorStrategy} object implementing a concrete
245248
* strategy according the user provided options
246249
*/
250+
@Override
247251
protected CollectorStrategy createCollector() {
248252

249253
if( !isCollectorEnabled() )
@@ -326,7 +330,6 @@ abstract class AbstractTextSplitter extends AbstractSplitter<Reader> {
326330
*/
327331
abstract protected fetchRecord( BufferedReader reader )
328332

329-
330333
protected int positionAfterBOM(Reader reader ){
331334
if( !reader.markSupported() )
332335
return 0

modules/nextflow/src/main/groovy/nextflow/splitter/TextFileCollector.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class TextFileCollector implements CollectorStrategy, CacheableCollector, Header
7979
return file.resolveSibling( fileName )
8080
}
8181

82+
@Override
8283
void setHeader(String value) {
8384
this.header = value
8485
}
@@ -139,8 +140,6 @@ class TextFileCollector implements CollectorStrategy, CacheableCollector, Header
139140
@Override
140141
void close() throws IOException {
141142
closeWriter()
142-
markComplete()
143143
}
144144

145-
146145
}

modules/nextflow/src/main/resources/nextflow/executor/command-run.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ nxf_fs_move() {
8787
}
8888

8989
nxf_fs_rsync() {
90-
rsync -rRl $1 $2
90+
local source=$1
91+
local target=$2
92+
mkdir -p $target
93+
rsync -rRl $source $target
9194
}
9295

9396
nxf_fs_rclone() {

modules/nextflow/src/test/groovy/nextflow/cli/CmdConfigTest.groovy

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,48 @@ class CmdConfigTest extends Specification {
330330
folder.deleteDir()
331331
}
332332

333+
def 'should parse config file with nested configs' () {
334+
given:
335+
def folder = Files.createTempDirectory('test')
336+
def CONFIG = folder.resolve('nextflow.config')
337+
def CONFIG2 = folder.resolve('nextflow2.config')
338+
def CONFIG3 = folder.resolve('nextflow3.config')
339+
CONFIG.text = '''
340+
profiles {
341+
test { includeConfig 'nextflow2.config' }
342+
}
343+
'''
344+
CONFIG2.text = '''
345+
includeConfig 'nextflow3.config'
346+
'''
347+
CONFIG3.text = '''
348+
params {
349+
x = { 1 + 2 }
350+
}
351+
'''
352+
and:
353+
def buffer = new ByteArrayOutputStream()
354+
def cmd = new CmdConfig()
355+
cmd.launcher = new Launcher(options: new CliOptions(config: [CONFIG.toString()]))
356+
cmd.profile = 'test'
357+
cmd.stdout = buffer
358+
cmd.args = [ '.' ]
359+
360+
when:
361+
cmd.run()
362+
363+
then:
364+
def result = buffer.toString()
365+
result == '''
366+
params {
367+
x = { 1 + 2 }
368+
}
369+
'''.stripIndent().leftTrim()
370+
371+
cleanup:
372+
folder.deleteDir()
373+
}
374+
333375
def 'should handle variables' () {
334376
given:
335377
def folder = Files.createTempDirectory('test')

modules/nextflow/src/test/groovy/nextflow/config/ManifestTest.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ class ManifestTest extends Specification {
179179
])
180180
manifest.contributors
181181
then:
182-
thrown(AbortOperationException)
182+
def e = thrown(AbortOperationException)
183+
e.message.contains("Invalid contribution type 'owner' in `manifest.contributors` config option")
183184
}
184185

185186
}

0 commit comments

Comments
 (0)