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

Proposal: defer: availability at task level #2040

Open
hugo-ricateau opened this issue Feb 5, 2025 · 0 comments
Open

Proposal: defer: availability at task level #2040

hugo-ricateau opened this issue Feb 5, 2025 · 0 comments
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@hugo-ricateau
Copy link

Description

I have similar use-cases as reported in this feature request (running post-processing tasks at the very end of the overall workflow), but I would like to propose a different approach for handling such case; as it may have a slightly different purpose / implementation, I created a distinct report, but close it if it seems like a duplicate.

The proposal would be to add support for the defer: keyword at task level, with the exact same behaviour as for commands; defining a symmetric to the deps: feature. For instance,

version: 3

tasks:
  pre:
    internal: true
    run: once
    defer:
      - post
    cmds:
      - pre-cmd

  a:
    deps:
      - pre
    cmds:
      - a-cmd

  b:
    deps:
      - pre
    cmds:
      - b-cmd

  post:
    internal: true
    run: once
    cmds:
      - post-cmd

when invoked via task a b, would result in running pre then a then b and finally post.

For now, the proposed syntax has no effect.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants