Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Add logging into e2e framework #771

Merged
merged 28 commits into from
Oct 3, 2022

Conversation

vcastellm
Copy link
Contributor

Description

This PR enable optionally logging to different io.Writers, by default it saves the e2e logs output to a generated directory and upload the logs as an artifact for later inspection.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Run in local using make test-e2e

Additional comments

This PR should be merged after #769

@vcastellm vcastellm mentioned this pull request Sep 28, 2022
11 tasks
@codecov
Copy link

codecov bot commented Sep 28, 2022

Codecov Report

Merging #771 (622a6e9) into develop (ae056ef) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #771      +/-   ##
===========================================
- Coverage    52.72%   52.71%   -0.01%     
===========================================
  Files          130      130              
  Lines        17147    17147              
===========================================
- Hits          9040     9039       -1     
  Misses        7460     7460              
- Partials       647      648       +1     
Impacted Files Coverage Δ
network/server_discovery.go 73.88% <0.00%> (-1.92%) ⬇️
network/server.go 76.18% <0.00%> (+0.42%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@Kourin1996 Kourin1996 left a comment

Choose a reason for hiding this comment

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

Thank you for PR!

e2e/framework/testserver.go Show resolved Hide resolved
Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Love this improvement 💯

@ferranbt
Copy link
Contributor

Not sure if I follow the format of the output logs. As was described in the task, each test has a name (i.e. QuorumNodesDropNodeAndSyncBack) and the format of the output directory looks like this:

./e2e-tests-<timestamp1>/QuorumNodesDropNodeAndSyncBack/node1.log
./e2e-tests-<timestamp1>/QuorumNodesDropNodeAndSyncBack/node2.log
./e2e-tests-<timestamp1>/QuorumNodesDropNodeAndSyncBack/node3.log
./e2e-tests-<timestamp1>/<test_name_2>/node3.log

Then, it is easy to organize the outputs by time (all the outputs in the same timestamp folder belong to the same execution) and by a specific test.

Victor Castell added 3 commits September 29, 2022 11:48
Copy link
Contributor

@ZeljkoBenovic ZeljkoBenovic left a comment

Choose a reason for hiding this comment

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

LGTM 💯

This will help a lot with troubleshooting process 👍

.github/workflows/e2e.yaml Show resolved Hide resolved
@vcastellm
Copy link
Contributor Author

Not sure if I follow the format of the output logs. As was described in the task, each test has a name (i.e. QuorumNodesDropNodeAndSyncBack) and the format of the output directory looks like this:

./e2e-tests-<timestamp1>/QuorumNodesDropNodeAndSyncBack/node1.log
./e2e-tests-<timestamp1>/QuorumNodesDropNodeAndSyncBack/node2.log
./e2e-tests-<timestamp1>/QuorumNodesDropNodeAndSyncBack/node3.log
./e2e-tests-<timestamp1>/<test_name_2>/node3.log

Then, it is easy to organize the outputs by time (all the outputs in the same timestamp folder belong to the same execution) and by a specific test.

Totally right, I removed the detailed folder naming during the refactor and forgot to add it again, now it looks like:

image

@vcastellm vcastellm merged commit daf3702 into develop Oct 3, 2022
@vcastellm vcastellm deleted the feature/EVM-51-add-logging-into-e-2-e-framework branch October 3, 2022 10:53
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants