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(recordings): correctly retrieve custom event templates from S3 storage #492

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Jun 3, 2024

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


Fixes: #491
Depends on cryostatio/cryostat-core#403
See #342
See cryostatio/cryostat-core#389

Description of the change:

Some recent patches to Cryostat and cryostat-core changed how event templates are handled. The current Cryostat main has a bug where custom event templates can be successfully uploaded to storage, listed, and downloaded back from storage, but when trying to use the template to create a new recording then the action fails. The root of the failure is that Cryostat tries to start the recording by asking the -core service implementation to start the recording using the custom event template, but that is no longer implemented in 3.0 - this is the code path that in <=2.4 would check for the custom event template on direct disk storage. The new implementation in this PR checks if the desired template is a custom one, and if so retrieves it from S3 storage first before passing it back through the same old code path to start the recording.

How to manually test:

  1. Check out related core PR, ./mvnw clean install it. Then check out and build this PR: ./mvnw -o clean package ; podman image prune -f. ./smoktest.bash -Ot
  2. Get a custom event template, ex. download an existing template and modify the top <configuration> element
  3. Upload the new custom event template
  4. Try to start a recording using this template

Copy link

github-actions bot commented Jun 3, 2024

This PR/issue depends on:

@andrewazores andrewazores marked this pull request as draft June 3, 2024 18:41
@andrewazores andrewazores marked this pull request as ready for review June 3, 2024 19:04
@andrewazores andrewazores requested review from aali309 and mwangggg June 3, 2024 19:34
@andrewazores andrewazores force-pushed the gh491 branch 2 times, most recently from 47b06c0 to 6c0db23 Compare June 3, 2024 20:26
@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Jun 3, 2024

Workflow started at 6/3/2024, 4:27:01 PM. View Actions Run.

Copy link

github-actions bot commented Jun 3, 2024

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

@andrewazores
Copy link
Member Author

Ah right, CI won't work until after cryostatio/cryostat-core#403 .

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.

Looks good to me.

@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Jun 3, 2024

Workflow started at 6/3/2024, 5:39:52 PM. View Actions Run.

Copy link

github-actions bot commented Jun 3, 2024

No OpenAPI schema changes detected.

Copy link

github-actions bot commented Jun 3, 2024

No GraphQL schema changes detected.

Copy link

github-actions bot commented Jun 3, 2024

CI build and push: All tests pass ✅ (JDK17)
https://github.com/cryostatio/cryostat3/actions/runs/9357626852

@andrewazores andrewazores merged commit 65f9b30 into cryostatio:main Jun 3, 2024
10 of 11 checks passed
@andrewazores andrewazores deleted the gh491 branch June 3, 2024 21:47
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.

[Bug] Cryostat fails to start recording using CUSTOM event templates
2 participants