NOISSUE - Implement extensible resource downloader framework with support for S3, GCS, and OCI sources#590
Merged
Merged
Conversation
… for S3, GCS, and OCI sources Signed-off-by: SammyOina <sammyoina@gmail.com>
smithjilks
requested changes
Apr 22, 2026
Comment on lines
+589
to
+604
| // inferSourceType infers the resource source type from the URL scheme. | ||
| func inferSourceType(url string) string { | ||
| switch { | ||
| case strings.HasPrefix(url, "docker://"), strings.HasPrefix(url, "oci:"): | ||
| return resource.SourceTypeOCIImage | ||
| case strings.HasPrefix(url, "s3://"): | ||
| return resource.SourceTypeS3 | ||
| case strings.HasPrefix(url, "gs://"): | ||
| return resource.SourceTypeGCS | ||
| case strings.HasPrefix(url, "https://"): | ||
| return resource.SourceTypeHTTPS | ||
| case strings.HasPrefix(url, "http://"): | ||
| return resource.SourceTypeHTTP | ||
| default: | ||
| return "" | ||
| } |
Contributor
There was a problem hiding this comment.
It would be more effective to use scheme instead of prefix matching.
Something like
u, err := urlpkg.Parse(url)
if err != nil {
return ""
}
smithjilks
requested changes
Apr 22, 2026
| // inferSourceType infers the resource source type from the URL scheme. | ||
| func inferSourceType(url string) string { | ||
| switch { | ||
| case strings.HasPrefix(url, "docker://"), strings.HasPrefix(url, "oci:"): |
Contributor
There was a problem hiding this comment.
We may need to handle a scenario where the user may enter oci without a scheme.
…mage references Signed-off-by: Sammy Oina <sammyoina@gmail.com>
…ence, and update python unit tests with event mock expectations Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #590 +/- ##
==========================================
+ Coverage 68.36% 68.48% +0.11%
==========================================
Files 116 121 +5
Lines 7344 7612 +268
==========================================
+ Hits 5021 5213 +192
- Misses 1746 1805 +59
- Partials 577 594 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…tion, and improve resource download error handling Signed-off-by: Sammy Oina <sammyoina@gmail.com>
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
dborovcanin
approved these changes
Apr 28, 2026
drasko
pushed a commit
that referenced
this pull request
May 8, 2026
* Added GPU evidence collection * Added GPU evidence verification * Added make command for nvattest helper * Added command for installing all services * changed attestion-service.service so it knows where the helper is * Possible IGVM script bug * Possible bug * Bug * bug * Revert "bug" This reverts commit d81d67e. * Revert "Bug" This reverts commit 5e566d5. * Revert "Possible bug" This reverts commit 47d13fe. * Revert "Possible IGVM script bug" This reverts commit 3fb1b79. * Revert "changed attestion-service.service so it knows where the helper is" This reverts commit f9f11ed. * Revert "Added command for installing all services" This reverts commit 5dcf7a5. * NOISSUE - Enforce binding label check (#589) * NOISSUE - Implement extensible resource downloader framework with support for S3, GCS, and OCI sources (#590) * feat: implement extensible resource downloader framework with support for S3, GCS, and OCI sources Signed-off-by: SammyOina <sammyoina@gmail.com> * refactor: improve resource URL parsing and add support for bare OCI image references Signed-off-by: Sammy Oina <sammyoina@gmail.com> * fix: add empty string check and slash requirement for OCI image inference, and update python unit tests with event mock expectations Signed-off-by: Sammy Oina <sammyoina@gmail.com> * refactor: introduce OCIClient interface, add test coverage for decryption, and improve resource download error handling Signed-off-by: Sammy Oina <sammyoina@gmail.com> * chore: remove trailing whitespace in OCI downloader and HTTP tests Signed-off-by: Sammy Oina <sammyoina@gmail.com> --------- Signed-off-by: SammyOina <sammyoina@gmail.com> Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Refactored baed on comments * Added GPU evidence collection * Added GPU evidence verification * Added make command for nvattest helper * Added command for installing all services * changed attestion-service.service so it knows where the helper is * Possible IGVM script bug * Possible bug * Bug * bug * Revert "bug" This reverts commit d81d67e. * Revert "Bug" This reverts commit 5e566d5. * Revert "Possible bug" This reverts commit 47d13fe. * Revert "Possible IGVM script bug" This reverts commit 3fb1b79. * Revert "changed attestion-service.service so it knows where the helper is" This reverts commit f9f11ed. * Revert "Added command for installing all services" This reverts commit 5dcf7a5. * Refactored baed on comments * fixed lint error * fixed tests * Fixed according to comments * COCOS-584 - Support multiple kbs (#587) * feat: Implement per-resource KBS configuration, allowing algorithms and datasets to specify individual KBS URLs. Signed-off-by: Sammy Oina <sammyoina@gmail.com> * refactor: Encapsulate CLI error handling and CVM certificate paths within the CLI struct, and add algorithm type to agent's algorithm structure. Signed-off-by: Sammy Oina <sammyoina@gmail.com> * style: Remove blank lines and fix indentation in CLI commands. Signed-off-by: Sammy Oina <sammyoina@gmail.com> * refactor: Update downloadAndDecryptGenericResource to accept KBS URL as a parameter and adjust related tests Signed-off-by: Sammy Oina <sammyoina@gmail.com> * refactor: group CLI configuration into structured types and simplify skopeo decryption key handling Signed-off-by: Sammy Oina <sammyoina@gmail.com> --------- Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Added GPU evidence collection * Added GPU evidence verification * Added make command for nvattest helper * Added command for installing all services * changed attestion-service.service so it knows where the helper is * Possible IGVM script bug * Possible bug * Bug * bug * Revert "bug" This reverts commit d81d67e. * Revert "Bug" This reverts commit 5e566d5. * Revert "Possible bug" This reverts commit 47d13fe. * Revert "Possible IGVM script bug" This reverts commit 3fb1b79. * Revert "changed attestion-service.service so it knows where the helper is" This reverts commit f9f11ed. * Revert "Added command for installing all services" This reverts commit 5dcf7a5. * Refactored baed on comments * Added GPU evidence collection * Added GPU evidence verification * Added make command for nvattest helper * Added command for installing all services * changed attestion-service.service so it knows where the helper is * Possible IGVM script bug * Possible bug * Bug * bug * Revert "bug" This reverts commit d81d67e. * Revert "Bug" This reverts commit 5e566d5. * Revert "Possible bug" This reverts commit 47d13fe. * Revert "Possible IGVM script bug" This reverts commit 3fb1b79. * Revert "changed attestion-service.service so it knows where the helper is" This reverts commit f9f11ed. * Revert "Added command for installing all services" This reverts commit 5dcf7a5. * Refactored baed on comments * fixed lint error * fixed tests * Fixed according to comments --------- Signed-off-by: SammyOina <sammyoina@gmail.com> Signed-off-by: Sammy Oina <sammyoina@gmail.com> Co-authored-by: Danko Miladinovic <72250944+danko-miladinovic@users.noreply.github.com> Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What does this do?
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Did you document any new/modified feature?
Notes