Improved container ID discovery tasks and implemented pod uid discovery tasks#396
Conversation
* Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs
Summary of ChangesHello @kyasbal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the system's ability to discover, aggregate, and correlate Kubernetes resource information from diverse log sources. It introduces a new, extensible inventory framework that allows for the extraction of key identifiers like node names, resource UIDs, and container IDs. These identifiers are then used by specialized pattern-finding tasks to enrich log entries from components like Kubelet and Control Plane, associating them directly with the relevant Kubernetes resources. This refactoring improves the accuracy and depth of log analysis, making it easier to trace events and changes related to specific resources across different log streams. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
…from Cloud Logging (GoogleCloudPlatform#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist
* Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs
* Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs
…lemented resource UID inventory
947b4f7 to
fdd4822
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and valuable refactoring by implementing a generic inventory discovery framework. This greatly improves decoupling between tasks that produce resource information (like UIDs, node names) and tasks that consume it. The replacement of string-based resource paths with the ResourceIdentity struct is another excellent change that enhances type safety and code clarity. The new features for associating kubelet and control plane logs with resources via UIDs are great additions.
I've found a few issues, mostly minor, but one of them is a high-severity bug that would prevent the new UID discovery feature in control plane logs from working. I've also pointed out a couple of places where test coverage could be improved to better validate the new functionality.
Overall, this is a high-quality pull request with well-thought-out architectural improvements.
| type controllerManagerHistoryModifierTaskSetting struct { | ||
| uidPrefixTokenCandidates []rune | ||
| } |
There was a problem hiding this comment.
The uidPrefixTokenCandidates field is declared but never initialized. When FindAllWithStarterRunes is called with an empty starterRunes slice and includeFirst=false, it will not perform any searches, and no UIDs will be found in the logs.
You should initialize this slice with characters that are expected to precede a UID in the log messages. For example, you could initialize it where controllerManagerHistoryModifierTaskSetting is instantiated:
var ControllerManagerHistoryModifierTask = inspectiontaskbase.NewHistoryModifierTask[struct{}](googlecloudlogk8scontrolplane_contract.ControllerManagerHistoryModifierTaskID, &controllerManagerHistoryModifierTaskSetting{
uidPrefixTokenCandidates: []rune{'\"', '=', ' '},
})| if err == nil { | ||
| t.Errorf("GetMatchedString() = %v, want error %v", got, tc.want) | ||
| } |
There was a problem hiding this comment.
The error message for the wantErr case is not very informative. It's better to explicitly state that an error was expected but not received. Using t.Fatal would also be more appropriate here as it stops the test immediately on this failure, which is usually the desired behavior for this kind of check.
| if err == nil { | |
| t.Errorf("GetMatchedString() = %v, want error %v", got, tc.want) | |
| } | |
| if err == nil { | |
| t.Fatal("GetMatchedString() expected an error, but got nil") | |
| } |
| l := log.NewLogWithFieldSetsForTest(&tc.inputComponentField, &tc.inputControllerManagerFieldSet, &tc.inputMessageField) | ||
| modifier := controllerManagerHistoryModifierTaskSetting{} | ||
| cs := history.NewChangeSet(l) | ||
| _, err := modifier.ModifyChangeSetFromLog(t.Context(), l, cs, nil, struct{}{}) | ||
| ctx := inspectiontest.WithDefaultTestInspectionTaskContext(t.Context()) | ||
| finder := patternfinder.NewTriePatternFinder[*commonlogk8sauditv2_contract.ResourceIdentity]() | ||
| ctx = tasktest.WithTaskResult(ctx, commonlogk8sauditv2_contract.ResourceUIDPatternFinderTaskID.Ref(), finder) | ||
| _, err := modifier.ModifyChangeSetFromLog(ctx, l, cs, nil, struct{}{}) | ||
| if err != nil { | ||
| t.Errorf("ModifyChangeSetFromLog() returned an unexpected error, err=%v", err) | ||
| } |
There was a problem hiding this comment.
The tests for ControllerManagerHistoryModifierTask don't seem to cover the new functionality of discovering resource UIDs from log messages. The mocked ResourceUIDPatternFinderTaskID is an empty finder. Please add test cases with log messages containing UIDs and a populated pattern finder to ensure the new logic is working as expected.
| &testchangeset.HasLogSummary{ | ||
| WantLogSummary: `log with multiple pods 【podname (Namespace: kube-system)】`, | ||
| }, |
There was a problem hiding this comment.
The expected log summary in this test case seems incorrect. The parseDefaultSummary function extracts the main message from the klog format (the part in quotes), which is "log with multiple pods" in this case. The podID and podSandboxID are not part of this summary. The current implementation appends the readable resource names to the summary if the IDs are not found within it. Therefore, the summary will contain both replacements appended, and the order is not guaranteed. The assertion should be updated to reflect the actual behavior, or the summary generation logic should be revisited if this is not the desired outcome.
cf43350
into
GoogleCloudPlatform:epic/issue-373
…types (#399) * feat: Dynamically generate Cloud Logging resource name input forms based on active tasks in the task graph. (#374) (#376) * feat: Dynamically generate Cloud Logging resource name input forms based on active tasks in the task graph. This is a fix of bug input forms weren't disappeared once it was added even a feature requesting it was turned off. * fix issue pointed by gemini-code-assist * Adding several minor changes to improve testability before migrating the existing k8s audit parser to the new audit parser (#375) * Added NewLogSorterByTimeTask and test utilities for inspectiontaskbase package * feat: Show orphaned log when no parser associated the log to any timeline and add namespace level timeline * fix issues pointed out by gemini-code-assist * Adding tasks for log summary generation and history modifier for error audit logs (#377) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding tasks related to merge manifests from audit logs (#379) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Add ManifestGenerator related tasks * fix issues pointed by gemini-code-assist * Adding testchangeset utility (#382) * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Fix flaky test on commonk8slogaudit tasks (#388) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Adding new type definitions in contract, enum values of history data and resourcepaths This commit includes contract related changes of the later task implementations. * fix issue pointed by gemini-code-assist * fix flaky test because of string list order * Add task IDs, types used in task output, new revision state types and README about the new k8saudit tasks (#384) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Adding new type definitions in contract, enum values of history data and resourcepaths This commit includes contract related changes of the later task implementations. * fix issue pointed by gemini-code-assist * Revision sort criteria wasn't right (#386) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Adding new type definitions in contract, enum values of history data and resourcepaths This commit includes contract related changes of the later task implementations. * fix issue pointed by gemini-code-assist * fix bug the revision sort criteria was not right * Added comments on existing task types (#387) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Adding new type definitions in contract, enum values of history data and resourcepaths This commit includes contract related changes of the later task implementations. * fix issue pointed by gemini-code-assist * Add comments on existing tasks * Adding the basic revision recorder for k8s audit log (#389) * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Adding manifest based history-modifier tasks and manifest utils * Add the basic revision recording tasks for k8s audit logs * fix issues pointed by gemini-code-assist * Migrate pseudo subresource recorder in the previous k8s audit log parser tasks to the newly implemented k8s audit parser (#390) * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Adding manifest based history-modifier tasks and manifest utils * Add the basic revision recording tasks for k8s audit logs * fix issues pointed by gemini-code-assist * Migrate pseudo recorders to the v2 k8s audit log parser tasks --------- Signed-off-by: kyasbal <ikakeru@google.com> * Adding new PodPhase recorder and register all defined tasks for k8s audit log parser package (#391) * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * Add podphase task and task registrations for the v2 audit parser * fix issue pointed by gemini-code-assist * Remove unused legacy parsers and migrate OSS log parsers to depend on the new audit log parsers (#392) * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Remove the unused legacy parsers and migrated OSS parsers to depend on the new parser * fix issue pointed by gemini-code-assist * Refactor inventory task base types (#394) * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Refactored relationship task and now it's named as InventoryTask * Update pkg/core/inspection/taskbase/inventory_task.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: kyasbal <kyasbal1994@gmail.com> * fix issue pointed by gemini-code-assist --------- Signed-off-by: kyasbal <kyasbal1994@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Adding node name inventory and refactored resource grouping logic (#395) * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Refactored relationship task and now it's named as InventoryTask * Update pkg/core/inspection/taskbase/inventory_task.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: kyasbal <kyasbal1994@gmail.com> * fix issue pointed by gemini-code-assist * Adding nodename inventory task and refactored resource groups not to operate raw string * fix issue pointed by gemini-code-assist --------- Signed-off-by: kyasbal <kyasbal1994@gmail.com> Signed-off-by: kyasbal <ikakeru@google.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Improved container ID discovery tasks and implemented pod uid discovery tasks (#396) * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * fix issue pointed by gemini-code-assist * Migrate containerID discovery tasks to use the inventory task and implemented resource UID inventory * Improved containerd,kubelet and controlplane ID matchers to use inventory tasks * Adding inventory tasks for IP leasing history and NEG names (#397) * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Adding grouping related tasks and tasks for gathering k8s audit logs from Cloud Logging (#378) * Added new fieldset related tasks and history modifiers for error audit logs * fix issues pointed by gemini-code-assist * Added new fieldset related tasks and history modifiers for error audit logs * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Adding k8s audit log parser tasks * Added LogSorterTask that sorts logs before ingesting them to the manifest generator * Added ChangeTargetGrouperTask that groups logs by the resource paths actually modified with the audit log * Added NonSuccessLogGrouperTask that groups logs by resource paths for non succeeded audit logs * fix issues pointed by gemini-code-assist * Added several test asserter for changeset testing * fix issues pointed by gemini-code-assist * fix issues pointed by gemini-code-assist * Implemented inventory for IP leases and NEG names * fix issues pointed by gemini-code-assist * bug: deletionGracePeriodSeconds=0 was always treated as completely removed even when finalizers exists (#398) --------- Signed-off-by: kyasbal <ikakeru@google.com> Signed-off-by: kyasbal <kyasbal1994@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Now kubelet logs and control plane logs can be associated with Pod or other k8s resource logs if the log contains uid of the resource.