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

Special CHECKSUM variable only ever yields d41d8cd98f00b204e9800998ecf8427e #1076

Closed
treykasada opened this issue Mar 22, 2023 · 2 comments · Fixed by #1080
Closed

Special CHECKSUM variable only ever yields d41d8cd98f00b204e9800998ecf8427e #1076

treykasada opened this issue Mar 22, 2023 · 2 comments · Fixed by #1080
Labels
area: fingerprinting Changes related to checksums and caching.

Comments

@treykasada
Copy link

treykasada commented Mar 22, 2023

The special CHECKSUM variable available to status commands only ever yields d41d8cd98f00b204e9800998ecf8427e. This appears to be irrespective of the contents of any files in the sources list! 😮

Environment

  • Task version: Task version: v3.22.0 (h1:sW+qi054ReRpX7nG8DcKYq3e4IzfSq366RcqEq2lDxc=)
  • Operating System: macOS Ventura 13.2.1 (22D68)

Steps to reproduce

  1. Create a Taskfile.yml file with the following contents:
    version: '3'
    
    tasks:
      checksum:test:
        cmds:
          - cat checksum
        method: checksum
        sources:
          - '*.txt'
        status:
          - echo "{{.CHECKSUM}}" >checksum
  2. Create a file.txt file with any contents
  3. Run task --force checksum:test and note the printed checksum
  4. Make any change to the contents of file.txt
  5. Run task --force checksum:test again and note the printed checksum

Actual results

  • Both printed checksums are d41d8cd98f00b204e9800998ecf8427e 😢

Expected results

  • The second checksum is different from the first
  • Both checksums align with the contents of file.txt at the time they're printed
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Mar 22, 2023
@pd93 pd93 added type: bug Something not working as intended. area: fingerprinting Changes related to checksums and caching. and removed state: needs triage Waiting to be triaged by a maintainer. labels Mar 22, 2023
@pd93
Copy link
Member

pd93 commented Mar 22, 2023

@treykasada Thanks for the report. This should be fixed in #1080. As I suggested there, I don't think this ever worked. The original PR tests were checking for the value that you reported is always being returned.

@treykasada
Copy link
Author

Wow, thanks for putting up a fix so quickly @pd93! 😄

@pd93 pd93 removed the type: bug Something not working as intended. label Dec 16, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants