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

When sending a binary file, the inNamespace property is ignored #4958

Closed
Sgitario opened this issue Mar 9, 2023 · 4 comments
Closed

When sending a binary file, the inNamespace property is ignored #4958

Sgitario opened this issue Mar 9, 2023 · 4 comments

Comments

@Sgitario
Copy link
Contributor

Sgitario commented Mar 9, 2023

Describe the bug

Having two projects in my OpenShift cluster:

  • project X1
  • project Y2

When I have selected one project via: oc project Y2

And I select another project when instantiating the binary:

client.buildConfigs()
  .inNamespace("X1")
  .withName(buildConfig.getMetadata().getName())
  .instantiateBinary()
  .withTimeoutInMillis(openshiftConfig.buildTimeout.toMillis())
  .fromFile(binaryFile);

This always fails with:

An exception: 'Can't instantiate binary build, due to error reading/writing stream. Can be caused if the output stream was closed by the server.See if something's wrong in recent events in Cluster = Scheduled openshift-1-build.174ac21d46e1ac2d Successfully assigned ...

My guess is that internally is using the Y2 project.

Fabric8 Kubernetes Client version

6.4.1

Steps to reproduce

See in description.

Expected behavior

It should use the one selected in inNamespace(xx) and it should work fine.

Runtime

OpenShift

Kubernetes API Server version

1.25.3@latest

Environment

Linux

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

@manusa
Copy link
Member

manusa commented Mar 9, 2023

Can this one be related to the other problem with the binary build (#4899) and the timeout too?

@Sgitario
Copy link
Contributor Author

Sgitario commented Mar 9, 2023

Can this one be related to the other problem with the binary build (#4899) and the timeout too?

I thought it could be related. But didn't see any change related to namespace in the pull request. However, I will try with 6.5-SNAPSHOT.

@Sgitario
Copy link
Contributor Author

Sgitario commented Mar 9, 2023

I've just confirmed that this is working fine using 6.5-SNAPSHOT.
Sorry for the alert!

@Sgitario Sgitario closed this as completed Mar 9, 2023
@manusa
Copy link
Member

manusa commented Mar 9, 2023

I've just confirmed that this is working fine using 6.5-SNAPSHOT. Sorry for the alert!

No worries, better safe than sorry 😅

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

No branches or pull requests

2 participants