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

light: Add 3 minor fixes for a: deprecation warning, flaky testcase and crash detection #302

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

mitzkia
Copy link
Contributor

@mitzkia mitzkia commented Sep 22, 2024

These minor fixes helps to run light more comfortable.

  • fix 1: add fix for a deprecated API call (psutil.Process().connections())
  • fix 2: fix flaky testcase: test_filterx_update_metric_level()
  • fix 3: handle syslog-ng crash when no core file has been detected

@mitzkia mitzkia changed the title light: Add 3 minor fix: deprecation warning, flaky testcase, crash detection light: Add 3 minor fix for a: deprecation warning, flaky testcase, crash detection Sep 22, 2024
@mitzkia mitzkia changed the title light: Add 3 minor fix for a: deprecation warning, flaky testcase, crash detection light: Add 3 minor fixes for a: deprecation warning, flaky testcase, crash detection Sep 22, 2024
@mitzkia mitzkia changed the title light: Add 3 minor fixes for a: deprecation warning, flaky testcase, crash detection light: Add 3 minor fixes for a: deprecation warning, flaky testcase and crash detection Sep 22, 2024
MrAnno
MrAnno previously approved these changes Sep 23, 2024
Copy link
Member

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

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

Thanks!

(The commit check is complaining about the usual light: commit-description format. And some whitespace issue: tests/light/functional_tests/filterx/test_filterx_update_metric.py:188:107: E225 missing whitespace around operator)

- `psutil.Process().connections()` became deprecated

Signed-off-by: Andras Mitzki <[email protected]>
- sometimes (between 5 and 7 times out of 20 executions) at the end
of the testcase (line 190) 'syslogng_metric' Prometheus sample value
will not included however other values are exist in ctl output
- this is fix waits until the sample is not empty (usually for the
second query it will be there)

Signed-off-by: Andras Mitzki <[email protected]>
- My opinion is that after dbld containers are no more depending on gosu,
core files could not generated inside.
- 'docker run --ulimit core=unlimited ...' will not take effect while using
(in entrypoint.sh)
```
exec sudo --preserve-env --preserve-env=PATH -Hu "${USER_NAME}" "$@"
```
- after this fix light will detect if syslog-ng has crashed with known
signals

Signed-off-by: Andras Mitzki <[email protected]>
@mitzkia
Copy link
Contributor Author

mitzkia commented Sep 23, 2024

Thanks for the review and for the approve. I have fixed the flake8 issue and the git commit message issue too:

micek@DESKTOP-0E9OKG3:~/source/axosyslog$ tests/commits/check.sh
[ OK ] 15f4f9ec7 light: Determine syslog-ng crash when core files are not generated
[ OK ] 3e5565e89 light: Fix flaky test_filterx_update_metric_level() testcase
[ OK ] cff46a570 light: Fix psutil deprecation warninig

@MrAnno MrAnno merged commit a750a3b into axoflow:main Sep 23, 2024
22 checks passed
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

Successfully merging this pull request may close these issues.

2 participants