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

Internal task should inherit prefix from caller task #1906

Open
TLG-Gildas opened this issue Nov 5, 2024 · 1 comment
Open

Internal task should inherit prefix from caller task #1906

TLG-Gildas opened this issue Nov 5, 2024 · 1 comment
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@TLG-Gildas
Copy link

In case of output: prefixed, if we have a task calling an internal task (see ex taskfile above), prefix used for internal task should be caller task's prefix to completely hide internal task.

taskfile.yml :

version: 3

output: prefixed

tasks:
  .internal:
    internal: true
    cmds:
      - echo "internal"

  external2:
    cmds:
      - echo "external2"
      - task: .internal

  external:
    cmds:
      - echo "external"
      - task: external2

actual output of : task external

[external] external
[external2] external2
[internal] internal

expected output :

[external] external
[external2] external2
[external2] internal

I have put two levels of calling in this exemple to explicitly see that prefix should be inherited from direct caller only.

If prefix is customized on caller, then internal callee should use this one.
If prefix is customized on internal task, then there shouldn't have inheritance.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Nov 5, 2024
@trulede
Copy link

trulede commented Nov 16, 2024

A different perspective:

We have Taskfile's which represent fairly complex workflows, most of the Tasks themselves are internal, and we have a fair amount of inheritance, and also deps (and everywhere else a Task might reside). If all of our internal tasks would have the same prefix as the "external" ones then it becomes very difficult to understand what is happening as a task/workflow executes, and consequently, difficult to debug.

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

3 participants