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

Improve usage reporting in automated tests #2971

Merged
merged 5 commits into from
Jan 4, 2025

Conversation

kate-osborn
Copy link
Contributor

@kate-osborn kate-osborn commented Jan 3, 2025

Proposed changes

Problem: Pipelines are failing intermittently due to r33 reporting errors.

Solutions:

  • In the graceful recovery and reconfig tests, do not fail if there are errors in the NGINX logs. Instead, log the errors and continue. In the reconfig tests, all NGINX error logs are captured in the results file. Since the graceful recovery tests are part of the functional tests that run on every push to a PR and merge to main, it is not desirable to write the error logs to a file. Instead, if an unexpected error is seen in the NGINX logs, the test is skipped and the error is logged in the test output. Since we are sending traffic through NGINX during the graceful recovery tests, we will still catch any unrecoverable NGINX errors.
  • Reporting for conformance tests is disabled.

Testing: Ran graceful recovery and reconfig tests locally and verified new behavior.

Example of NGINX error logs in reconfig results:
Screenshot 2025-01-03 at 9 06 51 AM

Example of NGINX error logs outputted by graceful recovery tests (this error was forced by commenting out an expected error message):
Screenshot 2025-01-03 at 11 19 43 AM

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@kate-osborn
Copy link
Contributor Author

Opening as draft to test in pipeline

@github-actions github-actions bot added the tests Pull requests that update tests label Jan 3, 2025
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.93%. Comparing base (7d4e20c) to head (a8702ce).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2971   +/-   ##
=======================================
  Coverage   89.93%   89.93%           
=======================================
  Files         111      111           
  Lines       11423    11423           
  Branches       50       50           
=======================================
  Hits        10273    10273           
  Misses       1089     1089           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kate-osborn kate-osborn force-pushed the tests/improve-usage-reporting branch from 61d087c to 9a47b6d Compare January 3, 2025 19:08
@kate-osborn kate-osborn marked this pull request as ready for review January 3, 2025 20:24
@kate-osborn kate-osborn requested a review from a team as a code owner January 3, 2025 20:24
@kate-osborn
Copy link
Contributor Author

I'm still waiting on the NFR workflow to complete, but this can be reviewed in the meantime.

@kate-osborn kate-osborn force-pushed the tests/improve-usage-reporting branch from e63d65d to a8702ce Compare January 3, 2025 22:57
@kate-osborn kate-osborn merged commit e553ce1 into main Jan 4, 2025
40 checks passed
@kate-osborn kate-osborn deleted the tests/improve-usage-reporting branch January 4, 2025 00:17
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
Problem: Pipelines are failing intermittently due to r33 reporting errors.

Solutions:
- In the graceful recovery and reconfig tests, do not fail if there are errors
 in the NGINX logs. Instead, log the errors and continue. In the reconfig tests, 
all NGINX error logs are captured in the results file. Since the graceful 
recovery tests are part of the functional tests that run on every push to a PR 
and merge to main, it is not desirable to write the error logs to a file. 
Instead, if an unexpected error is seen in the NGINX logs, the test is skipped 
and the error is logged in the test output. Since we are sending traffic through 
NGINX during the graceful recovery tests, we will still catch any 
unrecoverable NGINX errors.

- Reporting for conformance tests is disabled.
lucacome pushed a commit that referenced this pull request Jan 16, 2025
Problem: Pipelines are failing intermittently due to r33 reporting errors.

Solutions:
- In the graceful recovery and reconfig tests, do not fail if there are errors
 in the NGINX logs. Instead, log the errors and continue. In the reconfig tests, 
all NGINX error logs are captured in the results file. Since the graceful 
recovery tests are part of the functional tests that run on every push to a PR 
and merge to main, it is not desirable to write the error logs to a file. 
Instead, if an unexpected error is seen in the NGINX logs, the test is skipped 
and the error is logged in the test output. Since we are sending traffic through 
NGINX during the graceful recovery tests, we will still catch any 
unrecoverable NGINX errors.

- Reporting for conformance tests is disabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that update tests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants