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

[KOGITO-9231] Configure RestWorkItemHandler SSL behaviour through pro… #3185

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

VaniHaripriya
Copy link
Contributor

public static WebClientOptions sslQuarkusWebClientOptions() {
WebClientOptions webClientOptions = new WebClientOptions();

String certificateFilePath = ConfigProvider.getConfig().getOptionalValue(QUARKUS_HTTP_SSL_CERTIFICATE_FILE, String.class).orElse(null);
Copy link
Contributor

@fjtirado fjtirado Aug 29, 2023

Choose a reason for hiding this comment

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

I think is better to call ConfigProvider.getConfig(), just once
Also, rather than using orElse(null) and later check if the variable is null, use Optional.ifPresent to set the options accordingly

Copy link
Contributor

@fjtirado fjtirado left a comment

Choose a reason for hiding this comment

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

Please move the quarkus specific stuff from RestWorkItemHandlerUtils to SSLWebClientOptionsProducer

@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 31, 2023

(tests) - kogito-runtimes job #3131 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

export BUILD_MVN_OPTS_CURRENT=-T 1C -Dvalidate-formatting -Prun-code-coverage
build-chain build cross_pr -f 'https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/.ci/pull-request-config.yaml' -o 'bc' -p kiegroup/kogito-runtimes -u https://github.com/kiegroup/kogito-runtimes/pull/3185 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://eng-jenkins-csb-business-automation.apps.ocp-c1.prod.psi.redhat.com/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-runtimes.tests.kogito-runtimes/3131/display/redirect

Test results:

  • PASSED: 3368
  • FAILED: 2

Those are the test failures:

org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testFindByIdReadMode
expected: 5
but was: 0
org.kie.kogito.integrationtests.SecureResourceTest.testSecureResource java.lang.RuntimeException: Failed to start quarkus

<dependency>
<groupId>org.eclipse.microprofile.config</groupId>
<artifactId>microprofile-config-api</artifactId>
<version>2.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

Version should be handled by bom, so it can be removed

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably this POM does not need to be modified once utils is moved to quarkus extension


@Produces
@Named("quarkusWebClientOptions")
public WebClientOptions quarkusWebClientOptions() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Actuallly, I think this should be the default bean, there is not need to have two

@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 31, 2023

(tests) - kogito-runtimes job #3139 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

export BUILD_MVN_OPTS_CURRENT=-T 1C -Dvalidate-formatting -Prun-code-coverage
build-chain build cross_pr -f 'https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/.ci/pull-request-config.yaml' -o 'bc' -p kiegroup/kogito-runtimes -u https://github.com/kiegroup/kogito-runtimes/pull/3185 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://eng-jenkins-csb-business-automation.apps.ocp-c1.prod.psi.redhat.com/job/KIE/job/kogito/job/main/job/pullrequest/job/kogito-runtimes.tests.kogito-runtimes/3139/display/redirect

Test results:

  • PASSED: 3369
  • FAILED: 2

Those are the test failures:

org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testFindByIdReadMode
expected: 5
but was: 0
org.kie.kogito.integrationtests.SecureResourceTest.testSecureResource java.lang.RuntimeException: Failed to start quarkus

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.

None yet

3 participants