You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow defaults to be set for resource get/put build steps in resource configuration #1941
There can be a fair bit of mental overhead when creating Concourse pipelines, some of which is a result of having to duplicate a lot of boilerplate.
A Modest Proposal
Add a new defaults section to resource configuration blocks, that allow the pipeline developer to specify some defaults for get and put build steps. For example, if the resource supports defaults,
To me, this adds more mental overhead. Now a get: foo can mean simply get: foo but I have to cross-reference foo to really be sure. Changing defaults is also risky, as the full impact of the change isn't immediately clear (have to check for all gets or puts of it, and what happens when many of them don't want the default?).
I do feel some of the same pain (though probably markedly less; our pipeline has been largely "done" for a while, only requiring incremental changes as we add jobs occasionally), but I suspect this problem runs a bit deeper than DRY-ing up config.
Your particular example seems to be an example of notifications, which is indeed very verbose and annoying to maintain as it involves annotating every job with verbose config. I think that's the thing to solve, and it's something we've had on the backburner for a while. There are a few creative approaches to this: one being to formalize a notion of 'notifications' specifically, and another more general feature in annotations. This is captured in #1052
I agree with @vito that supporting features to keep you DRY is an antipattern. There's plenty of tools external to concourse that can help you solve this problem.
Activity
vito commentedon Jan 12, 2018
To me, this adds more mental overhead. Now a
get: foocan mean simplyget: foobut I have to cross-referencefooto really be sure. Changing defaults is also risky, as the full impact of the change isn't immediately clear (have to check for allgets orputs of it, and what happens when many of them don't want the default?).I do feel some of the same pain (though probably markedly less; our pipeline has been largely "done" for a while, only requiring incremental changes as we add jobs occasionally), but I suspect this problem runs a bit deeper than DRY-ing up config.
Your particular example seems to be an example of notifications, which is indeed very verbose and annoying to maintain as it involves annotating every job with verbose config. I think that's the thing to solve, and it's something we've had on the backburner for a while. There are a few creative approaches to this: one being to formalize a notion of 'notifications' specifically, and another more general feature in annotations. This is captured in #1052
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
ghostsquad commentedon Sep 8, 2018
@timrchavez check out https://jsonnet.org/. It makes writing long and complex pipelines really pleasant!
I agree with @vito that supporting features to keep you
DRYis an antipattern. There's plenty of tools external to concourse that can help you solve this problem.jsonnet -y ./pipeline.jsonnet > /tmp/pipeline.yaml fly -t my-team set-pipeline -p my-pipeline -c /tmp/pipeline.yaml rm /tmp/pipeline.yaml{ local getTriggerEvery(name) = { get: name, trigger: true, version: "every", }, local putTestCtx(name) = { put: name, params: { context "tests", path: "foo", }, }, resources: [ { name: "foo", type: "pull-request", source: { ... } } ], jobs: [ { name: "tests", plan: [ getTriggerEvery("foo"), putTestCtx("foo") { params+: { status: "pending", } }, { task: "validate_and_run_tests", file: "path/to/foo/tasks/unit_tests.yml", on_failure: putTestCtx("foo") { params+: { status: "failure" }, }, on_success: putTestCtx("foo") { params+: { status: "success" }, }, } ], }, { name: "deploy", plan: [ getTriggerEvery("foo"), ] } ], }stale commentedon Jul 16, 2019
Beep boop! This issue has been idle for long enough that it's time to check
in and see if it's still important.
If it is, what is blocking it? Would anyone be interested in submitting a
PR or
continuing the discussion to help move things forward?
If no activity is observed within the next week, this issue will be
exterminatedclosed, in accordance with our stale issueprocess.