Skip to content

Refactoring prior to informers-cache rework #847

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

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

jotak
Copy link
Member

@jotak jotak commented Mar 3, 2025

Description

Related: #681

This is a preliminary work preparing the ground for NETOBSERV-1248. No functional change here.
The goal is to minimize rebase hassle in #681

Details:
- Kafka read/write logic extracted from ingest/encode pipelines and put
  into a dedicated kafka package
- New k8s "datasource" struct for k8s enrichment - currently only has
  the usual informers datasource, but later will include a kafka-based
datasource as well
- Config related to k8s datasource moved into its own package. It
  includes the SecondaryNetwork config.
- Some minor variables/functions renaming

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Will this change affect NetObserv / Network Observability operator? If not, you can ignore the rest of this checklist.
  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
    • If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
    • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
    • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Mar 3, 2025
Related: netobserv#681

This is a preliminary work preparing the ground for NETOBSERV-1248.
No functional change here.
The goal is to minimize rebase hassle in netobserv#681

Details:
- Kafka read/write logic extracted from ingest/encode pipelines and put
  into a dedicated kafka package
- New k8s "datasource" struct for k8s enrichment - currently only has
  the usual informers datasource, but later will include a kafka-based
datasource as well
- Config related to k8s datasource moved into its own package. It
  includes the SecondaryNetwork config.
- Some minor variables/functions renaming
Copy link

github-actions bot commented Mar 3, 2025

New image:
quay.io/netobserv/flowlogs-pipeline:3129586

It will expire after two weeks.

To deploy this build, run from the operator repo, assuming the operator is running:

USER=netobserv VERSION=3129586 make set-flp-image

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Mar 3, 2025
Copy link
Collaborator

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

Looks good. Do you plan to skip QE checks here ?

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 63.79822% with 122 lines in your changes missing coverage. Please review.

Project coverage is 65.16%. Comparing base (e86b95a) to head (df33930).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...peline/transform/kubernetes/informers/informers.go 21.42% 55 Missing ⚠️
pkg/kafka/writer.go 51.92% 21 Missing and 4 partials ⚠️
pkg/kafka/reader.go 71.42% 19 Missing and 5 partials ⚠️
...line/transform/kubernetes/datasource/datasource.go 40.00% 6 Missing ⚠️
pkg/pipeline/transform/kubernetes/enrich.go 82.75% 4 Missing and 1 partial ⚠️
...e/transform/kubernetes/informers/informers-mock.go 93.47% 3 Missing ⚠️
pkg/pipeline/encode/encode_kafka.go 50.00% 1 Missing and 1 partial ⚠️
pkg/pipeline/ingest/ingest_kafka.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #847      +/-   ##
==========================================
+ Coverage   65.08%   65.16%   +0.08%     
==========================================
  Files         113      117       +4     
  Lines        8621     8650      +29     
==========================================
+ Hits         5611     5637      +26     
- Misses       2684     2685       +1     
- Partials      326      328       +2     
Flag Coverage Δ
unittests 65.16% <63.79%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../pipeline/transform/kubernetes/informers/config.go 100.00% <100.00%> (ø)
pkg/pipeline/transform/transform_network.go 65.11% <100.00%> (ø)
pkg/pipeline/encode/encode_kafka.go 64.70% <50.00%> (+7.20%) ⬆️
pkg/pipeline/ingest/ingest_kafka.go 58.26% <83.33%> (-5.15%) ⬇️
...e/transform/kubernetes/informers/informers-mock.go 95.00% <93.47%> (-2.48%) ⬇️
pkg/pipeline/transform/kubernetes/enrich.go 76.47% <82.75%> (-1.41%) ⬇️
...line/transform/kubernetes/datasource/datasource.go 40.00% <40.00%> (ø)
pkg/kafka/reader.go 71.42% <71.42%> (ø)
pkg/kafka/writer.go 51.92% <51.92%> (ø)
...peline/transform/kubernetes/informers/informers.go 19.25% <21.42%> (-3.89%) ⬇️

... and 2 files with indirect coverage changes

@jotak jotak added the no-qe This PR doesn't necessitate QE approval label Mar 4, 2025
@jotak
Copy link
Member Author

jotak commented Mar 4, 2025

@jpinsonneau thanks - yes I'll add no-qe, the whole thing can be tested through NETOBSERV-1248

@jotak
Copy link
Member Author

jotak commented Mar 4, 2025

/approve

Copy link

openshift-ci bot commented Mar 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Mar 4, 2025
@jotak jotak merged commit 90b6b5c into netobserv:main Mar 4, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm no-qe This PR doesn't necessitate QE approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants