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

  • Bug Fixes
    • Improved application of externally queued dashboard panels, ensuring an ai-assisted tag is preserved when updating dashboard metadata.
    • Updated time series/query wiring to match the latest Perses query shape, improving compatibility for time series and datasource features.
  • Chores
    • Updated Perses-related packages to newer beta releases and adjusted the client/spec dependencies accordingly.

@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 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgbernalp

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

Updates Perses package dependencies, adjusts Perses query definition types and wrappers to the newer client shapes, reshapes the timeseries definition input, and adds ai-assisted dashboard tagging before applying externally queued panels.

Changes

Perses Dependency and Query Shape Updates

Layer / File(s) Summary
Dependency and query contract updates
web/package.json, web/src/components/dashboards/perses/PersesWrapper.tsx, web/src/components/ols-tool-ui/ShowTimeseries.tsx
Updates Perses package versions and module sources, changes the datasource wrapper query prop to QueryDefinition<Kind, UnknownSpec>[], and nests the timeseries query under spec.plugin.spec.query.
External panel metadata tagging
web/src/components/dashboards/perses/ExternalPanelAddition.tsx
Adds the ai-assisted tag to dashboard metadata before applying a queued panel and documents the effect dependency exception.

Estimated code review effort: 2 (Simple) | ~15 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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 No Ginkgo test titles were added or modified in the PR diff; only production TSX files and package files changed.
Test Structure And Quality ✅ Passed PR changes only web TSX/package files; no Go/Ginkgo test files or test code were modified.
Microshift Test Compatibility ✅ Passed The PR only changes web TS/JSON files; no Ginkgo tests or MicroShift-relevant APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo/e2e test files or It/Describe/Context additions in this PR; changes are UI/component and package updates only.
Topology-Aware Scheduling Compatibility ✅ Passed Only UI/dependency updates; no manifests, controllers, replicas, node selectors, affinity, or PDBs were added.
Ote Binary Stdout Contract ✅ Passed Touched files are component/dependency updates only; no main/init/TestMain suite code or stdout writes were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests were added; the PR only changes React components and perses deps, with no IPv4-only logic or external public-network calls.
No-Weak-Crypto ✅ Passed No weak crypto APIs, algorithms, custom crypto, or secret/token comparisons were added; the lockfile change only updates Perses/module-federation deps.
Container-Privileges ✅ Passed PR changes only web package/TSX files; no container/K8s manifests or privilege settings were modified.
No-Sensitive-Data-In-Logs ✅ Passed Touched files add no console/logger output or debug traces, and no sensitive values are written to logs.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and matches the main change: updating Perses dependencies to support tagging OLS-contributed panels.
✨ 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
…anels

Signed-off-by: Gabriel Bernal <gbernal@redhat.com>
@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
@openshift-ci

openshift-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@jgbernalp: all tests passed!

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants