Skip to content

NETOBSERV-2617 help improvments#492

Merged
openshift-merge-bot[bot] merged 3 commits intonetobserv:mainfrom
jpinsonneau:2617
Apr 2, 2026
Merged

NETOBSERV-2617 help improvments#492
openshift-merge-bot[bot] merged 3 commits intonetobserv:mainfrom
jpinsonneau:2617

Conversation

@jpinsonneau
Copy link
Copy Markdown
Member

Description

commands/netobserv

  • Fixed --help detection to work at any argument position (replaced nested case "$2" with contains_help function)
  • Fixed regex grouping for help/version skip and yaml detection
  • Added "" pattern to show help when no arguments are provided
  • Added keyword highlighting when --help is used with other flags

scripts/functions.sh

  • Added missing --interfaces command guard for packets (matching --exclude_interfaces)

scripts/help.sh

  • Added get_help_keywords and highlight_keywords utilities for contextual help highlighting
  • Added --help discoverability hint in main help
  • Fixed typos: "asyncronously", "allows you stop", "allows you copy"

Assisted-by: claude-4.6-opus-high

Dependencies

n/a

Checklist

  • Does the changes in PR need specific configuration or environment set up for testing?
    • if so please describe it in PR description.
  • I have added thorough unit tests for the change.
  • 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).

@Amoghrd
Copy link
Copy Markdown
Member

Amoghrd commented Mar 26, 2026

/ok-to-test

@Amoghrd Amoghrd added the needs-review Tells that the PR needs a review label Mar 26, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 13.18%. Comparing base (936cdf7) to head (b0a8371).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #492   +/-   ##
=======================================
  Coverage   13.18%   13.18%           
=======================================
  Files          20       20           
  Lines        2443     2443           
=======================================
  Hits          322      322           
  Misses       2095     2095           
  Partials       26       26           
Flag Coverage Δ
unittests 13.18% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jotak
jotak previously approved these changes Mar 31, 2026
@openshift-ci openshift-ci bot added the lgtm label Mar 31, 2026
@Amoghrd Amoghrd added ok-to-test and removed ok-to-test needs-review Tells that the PR needs a review labels Mar 31, 2026
@github-actions
Copy link
Copy Markdown

New image:

quay.io/netobserv/network-observability-cli:736b6f7

It will expire in two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=736b6f7 make commands

or download the updated commands.

@github-actions
Copy link
Copy Markdown

New image:

quay.io/netobserv/network-observability-cli:736b6f7

It will expire in two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=736b6f7 make commands

or download the updated commands.

@Amoghrd
Copy link
Copy Markdown
Member

Amoghrd commented Mar 31, 2026

/retest

@Amoghrd
Copy link
Copy Markdown
Member

Amoghrd commented Mar 31, 2026

@jpinsonneau PR looks good and works as expected. Integration tests passed manually as well.
Except the --interfaces guard for packets is not working fully.
It creates the namespace, collector and stuff before showing error. Here are the logs:

oc-netobserv packets --interfaces=br-ex --port=8080                                       
Checking dependencies... 
'yq' is up to date (version v4.45.1).
'bash' is up to date (version v5.2.37).
Setting up... 
OpenShift version: 4.21.0-0.nightly-2026-03-29-021947
creating netobserv-cli namespace
namespace/netobserv-cli created
creating service account
serviceaccount/netobserv-cli created
clusterrole.rbac.authorization.k8s.io/netobserv-cli configured
clusterrolebinding.rbac.authorization.k8s.io/netobserv-cli unchanged
clusterrolebinding.rbac.authorization.k8s.io/netobserv-cli-monitoring created
securitycontextconstraints.security.openshift.io/netobserv-cli created
creating collector service
service/collector created
creating packet-capture agents
--interfaces is invalid option for packets
Copy skipped

Cleaning up...
Deleting service monitor... 
Deleting dashboard configmap... 
Deleting daemonset... 
Deleting pod... 
Deleting namespace... namespace "netobserv-cli" deleted

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 1, 2026

New changes are detected. LGTM label has been removed.

@jpinsonneau
Copy link
Copy Markdown
Member Author

@jpinsonneau PR looks good and works as expected. Integration tests passed manually as well. Except the --interfaces guard for packets is not working fully. It creates the namespace, collector and stuff before showing error. Here are the logs:

oc-netobserv packets --interfaces=br-ex --port=8080                                       
Checking dependencies... 
'yq' is up to date (version v4.45.1).
'bash' is up to date (version v5.2.37).
Setting up... 
OpenShift version: 4.21.0-0.nightly-2026-03-29-021947
creating netobserv-cli namespace
namespace/netobserv-cli created
creating service account
serviceaccount/netobserv-cli created
clusterrole.rbac.authorization.k8s.io/netobserv-cli configured
clusterrolebinding.rbac.authorization.k8s.io/netobserv-cli unchanged
clusterrolebinding.rbac.authorization.k8s.io/netobserv-cli-monitoring created
securitycontextconstraints.security.openshift.io/netobserv-cli created
creating collector service
service/collector created
creating packet-capture agents
--interfaces is invalid option for packets
Copy skipped

Cleaning up...
Deleting service monitor... 
Deleting dashboard configmap... 
Deleting daemonset... 
Deleting pod... 
Deleting namespace... namespace "netobserv-cli" deleted

That's an old behavior but let's try to improve it here: b0a8371

I have issues with my local tests.... I'm pushing the commit to try here and see if it pass

@jpinsonneau
Copy link
Copy Markdown
Member Author

Seems like my local tests issues are not related 😄

@Amoghrd can you please retest on your side ?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

New image:

quay.io/netobserv/network-observability-cli:820bedf

It will expire in two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=820bedf make commands

or download the updated commands.

@Amoghrd
Copy link
Copy Markdown
Member

Amoghrd commented Apr 1, 2026

Tests are passing now
/label qe-approved

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit fc78cca into netobserv:main Apr 2, 2026
15 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