Skip to content

Conversation

jpinsonneau
Copy link
Contributor

@jpinsonneau jpinsonneau commented Oct 2, 2025

Description

  • Fix background mode issue (follow is not showing logs since the new UI was implemented)
  • Update doc to add an example for metrics background

Example after running $ oc netobserv metrics --background:

$ oc netobserv follow
Checking dependencies... 
'yq' is up to date (version v4.45.1).
'bash' is up to date (version v5.2.37).
Starting network-observability-cli:
=====
Build version: unknown
Build date: unknown


------------------------------------------------------------------------
         _  _     _       _                       ___ _    ___
        | \| |___| |_ ___| |__ ___ ___ _ ___ __  / __| |  |_ _|
        | .' / -_)  _/ _ \ '_ (_-</ -_) '_\ V / | (__| |__ | | 
        |_|\_\___|\__\___/_.__/__/\___|_|  \_/   \___|____|___|

------------------------------------------------------------------------
time="2025-10-02T11:08:33Z" level=info msg="Log level: info\nOption(s): background"
time="2025-10-02T11:08:33Z" level=info msg="Running in background mode"
time="2025-10-02T11:08:33Z" level=info msg="Kernel version: 5.14.0-570.45.1.el9_6.x86_64"
time="2025-10-02T11:08:33Z" level=info msg="sum(rate(on_demand_netobserv_node_egress_bytes_total[2m]))"
time="2025-10-02T11:08:33Z" level=info msg="  No result"
time="2025-10-02T11:08:33Z" level=info msg="sum(rate(on_demand_netobserv_node_egress_packets_total[2m]))"
time="2025-10-02T11:08:33Z" level=info msg="  No result"
...
time="2025-10-02T11:10:03Z" level=info msg="sum(rate(on_demand_netobserv_node_egress_bytes_total[2m]))"
time="2025-10-02T11:10:03Z" level=info msg="  {} =>\n171675.09052430323 @[1759403100]"
time="2025-10-02T11:10:03Z" level=info msg="sum(rate(on_demand_netobserv_node_egress_packets_total[2m]))"
time="2025-10-02T11:10:03Z" level=info msg="  No result"

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

Copy link

openshift-ci bot commented Oct 2, 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 assign jotak for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

return toFloat64(lastFlows[i], "Time") < toFloat64(lastFlows[j], "Time")
})
// lock since we are updating lastFlows concurrently
mutex.Lock()
Copy link
Member

Choose a reason for hiding this comment

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

would be safer / best practice to have defer Unlock here ?

   defer mutex.Unlock()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can address that in parallel if it's ok for you

That code was already there and not related to that fix

Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

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

/lgtm
just a nice-to-have comment

@openshift-ci openshift-ci bot added the lgtm label Oct 2, 2025
@memodi
Copy link
Member

memodi commented Oct 3, 2025

/ok-to-test

Copy link

github-actions bot commented Oct 3, 2025

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

It will expire after two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=f3fe30a make commands

or download the updated commands.

@memodi
Copy link
Member

memodi commented Oct 3, 2025

/label qe-approved

Copy link

openshift-ci bot commented Oct 3, 2025

@jpinsonneau: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-tests b2f60d3 link true /test integration-tests

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

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