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

a timestamp is created before the task is completed #1505

Open
sirenkovladd opened this issue Feb 13, 2024 · 1 comment · May be fixed by #1507
Open

a timestamp is created before the task is completed #1505

sirenkovladd opened this issue Feb 13, 2024 · 1 comment · May be fixed by #1507
Labels
area: fingerprinting Changes related to checksums and caching.

Comments

@sirenkovladd
Copy link

Example

version: '3'

tasks:
  build:
    cmds:
      - sleep 5 && cat 1.txt > 2.txt
    sources:
      - 1.txt
    generates:
      - 2.txt
    method: timestamp
  lint:
    deps: [build]
    cmds:
      - cat 2.txt
  all:
    deps: [build, lint]

Result:

❯ task all
task: [build] sleep 5 && cat 1.txt > 2.txt
task: Task "build" is up to date
task: [lint] cat 2.txt
cat: 2.txt: No such file or directory
exit status 1

Expected:

❯ task all
task: [build] sleep 5 && cat 1.txt > 2.txt
task: [lint] cat 2.txt
qwe
  • Task version: v3.34.1
  • Operating system: Darwin arm64
  • Experiments enabled: false
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Feb 13, 2024
@sirenkovladd sirenkovladd linked a pull request Feb 14, 2024 that will close this issue
@andreynering andreynering added area: fingerprinting Changes related to checksums and caching. and removed state: needs triage Waiting to be triaged by a maintainer. labels Feb 22, 2024
@andreynering
Copy link
Member

Hi @sirenkovladd,

The problem with your Taskfile is that deps run in parallel, so it can happen that lint runs before build in your example.

Changing it to run sequentially would fix the problem:

tasks:
  all:
    - task: build
    - task: lint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: fingerprinting Changes related to checksums and caching.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants