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

feat(matchexpressions): expressions can reference target JFR event type IDs #735

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Dec 6, 2024

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


See #733 (comment)
Related to #727
Related to #548

Description of the change:

See #733 (comment)

Motivation for the change:

Enables the creation of match expressions that evaluate the JFR event types available on a given target JVM. This probably isn't very useful for Stored Credentials, but for Automated Rules it will couple well with #733 , as well as with custom application-level JFR events. It becomes possible to define Automated Rules that use a preset or custom event template containing framework- or application-level events, and only activate on targets where those event types are actually present. For example, a Rule can be created that matches Quarkus applications which have the quarkus-jfr extension enabled.

How to manually test:

  1. Check out and build PR
  2. ./smoketest.bash -O
  3. Open UI
  4. Go to Automated Rules > Create
  5. See feat(eventtemplates): add Preset event templates type and Quarkus-specific preset #733 (comment) . In feat(eventtemplates): add Preset event templates type and Quarkus-specific preset #733 Cryostat itself adds the quarkus-jfr extension, so if these two PRs are combined then the Quarkus-specific events referenced in that comment can be used. Otherwise, an event type ID like jdk.CPULoad can be used to test the expression evaluation.

@mergify mergify bot added the safe-to-test label Dec 6, 2024
@andrewazores andrewazores added the feat New feature or request label Dec 6, 2024
@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Dec 6, 2024

Workflow started at 12/6/2024, 3:14:08 PM. View Actions Run.

@andrewazores andrewazores requested a review from a team December 6, 2024 20:14
@andrewazores andrewazores marked this pull request as ready for review December 6, 2024 20:14
Copy link

github-actions bot commented Dec 6, 2024

No OpenAPI schema changes detected.

Copy link

github-actions bot commented Dec 6, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Dec 6, 2024

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

@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Dec 6, 2024

Workflow started at 12/6/2024, 3:50:45 PM. View Actions Run.

Copy link

github-actions bot commented Dec 6, 2024

No OpenAPI schema changes detected.

Copy link

github-actions bot commented Dec 6, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Dec 6, 2024

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

@andrewazores andrewazores force-pushed the expressions-event-types branch from 3136928 to 329fec6 Compare December 19, 2024 21:32
@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 12/19/2024, 4:33:24 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/12421139486

@andrewazores andrewazores merged commit 9ca5669 into cryostatio:main Dec 19, 2024
9 checks passed
@andrewazores andrewazores deleted the expressions-event-types branch December 19, 2024 21:44
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.

2 participants