-
Notifications
You must be signed in to change notification settings - Fork 43
Performance enhancing image fetching #3073
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||
e348ad6 to
075dbf8
Compare
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This adds parallel fetching of image manifests and caching for each function call that fetches from a registry. https://issues.redhat.com/browse/EC-1600 Assisted-by: Claude-4.5-opus
User description
This adds parallel fetching of image manifests and caching for each function call that fetches from a registry.
https://issues.redhat.com/browse/EC-1600
Assisted-by: Claude Opus 4.5
PR Type
Enhancement
Description
Add parallel manifest fetching with
ec.oci.image_manifestsfunctionImplement per-function caching using
sync.Mapandsingleflight.GroupAdd concurrency control limiting parallel fetches to
GOMAXPROCS * 4Refactor existing OCI functions to use caching and singleflight deduplication
Diagram Walkthrough
File Walkthrough
oci.go
Implement caching and parallel manifest fetchinginternal/rego/oci/oci.go
sync,runtime,errgroup,singleflight)sync.Map) and singleflight groups forblob, descriptor, manifest, image files, and image index operations
ociImageManifestsBatchfunction that fetches multiplemanifests in parallel with bounded concurrency
ociBlob,ociDescriptor,ociImageManifest,ociImageFiles,ociImageIndex) to use caching andsingleflight deduplication
maxParallelManifestFetchesvariable set toGOMAXPROCS * 4tocontrol concurrency
init()functionoci_test.go
Add tests for batch manifest fetchinginternal/rego/oci/oci_test.go
ociImageManifestsBatchcoveringsingle ref, multiple refs, empty array, invalid input, and error
scenarios
TestOCIImageManifestsBatchConcurrencyto verify boundedconcurrency behavior with configurable limits
TestFunctionsRegisteredto include the newociImageManifestsBatchNamefunctionfmtimport for test string formattingec_oci_image_manifests.adoc
Document new parallel manifest functiondocs/modules/ROOT/pages/ec_oci_image_manifests.adoc
ec.oci.image_manifestsfunctionparallel
rego_builtins.adoc
Update builtins reference tabledocs/modules/ROOT/pages/rego_builtins.adoc
ec.oci.image_manifestsin the builtins reference tablerego_nav.adoc
Update navigation sidebardocs/modules/ROOT/partials/rego_nav.adoc
ec.oci.image_manifestsin the Rego referencesidebar