Skip to content
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

fix(events): permit JFR Event Types without label attributes (backport #804) #805

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Feb 13, 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


Related to #803
Depends on cryostatio/cryostat-core#507

Description of the change:

JFR events do not necessarily have the label attribute, which in the JMC API is called name. The OpenJDK built-in events all happen to have this attribute, but custom application or framework events may not, and notably GraalVM has at least one event type (EveryChunkPeriodEvents) which has no label.

Motivation for the change:

Unlabelled JFR events would cause an NPE on /api/v4/targets/{id}/events query before this.

How to manually test:

  1. Combine with fix(jvmid): avoid NPE when target does not have expected MBean attribute cryostat-core#507 and feat(native): add quarkus-native example test-applications#34
  2. ./mvnw -o clean package
  3. ./smoketest.bash -O -t quarkus-native
  4. Open Cryostat UI, go to Events. Select jmxquarkus target. Ensure that Event Types table populates. Ensure that a recording can be started, archived, automated-analysis'd, etc.

This is an automatic backport of pull request #804 done by [Mergify](https://mergify.com).

Copy link

@andrewazores
Copy link
Member

/build_test

Copy link

Workflow started at 2/13/2025, 4:04:43 PM. View Actions Run.

Copy link

No GraphQL schema changes detected.

Copy link

No OpenAPI schema changes detected.

Copy link

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat/actions/runs/13317032518

@andrewazores andrewazores merged commit 08242d1 into cryostat-v4.0 Feb 13, 2025
13 of 14 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.

1 participant