Skip to content

NETOBSERV-2144 reduce display blinking#210

Merged
jotak merged 1 commit intonetobserv:mainfrom
jpinsonneau:2144
Apr 25, 2025
Merged

NETOBSERV-2144 reduce display blinking#210
jotak merged 1 commit intonetobserv:mainfrom
jpinsonneau:2144

Conversation

@jpinsonneau
Copy link
Member

@jpinsonneau jpinsonneau commented Mar 4, 2025

Description

  • Write frame to a buffer and clear terminal only when necessary
  • Limit to 1 FPS and refresh only at heartbeat rate or key pressed
  • Decrease eBPF CACHE_ACTIVE_TIMEOUT to 1s

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.

  • 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).

}

if len(keyboardError) > 0 {
writeBuf(keyboardError)
Copy link
Member

Choose a reason for hiding this comment

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

I see a linter error here:

printf: non-constant format string in call to github.com/netobserv/network-observability-cli/cmd.writeBuf (govet)go-golangci-lint

I think you could do 2 versions of writeBuf that would follow the usual pattern: writeBuf takes only a string argument, and writeBuff takes varargs

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see it running make lint 🤔

Are you using golangci-lint@v1.64.6 ?

@jpinsonneau jpinsonneau force-pushed the 2144 branch 2 times, most recently from 8b495c1 to 819549c Compare March 6, 2025 14:29
@codecov
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 44.20601% with 130 lines in your changes missing coverage. Please review.

Project coverage is 22.60%. Comparing base (2f92f14) to head (7fef9ee).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
cmd/flow_display.go 46.33% 105 Missing and 12 partials ⚠️
cmd/root.go 0.00% 8 Missing ⚠️
cmd/packet_capture.go 0.00% 3 Missing ⚠️
cmd/flow_capture.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
+ Coverage   22.30%   22.60%   +0.30%     
==========================================
  Files          13       14       +1     
  Lines        1417     1451      +34     
==========================================
+ Hits          316      328      +12     
- Misses       1084     1099      +15     
- Partials       17       24       +7     
Flag Coverage Δ
unittests 22.60% <44.20%> (+0.30%) ⬆️

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

Files with missing lines Coverage Δ
cmd/flow_capture.go 6.03% <50.00%> (-25.76%) ⬇️
cmd/packet_capture.go 0.00% <0.00%> (ø)
cmd/root.go 22.54% <0.00%> (-0.23%) ⬇️
cmd/flow_display.go 46.33% <46.33%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpinsonneau jpinsonneau marked this pull request as ready for review March 6, 2025 14:57
@github-actions
Copy link

New image:
quay.io/netobserv/network-observability-cli:f7ddec7

It will expire after two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=f7ddec7 make commands

or download the updated commands.

@jpinsonneau
Copy link
Member Author

As mentionned in Slack I'm working in parallel on the tview implemention.
The required changes are huge and I'm not sure it will be done easilly, I suggest to merge that PR first and do a followup as https://issues.redhat.com/browse/NETOBSERV-2163

@jotak
Copy link
Member

jotak commented Apr 7, 2025

/lgtm

@memodi
Copy link
Member

memodi commented Apr 16, 2025

/ok-to-test

@github-actions
Copy link

New image:
quay.io/netobserv/network-observability-cli:2205bb0

It will expire after two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=2205bb0 make commands

or download the updated commands.

@memodi
Copy link
Member

memodi commented Apr 16, 2025

/label qe-approved

@memodi
Copy link
Member

memodi commented Apr 17, 2025

/retest

@memodi
Copy link
Member

memodi commented Apr 17, 2025

I wonder, if this PR needs to rebase with latest konflux pipelines? Because it's using older quay image locations and the on-pull-request konflux check is failing:

Prepared artifact from /var/workdir/source (sha256:0389f33a324cacea997cff8d5d6d8183536128cbf30dfbca327659ea50f8bfd4)
Token not found for quay.io/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-cli-container
Error response from registry: recognizable error message not found: HEAD "https://quay.io/v2/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-cli-container/manifests/sha256:868a1930d111f1c7a9da88b6117d6649057919f60cd54df0f69dd53c0640cba4": response status code 401: Unauthorized
Command exited with non-zero status 1

@openshift-ci
Copy link

openshift-ci bot commented Apr 18, 2025

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm label Apr 18, 2025
@openshift-ci
Copy link

openshift-ci bot commented Apr 18, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jotak. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@jpinsonneau
Copy link
Member Author

I wonder, if this PR needs to rebase with latest konflux pipelines? Because it's using older quay image locations and the on-pull-request konflux check is failing

Rebased; let's see if it fix it 😺

@jpinsonneau
Copy link
Member Author

@OlivierCazade could you please have a look ?

Seems related to CVEs

@jotak jotak merged commit a656017 into netobserv:main Apr 25, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants