-
Notifications
You must be signed in to change notification settings - Fork 95
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
Bug 1966717: include full timestamps in the logs #442
Bug 1966717: include full timestamps in the logs #442
Conversation
@Sergey1011010: This pull request references Bugzilla bug 1966717, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -129,6 +130,10 @@ func filterLogs( | |||
|
|||
for scanner.Scan() { | |||
line := scanner.Text() | |||
if messagesToSearch == nil { | |||
result += line + "\n" | |||
} |
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.
This opens the new functionality for this function. It would be nice to unify it with https://github.com/openshift/insights-operator/blob/master/pkg/gatherers/clusterconfig/operators_pods_and_events.go#L254 one day....
Just saying..... otherwise LGTM, but we need to check with @jholecek-rh about potential impact on the rules.
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.
Yeah, I started refactoring to have only one place to gather logs, but then decided it doesn't worth the efforts right now.
@Sergey1011010 Is it possible to tell the timestamp format from
I'm also wondering how to reflect this breaking change in the documentation. We will make sure that all existing rules will support both the old and the new format. However, we need to make sure that even new rules will do so. |
@jholecek-rh after merging this PR all the logs in the archives will have the new format. So, only the old archives are gonna stick to the old format. It's possible to use a simple regex to detect the format. |
Just few changes |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Sergey1011010, tremes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@Sergey1011010: All pull requests linked via external trackers have merged: Bugzilla bug 1966717 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@Sergey1011010 Let's be clear. "Only old archives" means all archives we've received and all archives we will have received until clusters upgrade to 4.8.something.That's a lot of archives/clusters. 🙂 Timestamps in log files are an archive-wide "configuration". To distinguish the two cases that I described, we need an Insights component that would serve as an archive-wide indicator of the log file structure. Option 1:
Clean, robust and easy. Option 2:
Workable, not an easy way to consume the data, not exactly clean, possibly less robust. This is my last try. I will not push further. 🙂 |
@Sergey1011010 How about the documentation? Any ideas how to make consumers of the data aware that we are receiving archives with two different log file structures? Will we expect them to "just know"(tm) and wait for the bright distant future where all (most) clusters will have updated? 😇 |
@jholecek-rh I think it should be pretty easy to make a regex inside the function processing log file that would check which timestamp format it is. We can add some flag somewhere in metadata, but not sure if we want that. @tremes WDYT? |
Random thought: we could also include the list of files produces by the function (if any), but I'm not sure if I like this idea, it could simplify processing. |
Adding some flag to the metadata seems a bit redundant IMO. Couldn't the rule processing just distinguish the cluster versions and act accordingly? Because this update is/will be for >4.8.0. |
Wrt documentation - we should have updated the sample archive at least right @Sergey1011010 ? I just realized..... |
OK, deciding based on the version seems OK. Is it going to be >4.8.0 (i.e. >=4.8.1) or >=4.8.0? |
Categories
Sample Archive
path/to/sample_data.json
Documentation
*.log
files now have full timestampsUnit Tests
No changes
Privacy
Changelog
Breaking Changes
Yes, the new format of timestamps in the logs
References
https://issues.redhat.com/browse/CCXDEV-4897
https://bugzilla.redhat.com/show_bug.cgi?id=???
https://access.redhat.com/solutions/???