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

Use correct BUILD_FILTER_BUILDS filter for build namespace #521

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

jbliznak
Copy link
Contributor

@jbliznak jbliznak commented Dec 6, 2022

I noticed this mismatch where all other save* calls differentiate filters for master and build namespace and only this one doesn't which is a bug introduced during refactoring and introducing this new saveBuildLogs method.

@jbliznak
Copy link
Contributor Author

jbliznak commented Dec 6, 2022

BTW this fix is preventing the error I am seeing complaining about a build that isn't there for days (don't ask me why, it is a simple fix for complex problem but it has to have something to do with example and example-build name mismatch)

[2022-12-06 01:14:57,454] ERROR- Throwable: 
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://api.cluster-url:6443/apis/build.openshift.io/v1/namespaces/jbliznak-xtf/builds/example/log?pretty=false. Message: pod "example-build" not found. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=pod "example-build" not found, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:682)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:661)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:612)
	at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleRawGet(OperationSupport.java:469)
	at io.fabric8.openshift.client.dsl.internal.build.BuildOperationsImpl.doGetLog(BuildOperationsImpl.java:127)
	at io.fabric8.openshift.client.dsl.internal.build.BuildOperationsImpl.getLog(BuildOperationsImpl.java:135)
	at cz.xtf.core.openshift.OpenShift.getBuildLog(OpenShift.java:827)
	at cz.xtf.core.openshift.OpenShift.storeBuildLog(OpenShift.java:1358)
	at cz.xtf.junit5.extensions.OpenShiftRecorderService.lambda$null$4(OpenShiftRecorderService.java:510)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at cz.xtf.junit5.extensions.OpenShiftRecorderService.lambda$saveBuildLogs$5(OpenShiftRecorderService.java:508)
	at cz.xtf.junit5.extensions.OpenShiftRecorderService.saveBuildLogs(OpenShiftRecorderService.java:521)
	at cz.xtf.junit5.extensions.OpenShiftRecorderService.recordState(OpenShiftRecorderService.java:213)
	at cz.xtf.junit5.extensions.OpenShiftRecorderHandler.handleTestExecutionException(OpenShiftRecorderHandler.java:63)

@jbliznak jbliznak mentioned this pull request Dec 6, 2022
4 tasks
@mnovak mnovak self-requested a review December 6, 2022 08:23
Copy link
Contributor

@mnovak mnovak left a comment

Choose a reason for hiding this comment

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

Nice catch! Merged.

@mnovak mnovak merged commit 55d4c0e into xtf-cz:master Dec 6, 2022
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.

2 participants