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

fix(misc): various inference plugins caching should track changes #23315

Merged
merged 2 commits into from
May 23, 2024

Conversation

AgentEnder
Copy link
Member

Current Behavior

Plugin's cache entries overwrite each other if multiple instances of the same plugin are running. They also don't remember previous cache states.

Expected Behavior

Plugin's caches grow as changes are made, and don't overwrite previous entries.

Related Issue(s)

Fixes #

@AgentEnder AgentEnder requested review from FrozenPandaz, xiongemi, a team and Coly010 as code owners May 10, 2024 21:54
Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 9:13pm

@AgentEnder AgentEnder force-pushed the fix/jest-plugin-cache branch 2 times, most recently from 8156a6b to a25ab36 Compare May 15, 2024 15:01
@AgentEnder AgentEnder force-pushed the fix/jest-plugin-cache branch from a25ab36 to 31adc37 Compare May 15, 2024 17:49
@AgentEnder AgentEnder requested a review from a team as a code owner May 16, 2024 19:56
const targetsCache = existsSync(cachePath) ? readTargetsCache() : {};

export const calculatedTargets: Record<
export const targetsCache = readTargetsCache();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No export

@@ -1063,6 +1064,9 @@ describe(`Plugin: ${PLUGIN_NAME}`, () => {
}),
'libs/my-lib/package.json': `{}`,
});

await new Promise((res) => setTimeout(res, 2000)); // wait for the file to be created
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm

@AgentEnder AgentEnder force-pushed the fix/jest-plugin-cache branch from 6157ceb to 092b574 Compare May 16, 2024 21:11
@FrozenPandaz FrozenPandaz merged commit a4a185f into master May 23, 2024
6 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/jest-plugin-cache branch May 23, 2024 21:05
FrozenPandaz pushed a commit that referenced this pull request May 24, 2024
…3315)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
Plugin's cache entries overwrite each other if multiple instances of the
same plugin are running. They also don't remember previous cache states.

## Expected Behavior
Plugin's caches grow as changes are made, and don't overwrite previous
entries.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit a4a185f)
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants