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

[E2E] Command.Execute: return stdout and stderr separately #5669

Merged
merged 3 commits into from
May 16, 2022

Conversation

barkbay
Copy link
Contributor

@barkbay barkbay commented May 16, 2022

This is a quick and dirty hack to workaround #5668.
Definitely not an ideal solution, happy to close it without merging.

@barkbay barkbay added >flaky_test >test Related to unit/integration/e2e tests labels May 16, 2022
@pebrc
Copy link
Collaborator

pebrc commented May 16, 2022

I wonder if we could simply distinguish between stdout and stderr to work around this issue. It looks like we are using CombinedOutput which mixes both and makes it hard to dismiss stderr for parsing.

return cmd.CombinedOutput()

But the deprecation and warning messages are output to stderr in AWS CLI (which acts here as authentication plugin to kubectl I believe) here:

https://github.com/aws/aws-cli/blob/d0ab1c4864bb015349bf0f8bd34329855c0bf116/awscli/customizations/eks/get_token.py#L177

And the server/client difference warning in kubectl also goes to stderr here:

https://github.com/kubernetes/kubernetes/blob/ea0764452222146c47ec826977f49d7001b0ea8c/staging/src/k8s.io/kubectl/pkg/cmd/version/version.go#L162

@barkbay barkbay changed the title Extract JSON document from kubectl version [E2E] Command.Execute: return stdout and stderr separately May 16, 2022
@barkbay barkbay merged commit 8f45495 into elastic:main May 16, 2022
@thbkrkr thbkrkr added the v2.3.0 label May 18, 2022
fantapsody pushed a commit to fantapsody/cloud-on-k8s that referenced this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>flaky_test >test Related to unit/integration/e2e tests v2.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants