-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[WIP] [MNTK] Logging role names; less boilerplatish specs-coding process #2502
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
[WIP] [MNTK] Logging role names; less boilerplatish specs-coding process #2502
Conversation
Got rid of remote.tests.multinode references. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass at a review. Mostly just have some questions thus far. Will look at the actual MNTR Program.cs
in more detail next, but if you could answer my questions before then @Rattenkrieg that would be most helpful!
build.fsx
Outdated
@@ -319,6 +319,10 @@ Target "MultiNodeTests" <| fun _ -> | |||
let args = new StringBuilder() | |||
|> append assembly | |||
|> append "-Dmultinode.enable-filesink=on" | |||
|> append "-Dmultinode.remote-testkit-dll=Akka.Remote.TestKit.dll" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's this for, telling the MNTR where to find the testkit assembly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove. For explanation check my comments below.
@@ -73,14 +73,6 @@ | |||
<Project>{964F0EC5-FBE6-47C5-8AE6-145114D5DB8C}</Project> | |||
<Name>Akka.MultiNodeTestRunner.Shared</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Akka.NodeTestRunner\Akka.NodeTestRunner.csproj"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the NodeRunner.exe
any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have deleted this by accident when was cleaning now unnecessary Akka.Remote.TestKit
protected static readonly Regex NodeFailureReasonRegex = new Regex(NodeFailureReasonRegexString); | ||
|
||
/* | ||
* Regular expressions - go big or go home. [Aaronontheweb] | ||
*/ | ||
private const string NodeLogMessageRegexString = @"\[(\w){4}(?<node>[0-9]{1,2})\]\[(?<level>(\w)*)\]\[(?<time>\d{1,4}[- /.]\d{1,4}[- /.]\d{1,4}\s\d{1,2}:\d{1,2}:\d{1,2}(\s(AM|PM)){0,1})\](?<thread>\[(\w|\s)*\])\[(?<logsource>(\[|\w|:|/|\(|\)|\]|\.|-|\$|%|\+|#|\^|@)*)\]\s(?<message>(\w|\s|:|<|\.|\+|>|,|\[|/|-|]|%|\$|\+|\^|@|\(|\))*)"; | ||
private const string NodeLogMessageRegexString = @"\[(\w){4}(?<node>[0-9]{1,2})(?<role>:\w+)?\]\[(?<level>(\w)*)\]\[(?<time>\d{1,4}[- /.]\d{1,4}[- /.]\d{1,4}\s\d{1,2}:\d{1,2}:\d{1,2}(\s(AM|PM)){0,1})\](?<thread>\[(\w|\s)*\])\[(?<logsource>(\[|\w|:|/|\(|\)|\]|\.|-|\$|%|\+|#|\^|@)*)\]\s(?<message>(\w|\s|:|<|\.|\+|>|,|\[|/|-|]|%|\$|\+|\^|@|\(|\))*)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really use these Regex
anymore, now that most node-specific logs are just written directly to their own file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But there is entire ParsingSpec in Akka.MultiNodeTestRunner.Shared.Tests using this regexp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove that spec.
{ | ||
Console.ForegroundColor = ConsoleColor.Red; | ||
Console.WriteLine("[NODE{0}][{1}]: SPEC FAILED: {2}", nodeIndex, DateTime.UtcNow.ToShortTimeString(), message); | ||
Console.WriteLine("[NODE{0}:{1}][{2}]: SPEC FAILED: {3}", nodeIndex, nodeRole, DateTime.UtcNow.ToShortTimeString(), message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this change. Having the rolename listed in the log will make things so much easier.
Regarding dependency on Akka.Remote.TestKit: |
Current fails looks transient. Need someone to confirm/re-run. |
@Rattenkrieg have a merge conflict with the |
@Rattenkrieg so, binary compatibility question: this will require users to upgrade just the |
@Aaronontheweb due to this change |
@Rattenkrieg eh, I don't think that change is the end of the world. Benefits outweigh the costs of upgrading IMHO. As part of this PR, could you also update https://github.com/akkadotnet/getakka.net/blob/master/src/docs/testing/multinode-testkit.md ? |
d662e99
to
507dd90
Compare
…ropagated to every output; remote tests assembly changed to respect current approach
507dd90
to
09db591
Compare
@Aaronontheweb rebased on head of dev, fixed conflicts. Now going to update the docs. As for regex foo you mentioned above is hard to track every caller of |
@Rattenkrieg My question regarding this PR: what scope of changes has affected visualizer? Will it show logs or barrier entries on the timeline? That would be super useful. |
@Horusiath That html file genereated is the product of "Visualizer"? If so then it was affected as everything where I had found usage of nodeid. Check the screenshot below: |
Not ready for merge
Solution for #2469