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

(bug) Correctly compute Cache ID for plugin invocations #2487

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

lucywyman
Copy link
Contributor

Previously, we computed a unique cache ID for each plugin invocation
based just on the value of _cache for the invocation. This meant that
any plugin invocations with the same cache ttl value would override
each other, causing the wrong cached values to be loaded for plugin
invocations. We now correctly compute the cache ID to be the plugin
invocation hash except for the _cache data, so that the same plugin
with different cache ttl values will load the same data.

!bug

  • Load the correct data for plugin invocations

    Bolt now correctly loads data for the plugin invocation based on the
    plugin data, not just cache ttl. Previously, any plugins with the
    same cache configuration would collide in the cache data and overwrite
    each other, causing the wrong data to be loaded.

@lucywyman lucywyman marked this pull request as ready for review December 16, 2020 17:52
@lucywyman lucywyman requested a review from a team as a code owner December 16, 2020 17:52
Previously, we computed a unique cache ID for each plugin invocation
based just on the value of `_cache` for the invocation. This meant that
any plugin invocations with the same cache `ttl` value would override
each other, causing the wrong cached values to be loaded for plugin
invocations. We now correctly compute the cache ID to be the plugin
invocation hash except for the `_cache` data, so that the same plugin
with different cache `ttl` values will load the same data.

!bug

* **Load the correct data for plugin invocations**

  Bolt now correctly loads data for the plugin invocation based on the
  plugin data, not just cache `ttl`. Previously, any plugins with the
  same cache configuration would collide in the cache data and overwrite
  each other, causing the wrong data to be loaded.
Copy link
Contributor

@beechtom beechtom left a comment

Choose a reason for hiding this comment

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

Checked with multiple plugins, including plugins with _cache configured, and plugins without _cache configured and plugin-cache configured.

@beechtom beechtom merged commit 12e28ae into puppetlabs:main Dec 16, 2020
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 this pull request may close these issues.

2 participants