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

fix ISE in cluster version detection #549

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

simkam
Copy link
Contributor

@simkam simkam commented Jun 14, 2023

fixes #519

supersedes #541

Please make sure your PR meets the following requirements:

  • Pull Request contains a description of the changes
  • Pull Request does not include fixes for multiple issues/topics
  • Code is formatted, imports ordered, code compiles and tests are passing
  • Code is self-descriptive and/or documented

@simkam simkam requested review from mnovak1 and laDok8 June 14, 2023 08:46
@simkam simkam changed the title Version fallback simple fix ISE in cluster version detection Jun 14, 2023
@simkam simkam force-pushed the version-fallback-simple branch 2 times, most recently from b70f843 to 68d71d9 Compare June 14, 2023 13:08
Copy link
Contributor

@mnovak1 mnovak1 left a comment

Choose a reason for hiding this comment

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

LGTM, but we will need CI runs.

Copy link
Contributor

@laDok8 laDok8 left a comment

Choose a reason for hiding this comment

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

LGTM

@simkam simkam mentioned this pull request Jun 16, 2023
4 tasks
@tommaso-borgato tommaso-borgato added this to the BACKLOG milestone Jun 22, 2023
@mnovak1
Copy link
Contributor

mnovak1 commented Jun 28, 2023

@simkam Can we have any CI runs like in #541 (comment) ?

xtf-cz#519

```
WARN - Version 4.12.0-ec.5 configured in xtf.openshift.version isn't in expected format 'major.minor[.micro]'.
[2022-11-15 11:12:52,114] ERROR- Failed to install operator
java.lang.IllegalStateException: No match found
	at java.util.regex.Matcher.group(Matcher.java:536)
	at cz.xtf.core.openshift.ClusterVersionInfo.isMajorMinorMicro(ClusterVersionInfo.java:73)
	at cz.xtf.core.openshift.ClusterVersionOpenShiftBinaryPathResolver.getVersionOrChannel(ClusterVersionOpenShiftBinaryPathResolver.java:236)
	at cz.xtf.core.openshift.ClusterVersionOpenShiftBinaryPathResolver.getClientUrlBasedOnOcpVersion(ClusterVersionOpenShiftBinaryPathResolver.java:81)
	at cz.xtf.core.openshift.ClusterVersionOpenShiftBinaryPathResolver.determineClientUrl(ClusterVersionOpenShiftBinaryPathResolver.java:42)
	at cz.xtf.core.openshift.ClusterVersionOpenShiftBinaryPathResolver.resolve(ClusterVersionOpenShiftBinaryPathResolver.java:32)
	at cz.xtf.core.openshift.OpenShiftBinaryManagerFactory.getOpenShiftBinaryManager(OpenShiftBinaryManagerFactory.java:19)
	at cz.xtf.core.openshift.OpenShifts.getBinaryPath(OpenShifts.java:77)
	at com.redhat.xpaas.eap.util.OpenShiftBinaryClient.<init>(OpenShiftBinaryClient.java:26)
	at com.redhat.xpaas.eap.util.OpenShiftBinaryClient.getInstance(OpenShiftBinaryClient.java:32)
	at com.redhat.xpaas.eap.operator.junit.listener.OperatorInstaller.installOperator(OperatorInstaller.java:552)
	at com.redhat.xpaas.eap.operator.junit.listener.OperatorInstaller.testPlanExecutionStarted(OperatorInstaller.java:131)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry$CompositeTestExecutionListener.lambda$testPlanExecutionStarted$12(TestExecutionListenerRegistry.java:115)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry.lambda$notifyEach$1(TestExecutionListenerRegistry.java:67)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry.notifyEach(TestExecutionListenerRegistry.java:65)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry.access$200(TestExecutionListenerRegistry.java:32)
	at org.junit.platform.launcher.core.TestExecutionListenerRegistry$CompositeTestExecutionListener.testPlanExecutionStarted(TestExecutionListenerRegistry.java:115)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:53)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:150)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:124)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
```
@simkam
Copy link
Contributor Author

simkam commented Jun 28, 2023

  • detected from cluster - 4.13.3 -- eap-8.x-openshift-4-80-openjdk17/247/ ✔️
    [2023-06-28 11:11:17,534] DEBUG- Trying to determine OpenShift client url for cluster version 4.13.3.
    [2023-06-28 11:11:17,612] DEBUG- Trying to load OpenShift client archive from cache (enabled: true) or download it from https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/4.13.3/openshift-client-linux.tar.gz.
    [2023-06-28 11:11:17,615] DEBUG- OpenShift client archive not found in cache, downloading it.
    
  • detected from cluster - 4.14.0-ec.1 -- eap-8.x-openshift-4-80-openjdk17/248/ ✔️
    [2023-06-28 11:11:51,524] DEBUG- Trying to determine OpenShift client url for cluster version 4.14.0-ec.1.
    [2023-06-28 11:11:51,595] DEBUG- Trying to load OpenShift client archive from cache (enabled: true) or download it from https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp-dev-preview/4.14.0-ec.1/openshift-client-linux.tar.gz.
    [2023-06-28 11:11:51,599] DEBUG- OpenShift client archive not found in cache, downloading it.
    
  • manually added by -Dxtf.openshift.version=4.9.0-rc.3 - client not available at mirror.openshift.com - default to configured channel -- eap-8.x-openshift-4-80-openjdk17/249/ ✔️
    [2023-06-28 11:12:16,093] DEBUG- Trying to determine OpenShift client url for cluster version 4.9.0-rc.3.
    [2023-06-28 11:12:16,647] DEBUG- Trying to load OpenShift client archive from cache (enabled: true) or download it from https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/stable/openshift-client-linux.tar.gz.
    [2023-06-28 11:12:16,652] DEBUG- OpenShift client archive not found in cache, downloading it. 
    
  • manually added by -Dxtf.openshift.version=4.9.0-rc.7 - client available -- eap-8.x-openshift-4-80-openjdk17/250/ ✔️
    [2023-06-28 11:29:35,155] DEBUG- Trying to determine OpenShift client url for cluster version 4.9.0-rc.7.
    [2023-06-28 11:29:35,672] DEBUG- Trying to load OpenShift client archive from cache (enabled: true) or download it from https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/4.9.0-rc.7/openshift-client-linux.tar.gz.
    [2023-06-28 11:29:35,675] DEBUG- OpenShift client archive not found in cache, downloading it.
    
    

@mnovak1 mnovak1 merged commit 2c2ecdd into xtf-cz:master Jun 28, 2023
@mnovak1
Copy link
Contributor

mnovak1 commented Jun 28, 2023

@simkam thanks, merging.

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.

No fallback when OCP version does not match
4 participants