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

stdout and stderr not correctly splitted when running with kubernetes plugin (2) #484

Open
zemiak opened this issue May 13, 2024 · 2 comments

Comments

@zemiak
Copy link

zemiak commented May 13, 2024

Hello,

I am basically reopening the issue #479 that was strangely closed without any description and/or comments.

We are running our main Jenkins in a VM outside our Openshift Cluster. We are using Kubernetes Plugin for planning our builds inside of our Openshift Dev cluster.

We are using couple of Openshift Client Plugin features, mainly selectors and listing all available objects / checking whether objects exist in a namespace.

Our problem began after upgrading Openshift to 4.14 when a warning about DeploymentConfig deprecation started to appear:

oc get dc
-->

Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+

This suddenly broke our builds as we are using deploymentconfigs, and we are getting info about them via Openshift Plugin:

List all = openshift.selector("deploymentconfig").objects()

This now crashes with an error:

Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 3a3be41a-8fe6-4556-ab04-9a157608047b
groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

The current character read is 'W' with an int value of 87
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+

I tried to debug it and found out, that when I run the same code in the local main Jenkins context, it works, when I run it via Kubernetes Plugin pod, it mixes stderr and stdout both to stdout:
openshift.raw("get dc -ojson")
-->

16:53:20  {
16:53:20      "operation": "raw",
16:53:20      "actions": [
16:53:20          {
16:53:20              "err": "",
16:53:20              "verb": "",
16:53:20              "cmd": "oc --server=https://api.osdev.cp.cloud:6443/ --insecure-skip-tls-verify --namespace=dev-spot --token=XXXXX  get dc -ojson ",
16:53:20              "out": "Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+\n{\n    \"apiVersion\":

Can you, please, guide us to a solution?

Thank you!
Miroslav

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 12, 2024
@zemiak
Copy link
Author

zemiak commented Aug 12, 2024

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 12, 2024
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