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(recordings): implement PATCH recordingOptions #183

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Nov 22, 2023

Welcome to Cryostat3! 👋

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 #122
See #184
See #42
Depends on #185

Description of the change:

Reimplements PATCH for recordingOptions and re-enables the related test.

This is not actually used in the UI anywhere and is a bit of a questionable feature - this was originally implemented to allow the user to specify default recording options (maxAge, maxSize, toDisk) that would apply to every recording they would create. It's one of the very first functionalities implemented in the original cli container-jfr project and dates back to when the user would need to choose an individual target to connect to, choose whether to set these options, then invoke recording creation upon the connected target using those options. This operation doesn't properly account for the newer "connectionless" HTTP API system either, so despite the request URL containing a connectUrl path param, these options are actually set globally for the whole server instance on any target.

See #184 . This is a direct port of the implementation from 2.4 which has the issues outlined above. We should decide if this feature should be dropped from the API altogether, or if it makes sense to "modernize" it and find a way to make use of it in the UI.

How to manually test:

You could use curl/HTTPie to test the endpoint manually, but I'm not sure the value.

@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 11/22/2023, 2:15:29 PM. View Actions Run.

Copy link

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

Copy link

CI build and push: At least one test failed ❌
https://github.com/cryostatio/cryostat3/actions/runs/6961771201

@andrewazores andrewazores marked this pull request as draft November 22, 2023 19:23
@andrewazores
Copy link
Member Author

andrewazores commented Nov 22, 2023

Not ready yet - looks like this is pretty flakey, or rather, it's interacting badly with other tests.

@andrewazores andrewazores marked this pull request as ready for review November 27, 2023 17:42
@andrewazores
Copy link
Member Author

/build_test

Copy link

This PR/issue depends on:

Copy link

Workflow started at 11/27/2023, 12:42:45 PM. View Actions Run.

Copy link

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

@andrewazores andrewazores requested a review from aali309 November 27, 2023 17:45
Copy link

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

Copy link
Contributor

@aali309 aali309 left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewazores andrewazores merged commit 2e5d349 into cryostatio:main Nov 28, 2023
6 checks passed
@andrewazores andrewazores deleted the patch-itest branch November 28, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants