-
Notifications
You must be signed in to change notification settings - Fork 523
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
improvement(fluid-build): Use hash-based caching in Biome task #21795
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change description should be updated to note that Biome was introduced without content checking and that is different than Prettier was setup. More or less matching Prettier task should get back to a situation that appeared to be working.
build-tools/packages/build-tools/src/fluidBuild/tasks/leaf/miscTasks.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely need comments in BiomeTask that the done file tracking is too expansive.
Added in latest. |
Just to state my current thoughts on this PR (why I haven't approved; as discussed in Teams thread): |
Thanks for clarifying - I wasn't clear on this point. I prefer to separate out the changes anyway, and once the Biome task changes are merged I could do a prerelease for more folks to test out. So I'll refactor this into two PRs. That said, I think there's value to hash-based for everything long-term, because it's resilient to incidental touches from e.g. git and is sharable across repos (still dreaming of cloud-cached builds). |
Pulled the typetest changes into #21889. We can further discuss it there. I updated the title of this PR to reflect that it is only about the Biome task now. |
Not really opposed to hash approach - all balance of things anyway. |
…soft#21795) We've observed that the Biome fluid-build tasks are often triggered when they shouldn't be. The problem seems to be in the file modified time, which doesn't match expected, implying a "rogue" process has touched a file. I added the ability to use a content-based hash instead of the file stats in a previous change, so I just updated the task to use it. This sidesteps any issues with the stats-based approach. This mechanism is ~20% slower than the stats-based approach, but tasks with few files/smaller files are less affected. The Biome task is most affected because it effectively caches every file in the path. microsoft#21826 will add support for ignore files in the Biome task, which should limit the perf hit for that task. The Biome task was introduced without content-based caching and that is different than the Prettier task behaved. With this change the behavior should match the Prettier task more closely and should get us back to a known good config.
We've observed that the Biome fluid-build tasks are often triggered when they shouldn't be. The problem seems to be in the file modified time, which doesn't match expected, implying a "rogue" process has touched a file.
I added the ability to use a content-based hash instead of the file stats in a previous change, so I just updated the task to use it. This sidesteps any issues with the stats-based approach.
This mechanism is ~20% slower than the stats-based approach, but tasks with few files/smaller files are less affected. The Biome task is most affected because it effectively caches every file in the path. #21826 will add support for ignore files in the Biome task, which should limit the perf hit for that task.
The Biome task was introduced without content-based caching and that is different than the Prettier task behaved. With this change the behavior should match the Prettier task more closely and should get us back to a known good config.