moon: [bug] Running a task in workspace level get cached even with no inputs

Describe the bug

I have a .moon/tasks.yml literally like this

tasks:
  test:
    command: 'yarn test:unit'

And no .moon.yml in the project level

When I run yarn moon run :test in the workspace level the test passed result gets cached, no matters what I change in the project level’s code or test file, it will always pass due to the caching

Expected behavior

No caching

Environment npx envinfo starts, but does not output anything, even after couple of minutes. Seems to be stuck.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17

Most upvoted comments

@milesj It works, thanks a lot for your helps!

@admin-ssg Just released 1.7.3 that should fix this, let me know if there are more issues around it.

@admin-ssg Awesome thanks, was able to reproduce.

It looks like the problem is that some of the git commands are running in the wrong directory. I believe it’s because the .git and .moon folders are at different depths. Should be an easy fix.

@admin-ssg Let’s debug a bit. What’s the contest of moon query hash 63ccb1c04153167e22f271387f2597350984d7be660b4e22ac3cc1dff413cbcb? That will show you what’s being included in the hash.

As for inputs, by default its **/*, so changing files should trigger an affected change, if the file is in the current project. If the file is outside the project, it won’t trigger a change.