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

Closed
sirenkovladd opened this issue Feb 13, 2024 · 1 comment
Closed

a timestamp is created before the task is completed #1505

sirenkovladd opened this issue Feb 13, 2024 · 1 comment
Labels
area: fingerprinting Changes related to checksums and caching. state: working as intended The issue described is working as originally intended.

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
@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

@pd93 pd93 added the state: working as intended The issue described is working as originally intended. label Jun 28, 2024
@pd93 pd93 closed this as completed Jun 28, 2024
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. state: working as intended The issue described is working as originally intended.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants