Skip to content

feat(topology): add controls to filter report results from Topology decorator #1609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Apr 15, 2025

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Depends on cryostatio/cryostat#880

Description of the change:

image

Adds a Settings tab for Topology configuration. This tab currently just contains this dual-list selector. The available rules to be analyzed come from the backend's new /api/v4.1/reports_rules endpoint, which provides a list of JMC analysis rules known to the current Cryostat server (which should match any configured sidecar report generators as well). The backend provides these as a flat list, and the frontend organizes them into a tree based on the topic keys forming parent nodes to children of the same topic. The selected rules to be ignored in the Topology view context are just selections from that list of available rules. The screenshot shows the default state set up in this PR, which will be the default for any browser client on first run after this PR. The actual client-side representation of these selections is simply a flat list of the rule IDs (this presumes no rules have null or duplicate IDs), which is stored in the Redux store and therefore persisted to localstorage and restored whenever the frontend is reopened.

Motivation for the change:

Some automated analysis rules report about dynamic performance issues (ex. heap allocation, CPU usage) whereas others report about potential JVM configuration issues (ex. the ones ignored by default here). For the purposes of the Topology view, which is intended more to give a performance-oriented overview of the entire deployment scenario, it is more useful for the node health decorator to be colour-coded and display information that only accounts for dynamic performance rules and ignores configuration rules. In particular, in Kubernetes environments, rules about PID 1 or passwords being present in environment variables/system properties/JVM arguments are probably unwanted noise for users, especially in a Topology overview context.

How to manually test:

  1. Check out this PR, Cryostat server dependency PR, and -core dependency PR. Build all together.
  2. Run smoketest with this new image, ex. ./smoketest.bash -O -t quarkus-cryostat-agent (in the Cryostat project directory)
  3. Check Topology view with the default settings established here. Check the report status node decorator on the quarkus-cryostat-agent instance (wait for it to push recordings if nothing is shown yet).
    Screenshot_2025-04-16_14-38-14
  4. Go to Settings view (cog icon on masthead), then Topology tab. Click the double-chevron to remove all of the selections. Return to Topology view and check the report status node decorator again. There should be 4 more evaluated rules and the score will likely be higher (75).
    Screenshot_2025-04-16_14-39-17
  5. Check the archived recordings reports directly, as well as target analyses, and verify that the selections made in the Settings tab do not affect these. These settings should only affect the Topology node decorator.
  6. Go back to the Settings > Topology tab and click "Restore defaults". This should reset the state and behaviour.

@andrewazores andrewazores added feat New feature or request safe-to-test labels Apr 15, 2025
Copy link

This PR/issue depends on:

@andrewazores andrewazores marked this pull request as ready for review April 16, 2025 20:06
@andrewazores andrewazores requested a review from a team April 16, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependent feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant