Skip to content

[EnvironmentCookbookVersionsEndpoint] Add cookbook object cache to request logic#338

Merged
johnmccrae merged 2 commits intochef:mainfrom
dafyddcrosby:cookbook_obj_cache
Sep 30, 2025
Merged

[EnvironmentCookbookVersionsEndpoint] Add cookbook object cache to request logic#338
johnmccrae merged 2 commits intochef:mainfrom
dafyddcrosby:cookbook_obj_cache

Conversation

@dafyddcrosby
Copy link
Copy Markdown
Contributor

Description

Found this while digging into why this endpoint is slow on large numbers of cookbooks (I suspect there's still one other problem, but haven't nailed it down yet). It appears that we generate cookbook manifests at least twice (which is what that get_data call is doing under the hood), and manifest generations aren't free, as we need to hash files, etc.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@dafyddcrosby dafyddcrosby marked this pull request as ready for review September 5, 2025 19:55
@dafyddcrosby dafyddcrosby requested review from a team and jaymzh as code owners September 5, 2025 19:55
Signed-off-by: David Crosby <dcrosby@fb.com>
@sonarqubecloud
Copy link
Copy Markdown

@johnmccrae johnmccrae merged commit f6ca8c3 into chef:main Sep 30, 2025
32 of 33 checks passed
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.

4 participants