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

Fix raw ouput #360

Merged
merged 1 commit into from Nov 28, 2023
Merged

Fix raw ouput #360

merged 1 commit into from Nov 28, 2023

Conversation

hannaeko
Copy link
Member

@hannaeko hannaeko commented Nov 23, 2023

Purpose

Fix raw output

Context

When using zonemaster/zonemaster-engine#1302 the raw ouput is broken as the CLI was relying on the fact that module / testcase / tag to strip them from the message.

Instead of changing the regex, let's use a new method that return only the message arguments, which is less error prone.

Changes

  • Use the new method $entry->argstr instead of removing the prefix of the output of $entry->string.

How to test this PR

Check that the raw ouput working correctly, in particular check that after the message tag only the arguments are displayed and no garbage of any sort.

Before the PR

% zonemaster-cli --level info --show-module --show-testcase afnic.fr --test connectivity --raw
   0.00 INFO     System       Unspecified    GLOBAL_VERSION  ystem:Unspecified:GLOBAL_VERSION version=v4.7.3
   1.71 INFO     Connectivity Connectivity03 IPV4_DIFFERENT_ASN  onnectivity:Connectivity03:IPV4_DIFFERENT_ASN asn_list=42,2485,2486
   1.71 INFO     Connectivity Connectivity03 IPV6_DIFFERENT_ASN  onnectivity:Connectivity03:IPV6_DIFFERENT_ASN asn_list=42,2485,2486
   1.72 INFO     Connectivity Connectivity04 CN04_IPV4_DIFFERENT_PREFIX  onnectivity:Connectivity04:CN04_IPV4_DIFFERENT_PREFIX ns_list=g.ext.nic.fr/194.0.36.1;ns1.nic.fr/192.134.4.1;ns2.nic.fr/192.93.0.4;ns3.nic.fr/192.134.0.49
   1.72 INFO     Connectivity Connectivity04 CN04_IPV6_DIFFERENT_PREFIX  onnectivity:Connectivity04:CN04_IPV6_DIFFERENT_PREFIX ns_list=g.ext.nic.fr/2001:678:4c::1;ns1.nic.fr/2001:67c:2218:2::4:1;ns2.nic.fr/2001:660:3005:1::1:2;ns3.nic.fr/2001:660:3006:1::1:1

After

% zonemaster-cli --level info --show-module --show-testcase afnic.fr --test connectivity --raw
   0.00 INFO     System       Unspecified    GLOBAL_VERSION  version=v4.7.3
   1.75 INFO     Connectivity Connectivity03 IPV4_DIFFERENT_ASN  asn_list=42,2485,2486
   1.75 INFO     Connectivity Connectivity03 IPV6_DIFFERENT_ASN  asn_list=42,2485,2486
   1.76 INFO     Connectivity Connectivity04 CN04_IPV4_DIFFERENT_PREFIX  ns_list=g.ext.nic.fr/194.0.36.1;ns1.nic.fr/192.134.4.1;ns2.nic.fr/192.93.0.4;ns3.nic.fr/192.134.0.49
   1.76 INFO     Connectivity Connectivity04 CN04_IPV6_DIFFERENT_PREFIX  ns_list=g.ext.nic.fr/2001:678:4c::1;ns1.nic.fr/2001:67c:2218:2::4:1;ns2.nic.fr/2001:660:3005:1::1:2;ns3.nic.fr/2001:660:3006:1::1:1

@hannaeko hannaeko added the V-Patch Versioning: The change gives an update of patch in version. label Nov 23, 2023
@hannaeko hannaeko added this to the v2023.2 milestone Nov 23, 2023
@hannaeko hannaeko merged commit 55f43b3 into zonemaster:develop Nov 28, 2023
1 check passed
@ghost
Copy link

ghost commented Jan 8, 2024

v2023.2 release testing

Tested following the "How to test" section, works as expected.

@ghost ghost added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-ReleaseTested Status: The PR has been successfully tested in release testing V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants