Option to run jobs in series



  • Avatar
    Marco Abis

    Me again,

          I think I get what you mean but I'm afraid it's not in line with our roadmap and in fact it kind of goes against Go's fundamental building blocks (if I got you right, of course!).

    You might have seen this diagram already in the Go documentation:

    Although it really is a simplification (here a more accurate but detail-dense one), it tries to convey visually 2 very important and often misunderstood/ignored characteristics of Go:

    1. its 4 built-in powerful abstractions and their relationship: Tasks inside Jobs inside Stages inside Pipelines

    2. the fact that some are executed in parallel (depending on Go agents availability) while others sequentially:

    • Multiple Pipelines run in parallel
    • Multiple Stages within a Pipeline run sequentially
    • Multiple Jobs within a Stage run in parallel
    • Multiple Tasks within a Job run sequentially

    Can you see a different way of slicing and dicing your jobs to take advantage of the above while achieving your original goal?


    Comment actions Permalink
  • Avatar
    Ben Zvan

    It's definitely possible to do within the system you describe above, but it requires negating advantages of go. Let's take a hypothetical set of 5 servers named webserver01-webserver05. If I want to deploy to all five of those servers in parallel and cause an outage for my users as the application code is re-deployed, I can do that with a single job set to 'run on all' servers with the resource 'webserver'. If I want to avoid/minimize outage impact by deploying to each server, one at a time, I need to create five new resources, one for each server, and duplicate my deploy stage so I have one stage for each resource.

    This isn't a big deal to start with, but if the deploy process changes, I now have to change it in five places, leading to the likely introduction of human error through repetition (which is what we're using Go to prevent in the first place). And if I add one server in the first scenario, all I have to do is assign the resource 'webserver' and It's done. If I add one server in the second scenario, I have to add a new resource and a new stage.

    So, while it's definitely possible, it's not ideal.

    Comment actions Permalink

Please sign in to leave a comment.