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

Revert Avocado Instrumented Tests Log Message Format to 92LTS Version #5732

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

richtja
Copy link
Contributor

@richtja richtja commented Jul 17, 2023

This commit addresses compatibility concerns by reverting the log message format of Avocado instrumented tests back to the 92LTS (Long-Term Support) version. By doing so, we ensure compatibility with the upcoming LTS version.

Reference: #5721
Signed-off-by: Jan Richter [email protected]

@richtja
Copy link
Contributor Author

richtja commented Jul 17, 2023

Hi @dzhengfy can you please check if this fixes #5721. Thank you.

Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

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

Looks right to me:

[stdlog] 2023-07-17 20:35:22,585 test             L0209 INFO | Avocado-VT '100.1-201-ge20d6', Branch 'master', SHA1 'e20d6f47c2198f423bbc8f420b2775e404322416'
[stdlog] 2023-07-17 20:35:22,585 utils            L0161 DEBUG| Test parameters:
[stdlog] 2023-07-17 20:35:22,585 utils            L0165 DEBUG|     auto_cpu_model = yes
...

@dzhengfy
Copy link
Contributor

Hello @richtja ,

in debug.log, now it is fixed:


[stdlog] 2023-07-24 06:25:27,995 **memory_binding_s L0240** DEBUG| After vm is started, vm xml:
[stdlog] <domain xmlns:ns0="http://libosinfo.org/xmlns/libvirt/domain/1.0" type="kvm" id="1">

But in full.log, now it is still as before:

2023-07-24 06:25:25,494 **avocado.test** DEBUG| 1-type_specific.io-github-autotest-libvirt.guest_numa_node_tuning.memory_binding_setting.hugepage.mem_mode_preferred.single_host_node: Step: vm xml before defining:
<domain xmlns:ns0="http://libosinfo.org/xmlns/libvirt/domain/1.0" type="kvm">

Could we make full.log fixed too?

@richtja
Copy link
Contributor Author

richtja commented Jul 25, 2023

Hello @richtja ,

in debug.log, now it is fixed:


[stdlog] 2023-07-24 06:25:27,995 **memory_binding_s L0240** DEBUG| After vm is started, vm xml:
[stdlog] <domain xmlns:ns0="http://libosinfo.org/xmlns/libvirt/domain/1.0" type="kvm" id="1">

But in full.log, now it is still as before:

2023-07-24 06:25:25,494 **avocado.test** DEBUG| 1-type_specific.io-github-autotest-libvirt.guest_numa_node_tuning.memory_binding_setting.hugepage.mem_mode_preferred.single_host_node: Step: vm xml before defining:
<domain xmlns:ns0="http://libosinfo.org/xmlns/libvirt/domain/1.0" type="kvm">

Could we make full.log fixed too?

Sure, I will do that. Thank you for your review.

This commit addresses compatibility concerns by reverting the log
message format of Avocado instrumented tests back to the 92LTS
(Long-Term Support) version. By doing so, we ensure compatibility with
the upcoming LTS version.

Reference: avocado-framework#5721
Signed-off-by: Jan Richter <[email protected]>
We use to re-log messages when avocado receives them from runner. For
this feature we supported the `log_message` attribute which split the
log message into two part, one with the real log and second log with
metadata. Unfortunately, this solution has an issue. When avocado
re-logs the message, it loses the logging metadata and logs shows wrong
lines and modules. This commit removes this mechanism and keep the
creation of log messages only to runners.

before this change:

2023-07-25 10:33:52,781 messages         L0378 INFO |
1-examples/tests/passtest.py:PassTest.test: INIT
1-examples/tests/passtest.py:PassTest.test
2023-07-25 10:33:52,781 messages         L0378 DEBUG|
1-examples/tests/passtest.py:PassTest.test: PARAMS (key=timeout, path=*,
default=None) => None

after this change:
1-examples/tests/passtest.py:PassTest.test: 2023-07-25 14:00:50,323 test
L0313 INFO | INIT 1-examples/tests/passtest.py:PassTest.test
1-examples/tests/passtest.py:PassTest.test: 2023-07-25 14:00:50,324
parameters       L0141 DEBUG| PARAMS (key=timeout, path=*, default=None)
=> None

Signed-off-by: Jan Richter <[email protected]>
@richtja
Copy link
Contributor Author

richtja commented Jul 25, 2023

Hi @dzhengfy and @clebergnu I updated the PR based on your reviews. I had to the change to how we propagate messages from runners to full.log. Please take a look. Thank you.

@dzhengfy
Copy link
Contributor

dzhengfy commented Jul 27, 2023

@richtja , Test with master branch, and it looks fine to me and most consistent to the 92lts' format. Thanks.

# vi /var/lib/avocado/job-results/job-2023-07-27T00.44-75014e8/full.log 
 **invalid_nodeset_ L0039 INFO** | TEST_STEP1: Start vm and check result
# vi /var/lib/avocado/job-results/job-2023-07-27T00.44-75014e8/test-results/1-type_specific.io-github-autotest-libvirt.guest_numa_node_tuning.invalid_nodeset.guest.totally_inexistent.restrictive/debug.log
[stdlog] 2023-07-27 00:44:25,414 **invalid_nodeset_ L0033 DEBUG**| The init xml is:

Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

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

Tested and results LGTM

@dzhengfy
Copy link
Contributor

@clebergnu Could you help double review it?

Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@clebergnu
Copy link
Contributor

/packit copr-build

@clebergnu clebergnu merged commit efbe7cd into avocado-framework:master Aug 21, 2023
58 checks passed
@richtja richtja deleted the logging_fix branch August 28, 2023 08:46
richtja added a commit to richtja/avocado that referenced this pull request Dec 8, 2023
In avocado-framework#5665 we introduced the logging stream name in test logs, this added
more possibilities for user how to post-process test logs.
Unfortunately, this change also hided information about modules where
the log has been created. This issue has been solved in avocado-framework#5732.
This commit connects those two solutions by storing stream and module
names.

Referencei: avocado-framework#5665 avocado-framework#5732
Signed-off-by: Jan Richter <[email protected]>
richtja added a commit to richtja/avocado that referenced this pull request Dec 13, 2023
In avocado-framework#5665 we introduced the logging stream name in test logs, this added
more possibilities for user how to post-process test logs.
Unfortunately, this change also hided information about modules where
the log has been created. This issue has been solved in avocado-framework#5732.
This commit connects those two solutions by storing stream and module
names.

Referencei: avocado-framework#5665 avocado-framework#5732
Signed-off-by: Jan Richter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants