Skip to content

Changes to reduce webhook CPU usage. #3870

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

Merged
merged 20 commits into from
Jan 25, 2023
Merged

Conversation

ankedia
Copy link
Member

@ankedia ankedia commented Jan 20, 2023

OWLS-105189 - Changes to reduce webhook CPU usage. This change -

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 20, 2023
@ankedia ankedia marked this pull request as ready for review January 24, 2023 21:00
public PartialObjectMetadata readCustomResourceDefinitionMetadata(String name) {
HeaderModifierInterceptor.setPartialMetadataHeader(true);
final PartialObjectMetadata partialObjectMetadata = toPartialObjectMetadata(get(name));
HeaderModifierInterceptor.removePartialMetadataHeader();
Copy link
Member

Choose a reason for hiding this comment

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

Suggest putting the remove call in a finally block so that you can't miss removing the interceptor if the call fails.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed in 2e419a7. Thanks.

Copy link
Member

@rjeberhard rjeberhard left a comment

Choose a reason for hiding this comment

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

Just one comment... I think that you should wrap the remove interceptor call in a try/finally.

@ankedia
Copy link
Member Author

ankedia commented Jan 25, 2023

2e419a7

Just one comment... I think that you should wrap the remove interceptor call in a try/finally.

Changed in 2e419a7. Thanks.

…on test to exclude the cssparser during instrumentation.
…on test to exclude the cssparser during instrumentation.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

84.7% 84.7% Coverage
0.0% 0.0% Duplication

Copy link
Member

@lennyphan lennyphan left a comment

Choose a reason for hiding this comment

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

LGTM

@rjeberhard rjeberhard merged commit 4e6940e into main Jan 25, 2023
@rjeberhard rjeberhard deleted the webhook_cpu_optimization branch January 25, 2023 23:36
rjeberhard pushed a commit to rjeberhard/weblogic-kubernetes-operator that referenced this pull request Apr 14, 2023
* Changes to reduce webhook CPU usage.

Co-authored-by: Russell Gold <russell.gold@oracle.com>
robertpatrick pushed a commit that referenced this pull request Apr 26, 2023
* Changes to reduce webhook CPU usage.

Co-authored-by: Russell Gold <russell.gold@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants