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

Pants resolves plugins twice during pantsd startup #14246

Closed
benjyw opened this issue Jan 25, 2022 · 0 comments · Fixed by #14294
Closed

Pants resolves plugins twice during pantsd startup #14246

benjyw opened this issue Jan 25, 2022 · 0 comments · Fixed by #14294
Assignees

Comments

@benjyw
Copy link
Sponsor Contributor

benjyw commented Jan 25, 2022

This was caused by #14058. One resolve happens before the Initializing scheduler.../Scheduler initialized. log pair, and another after.

There are two issues here:

  1. Why are two resolves happening in the first place? (maybe this is expected?)
  2. Why the second one isn't using the cached result of the first one.

Regarding 2), my debugging shows that this is because the working set is different in each case. In the first resolve it contains just the lockfile, and in the second one it contains the union of the lockfile and (the transitive closure of) the plugins.

stuhood added a commit that referenced this issue Jan 28, 2022
As described in #14246, #14058 caused plugin loading to run twice when we missed the cache. This was because after loading plugins, the working set has changed, and represents a new set of constraints on plugin loading.

While the current behavior is accurate, it isn't useful. Instead, we adjust `PluginResolver` to make the inputs to plugin loading idempotent, even if the outputs cannot be.

Fixes #14246.

[ci skip-rust]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants