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

Robustness tests etcd logs should go to artifacts and not spam output #15079

Closed
serathius opened this issue Jan 10, 2023 · 9 comments
Closed

Comments

@serathius
Copy link
Member

What would you like to be added?

In Linearizability action we use EXPECT_DEBUG=true to get logs to stdout. Because of continious failpoint injection their volume is overwhelming. Better approach would be to redirect logs to file and upload them to artifacts on failed test.

Why is this needed?

Should improve clarity and performance of "Linearizability" test action.

@anushkamittal20
Copy link

Hey @serathius, I would like to start contributing to etcd with this issue.
I see that we have set EXPECT_DEBUG=true in linearizability-template.yaml, to redirect them to a separate file we could use the braces '{ ... } 1> logs.txt' to provide a unit of I/O redirection. But we want to eliminate an stdout completely and redirect to a separate file. For the same, I was trying to look to read up on the EXPECT_DEBUG ( parameter but couldn't find much on it. Could you please direct me to some documentation? ) I was thinking that in this part of the code we could change the code to send to a file and tar it instead of printing it directly using fmt.
It would be great to hear your feedback on this!
Thank you very much!

@serathius
Copy link
Member Author

This issue is about changing https://github.com/etcd-io/etcd/blob/ee566c492bb2e0962068a531666c68e1c39d3723/pkg/expect/expect.go package to support writing to files.

@pchan
Copy link
Contributor

pchan commented Apr 10, 2023

Is anyone looking at this ? If not, I can attempt to add the capability.

@jmhbnz
Copy link
Member

jmhbnz commented Apr 10, 2023

Hi @pchan there are no work in progress pull requests linked so feel free to work on it, I have assigned the issue to you, thanks! :)

@serathius
Copy link
Member Author

To give better idea on how it should work. I think we should add support for an environment variable EXPECT_LOG_DIR that will change behavior of pkg/expect to also write logs to file. This could be compatible with EXPECT_DEBUG (write to both), however it would be ok if the expect just failed if both are configured.

tjungblu added a commit to tjungblu/etcd that referenced this issue Jun 14, 2023
Adding a new flag to retain e2e etcd process logs after stop and
saving next to the visualized model.

Spun out of etcd-io#16018 where I used it for easier local debugging on model
violations. Fixes etcd-io#15079 partially.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
tjungblu added a commit to tjungblu/etcd that referenced this issue Jun 14, 2023
Adding a new flag to retain e2e etcd process logs after stop and
saving next to the visualized model.

Spun out of etcd-io#16018 where I used it for easier local debugging on model
violations. Fixes etcd-io#15079 partially.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
tjungblu added a commit to tjungblu/etcd that referenced this issue Jun 15, 2023
Adding a set of functions which retain e2e etcd process logs after stop and
saving next to the visualized model during robustness tests.

Spun out of etcd-io#16018 where I used it for easier local debugging on model
violations. Fixes etcd-io#15079 partially.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@chaochn47
Copy link
Member

Hi @pchan, is there any progress on this?

Feel free to flush the local changes as a drafted PR even if it is not yet fully ready for review.

Handle inactive PRs
Poke PR owner if review comments are not addressed in 15 days. If PR owner does not reply in 90 days, update the PR with a new commit if possible. If not, inactive PR should be closed after 180 days.

https://etcd.io/docs/v3.5/triage/prs/#handle-inactive-prs

@serathius serathius changed the title Linearizability tests etcd logs should go to artifacts and not spam output Robustness tests etcd logs should go to artifacts and not spam output Apr 26, 2024
@serathius
Copy link
Member Author

serathius commented Jun 7, 2024

Note, with migration to Prow this might not be needed. Prow is much much better in handling logs. #18136

@jmhbnz
Copy link
Member

jmhbnz commented Aug 12, 2024

Note, with migration to Prow this might not be needed. Prow is much much better in handling logs. #18136

Agreed - Prow handles large volumes of log output gracefully. Let's close this and #16664 for now as not being a priority currently. We can always re-open if priorities change.

@jmhbnz jmhbnz closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants