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

KFLUXBUGS-1505 Fix EC OOM by specifying workers #1817

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

robnester-rh
Copy link
Contributor

This commit attempts to resolve an issue resulting in ec OOM when attempting to validate images with large SBOMs by providing a flag to limit the number of parallel works to reduce memory usage.

@zregvart
Copy link
Member

zregvart commented Aug 1, 2024

We were discussing a way for this to be 1 by default so we don't require a change in the release service, perhaps the Task's default can be 1?

@lcarva
Copy link
Member

lcarva commented Aug 1, 2024

We were discussing a way for this to be 1 by default so we don't require a change in the release service, perhaps the Task's default can be 1?

Yes. Forgot about this. I think setting 1 in the Task (which is different than the default on the CLI, 5) makes sense given the resource constraints we set on the Task.

This commit attempts to resolve an issue resulting in ec OOM when
attempting to validate images with large SBOMs by providing a flag to
limit the number of parallel works to reduce memory usage.

The verify-enterprise-contract task has also been updated to utilize
this parameter, with an associated default of "1" workers.

Signed-off-by: robnester-rh <[email protected]>
@robnester-rh
Copy link
Contributor Author

Updated the default value in the task to "1".

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.75%. Comparing base (b2482b9) to head (192b98a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1817      +/-   ##
==========================================
+ Coverage   80.74%   80.75%   +0.01%     
==========================================
  Files          68       68              
  Lines        4954     4958       +4     
==========================================
+ Hits         4000     4004       +4     
  Misses        954      954              
Flag Coverage Δ
generative 80.75% <100.00%> (+0.01%) ⬆️
integration 80.75% <100.00%> (+0.01%) ⬆️
unit 80.75% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/validate/image.go 95.01% <100.00%> (+0.06%) ⬆️

@lcarva lcarva merged commit 388e80e into enterprise-contract:main Aug 1, 2024
13 checks passed
@@ -150,6 +150,7 @@ mark (?) sign, for example: --output text=output.txt?show-successes=false
--snapshot:: Provide the AppStudio Snapshot as a source of the images to validate, as inline
JSON of the "spec" or a reference to a Kubernetes object [<namespace>/]<name>
-s, --strict:: Return non-zero status on non-successful validation. Defaults to true. Use --strict=false to return a zero status code. (Default: true)
--workers:: Number of workers to use for validation. Defaults to 5. (Default: 5)
Copy link
Member

Choose a reason for hiding this comment

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

What's the default though? 🤣

Copy link
Member

Choose a reason for hiding this comment

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

The first 5 is in Portuguese while the second 5 is in English.

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