Skip to content

OU-1422: feat: update perses dependecies to allow to tag the OLS contributed panels#1045

Open
jgbernalp wants to merge 1 commit into
openshift:mainfrom
jgbernalp:set-tag-on-ols-created-dashboards
Open

OU-1422: feat: update perses dependecies to allow to tag the OLS contributed panels#1045
jgbernalp wants to merge 1 commit into
openshift:mainfrom
jgbernalp:set-tag-on-ols-created-dashboards

Conversation

@jgbernalp

@jgbernalp jgbernalp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This PR upgrades the perses dependencies to the version that allow to set the dashboard metadata. This allows to set a tag in the dashboard for dashboards that receive panels from OLS.

Summary by CodeRabbit

  • New Features

    • Panels added through external workflows are now labeled as AI-assisted in dashboard metadata.
  • Bug Fixes

    • Updated time-series query handling to improve compatibility with the latest dashboard integrations.
    • Refreshed dashboard and data-source integration components for improved reliability.

@jgbernalp jgbernalp requested a review from PeterYurkovich July 8, 2026 14:35
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 8, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 8, 2026

Copy link
Copy Markdown

@jgbernalp: This pull request references OU-1422 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

This PR upgrades the perses dependencies to the version that allow to set the dashboard metadata. This allows to set a tag in the dashboard for dashboards that receive panels from OLS.

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.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2026
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jgbernalp

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-coo-ocp-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@jgbernalp: once the present PR merges, I will cherry-pick it on top of release-coo-ocp-4.22 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-coo-ocp-4.22

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.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Walkthrough

Perses dependencies and query definitions were updated for the newer API shape. Externally added panels now ensure dashboards include the ai-assisted metadata tag before applying changes.

Changes

Perses dashboard updates

Layer / File(s) Summary
Update Perses query integration
web/package.json, web/src/features/perses-dashboards/components/PersesWrapper.tsx, web/src/features/perses-dashboards/ols-tool-ui/ShowTimeseries.tsx
Perses packages and imports were updated, query props now use QueryDefinition, and time-series queries use the TimeSeriesQuery wrapper format.
Tag externally added panels
web/src/features/perses-dashboards/pages/dashboard-page/external-panel-addition.tsx
Externally added panels append the ai-assisted dashboard tag when missing before queued changes are applied.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: etmurasaki, peteryurkovich

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating Perses dependencies to enable tagging OLS-contributed panels.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The patch changes only implementation files; no Ginkgo tests or test titles were added or modified, so there are no unstable test names to flag.
Test Structure And Quality ✅ Passed PR only changes web TSX/package files; no Ginkgo test code is touched, so the test-structure checklist is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes Perses dashboard TSX components/deps; no new Ginkgo e2e tests or MicroShift-sensitive test code were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo/e2e tests were added; the PR only changes Perses frontend code and dependency wiring, so SNO-specific test compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Diff only touches web frontend/Perses deps and dashboard metadata; no deployment manifests, controllers, or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed No added stdout writes or process-level logging in the changed files; the edits only adjust Perses types, query shapes, and dashboard metadata.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes Perses web UI code and dependency/type updates, with no IPv4 or external-network test logic.
No-Weak-Crypto ✅ Passed Changed files only update Perses UI/dependency code; no weak ciphers, custom crypto, or secret/token comparisons are present.
Container-Privileges ✅ Passed No changed container/K8s manifests; the diff contains no privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The touched files add no console/logger output; the new ai-assisted tag is metadata, not logged data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/package.json`:
- Around line 77-82: The `@perses-dev` dependencies in web/package.json are pinned
to pre-release beta versions, so update the version entries for the affected
`@perses-dev/`* packages to stable releases before merging. Focus on the
dependency block containing `@perses-dev/components`, `@perses-dev/spec`,
`@perses-dev/dashboards`, `@perses-dev/explore`, `@perses-dev/plugin-system`, and
`@perses-dev/client`, and replace the beta pins with non-prerelease versions that
are compatible with the rest of the web build.

In `@web/src/components/dashboards/perses/ExternalPanelAddition.tsx`:
- Around line 85-91: The effect in ExternalPanelAddition is depending on the
full dashboardStore object, which causes unnecessary re-runs on every store
update and can feedback into the setMetadata update path. Remove dashboardStore
from the dependency array in the effect that uses queuedPanel,
dashboardStore.panelEditor, and dashboardStore.panelGroupOrder, and keep only
the specific stable fields and values actually read inside the effect.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4b11e625-8d9c-41a3-98f4-f310ff28c018

📥 Commits

Reviewing files that changed from the base of the PR and between 097f674 and 0bf0ea8.

⛔ Files ignored due to path filters (1)
  • web/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • web/package.json
  • web/src/components/dashboards/perses/ExternalPanelAddition.tsx
  • web/src/components/dashboards/perses/PersesWrapper.tsx
  • web/src/components/ols-tool-ui/ShowTimeseries.tsx

Comment thread web/package.json
Comment thread web/src/components/dashboards/perses/ExternalPanelAddition.tsx Outdated
@jgbernalp jgbernalp force-pushed the set-tag-on-ols-created-dashboards branch from 0bf0ea8 to 2bf750c Compare July 9, 2026 09:49
@jgbernalp jgbernalp marked this pull request as ready for review July 9, 2026 09:50
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2026
@openshift-ci openshift-ci Bot requested a review from etmurasaki July 9, 2026 09:50
@zhuje

zhuje commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2026
@zhuje

zhuje commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

…anels

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@PeterYurkovich PeterYurkovich force-pushed the set-tag-on-ols-created-dashboards branch from 2bf750c to eb9fa7e Compare July 14, 2026 23:05
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2026
@PeterYurkovich

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp, PeterYurkovich, zhuje

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:
  • OWNERS [PeterYurkovich,jgbernalp,zhuje]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
web/src/features/perses-dashboards/components/PersesWrapper.tsx (1)

41-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use type imports for types.

As per coding guidelines, use type imports for symbols that are only used for type checking.

♻️ Proposed refactor
-import {
+import type {
   BuiltinVariableDefinition,
   DurationString,
   QueryDefinition,
   UnknownSpec,
 } from '`@perses-dev/spec`';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/features/perses-dashboards/components/PersesWrapper.tsx` around lines
41 - 46, Update the import from `@perses-dev/spec` in PersesWrapper.tsx so symbols
used only as types are imported via type-only syntax, while preserving any
runtime imports if present.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@web/src/features/perses-dashboards/components/PersesWrapper.tsx`:
- Around line 41-46: Update the import from `@perses-dev/spec` in
PersesWrapper.tsx so symbols used only as types are imported via type-only
syntax, while preserving any runtime imports if present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d4a0c3f0-2ddc-45a8-b628-0eb52dae7d34

📥 Commits

Reviewing files that changed from the base of the PR and between 2bf750c and eb9fa7e.

⛔ Files ignored due to path filters (1)
  • web/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • web/package.json
  • web/src/features/perses-dashboards/components/PersesWrapper.tsx
  • web/src/features/perses-dashboards/ols-tool-ui/ShowTimeseries.tsx
  • web/src/features/perses-dashboards/pages/dashboard-page/external-panel-addition.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/package.json

@PeterYurkovich

Copy link
Copy Markdown
Contributor

/label qe-approved

@openshift-ci openshift-ci Bot added the qe-approved Signifies that QE has signed off on this PR label Jul 14, 2026
@PeterYurkovich

Copy link
Copy Markdown
Contributor

Rebased the PR to pull in the latest changes

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD cbab71e and 2 for PR HEAD eb9fa7e in total

@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@jgbernalp: 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/okd-scos-images eb9fa7e link true /test okd-scos-images
ci/prow/images eb9fa7e link true /test images
ci/prow/periodics-images eb9fa7e link true /test periodics-images

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.

@jgbernalp

jgbernalp commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/hold

This requires changes also in the Perses backend. We have to synchronize the change in konflux when we update the perses fork.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants