Skip to content

NETOBSERV-2477: scope warning banner#1262

Open
jpinsonneau wants to merge 2 commits intonetobserv:mainfrom
jpinsonneau:2477
Open

NETOBSERV-2477: scope warning banner#1262
jpinsonneau wants to merge 2 commits intonetobserv:mainfrom
jpinsonneau:2477

Conversation

@jpinsonneau
Copy link
Member

@jpinsonneau jpinsonneau commented Feb 4, 2026

Description

Some topology scopes may not be available in prometheus. This result in a trap where user can't change scope directly.

This handle automatically switching scope putting a warning on top of the view as same as the disable filters mechanism already existing.

image image

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

@openshift-ci
Copy link

openshift-ci bot commented Feb 4, 2026

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

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

@jotak should we add "SrcK8S_NetworkName", "DstK8S_NetworkName" to the predefined metrics ?
That's currently missing on the operator side.

@Amoghrd
Copy link
Member

Amoghrd commented Feb 4, 2026

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 4, 2026
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

New image:
quay.io/netobserv/network-observability-console-plugin:410f991

It will expire after two weeks.

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

USER=netobserv VERSION=410f991 make set-plugin-image

@Amoghrd
Copy link
Member

Amoghrd commented Feb 4, 2026

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved QE has approved this pull request label Feb 4, 2026
@jotak jotak changed the title NETOBSERV-2477 scope warning banner NETOBSERV-2477: scope warning banner Feb 5, 2026
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 5, 2026

@jpinsonneau: This pull request references NETOBSERV-2477 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Description

Some topology scopes may not be available in prometheus. This result in a trap where user can't change scope directly.

This handle automatically switching scope putting a warning on top of the view as same as the disable filters mechanism already existing.

image image

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

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 openshift-eng/jira-lifecycle-plugin repository.

if (isPromMissingLabelError(errStr) && promErrStr !== model.chipsPopoverMessage) {
// check if it's a prom missing label error
if (isPromMissingLabelError(errStr)) {
// First, check if scope needs to be changed (topology only)
Copy link
Member

Choose a reason for hiding this comment

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

why is it topology only? Won't we have the same issue on Overview?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me see what I can do here. Overview is displaying per graphs errors and the scope slider is only available when no graph are focussed so it's a bit more complex but probably interesting in that case.

Copy link
Member Author

@jpinsonneau jpinsonneau Feb 5, 2026

Choose a reason for hiding this comment

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

BTW, adding the missing metrics in the operator will result in having isPromDisabledMetricsError instead of isPromMissingLabelError.

So in the end, do we want to automatically switch scope when the metric is disabled ?
Maybe it would be better to hide those ? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Here is an attempt but the questions above remains
a7895c2

// check if it's a prom missing label error and remove filters
// when the prom error is different to the new one
if (isPromMissingLabelError(errStr) && promErrStr !== model.chipsPopoverMessage) {
// check if it's a prom missing label error
Copy link
Member

Choose a reason for hiding this comment

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

let me check if I understand correctly: there were 2 problems here, the "broken scope" issue due to missing labels, and the filters not being disabled as they should due to a bad combination of scopes+filters, which iiuc is really what is described in the ticket.
For the latter, what was the bug? Is it this promErrStr !== model.chipsPopoverMessage check, that you removed? (trying to understand why you removed that)

Copy link
Member Author

Choose a reason for hiding this comment

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

Filters are disabled when involved. That's still working.

The scope never been handled and the fact that the error page is showing fullscreen makes it hard to the user to figure out he needs to change scope in the advanced options (scope slider was hidden in that case).

The "simple" scenario is when scope needs missing labels; we find a compatible scope and the query reloads properly.
The "complex" case is when both are involved:

  • scope will fallback to a compatible scope and query again
  • then the query will fail because of the filters not working on the new scope
  • finally the query will run with new scope and filters disabled

Instead of checking chipsPopoverMessage for filters and scopeWarning for scopes, it's easier to trigger those only when needed:

isPromMissingLabelError(errStr) as soon as we have a prom label missing

If none of those are catching the error, we still show the full error message

@jotak
Copy link
Member

jotak commented Feb 5, 2026

@jotak should we add "SrcK8S_NetworkName", "DstK8S_NetworkName" to the predefined metrics ? That's currently missing on the operator side.

yes, maybe just on main and just this fix will be good enough for 1.11

@jpinsonneau
Copy link
Member Author

@jotak should we add "SrcK8S_NetworkName", "DstK8S_NetworkName" to the predefined metrics ? That's currently missing on the operator side.

yes, maybe just on main and just this fix will be good enough for 1.11

Done in netobserv/network-observability-operator#2420

@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 Feb 5, 2026
@Amoghrd Amoghrd removed the qe-approved QE has approved this pull request label Feb 5, 2026
@Amoghrd
Copy link
Member

Amoghrd commented Feb 5, 2026

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Feb 5, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

New image:
quay.io/netobserv/network-observability-console-plugin:4961546

It will expire after two weeks.

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

USER=netobserv VERSION=4961546 make set-plugin-image

@openshift-ci
Copy link

openshift-ci bot commented Feb 5, 2026

@jpinsonneau: The following tests 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/plugin-cypress a7895c2 link true /test plugin-cypress
ci/prow/images a7895c2 link true /test images
ci/prow/qe-e2e-console-tests a7895c2 link false /test qe-e2e-console-tests

Full PR test history. Your PR dashboard.

Details

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

Labels

do-not-merge/hold jira/valid-reference ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants