Skip to content
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

[concourse] in_parallel - support both array of steps; and explicit "steps" child #345

Closed
drnic opened this issue Aug 19, 2019 · 9 comments
Milestone

Comments

@drnic
Copy link
Contributor

drnic commented Aug 19, 2019

image

From https://concourse-ci.org/in-parallel-step.html

in_parallel: ([step] | config)

Two forms of configuration are supported. The simplest form is a simple array of other steps, like so:

in_parallel:
- get: a
- get: b

This is shorthand for the following configuration:

in_parallel:
  steps:
  - get: a
  - get: b
@mstockd
Copy link

mstockd commented Aug 19, 2019

This seems like a good issue to also ask for support of the fail_fast sub-key of the in_parallel step which is marked as YamlSchemaProblem for the same reason.

@martinlippert martinlippert added this to the 4.4.0.RELEASE milestone Aug 19, 2019
@kdvolder
Copy link
Member

@mstockd Please create a separate ticket. It's really more convenient to have smaller focussed tasks / fixes than long laundry lists. It's much easier for things to be forgotten and fall through the cracks that way.

@kdvolder
Copy link
Member

@mstockd Actually... never mind that. I'll just take a look at all that seems to be 'new' in the 'in_parallel' schema anyways.

@kdvolder
Copy link
Member

kdvolder commented Aug 19, 2019

The new 'object-like' format actually has 3 new properties:

  • steps
  • limit
  • fail_fast

kdvolder added a commit that referenced this issue Aug 19, 2019
@drnic
Copy link
Contributor Author

drnic commented Aug 19, 2019

Thanks @kdvolder

@kdvolder
Copy link
Member

I was testing the snapshot build a little. The validations are working okay it seems but there's some issues getting completions inside of nested tasks inside of in_parallel. I think it has something todo with the 'funky' schema type that is both a list and a object type at the same time. Doesn't seem to play well with the completion engine. I'll have to debug that a little and see if I can fix.

kdvolder added a commit that referenced this issue Aug 20, 2019
Schema-based completion engine provides the
completions for every subtype of a union type
(unless more specific subtype can be inferred).

See: #345 (comment)

Signed-off-by: Kris De Volder <[email protected]>
@kdvolder
Copy link
Member

If anyone wants to give the fix a try, you can download a snapshot .vsix file from this page:

http://dist.springsource.com/snapshot/STS4/nightly-distributions.html

Because of the somewhat strange typing... this was a bit more involved of a fix than the usual little 'schema nitpicks', so I really would appreciate someone to give it good try out. And let us know how it goes.

@mstockd
Copy link

mstockd commented Aug 21, 2019

Thank you @kdvolder, its working great in our case (using a format like:

- in_parallel:
      fail_fast: true
      steps:
      - task: task-1
        file: task-1.yml
        image: image-1

      - task: task-2
        file: task-2.yml
        image: image-2

@ElanHasson
Copy link

Thanks @mstockd, that example helped me. If you're new to concourse the whole strings or array of strings thing can be a little rough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants