cryostatio / cryostat

Other
7 stars 8 forks source link

fix(recordings): correctly retrieve custom event templates from S3 storage #492

Closed andrewazores closed 1 month ago

andrewazores commented 1 month ago

Welcome to Cryostat3! 👋

Before contributing, make sure you have:

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


Fixes: #491 Depends on https://github.com/cryostatio/cryostat-core/pull/403 See #342 See https://github.com/cryostatio/cryostat-core/pull/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
github-actions[bot] commented 1 month ago

This PR/issue depends on:

andrewazores commented 1 month ago

/build_test

github-actions[bot] commented 1 month ago

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

github-actions[bot] commented 1 month ago

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

andrewazores commented 1 month ago

Ah right, CI won't work until after https://github.com/cryostatio/cryostat-core/pull/403 .

andrewazores commented 1 month ago

/build_test

github-actions[bot] commented 1 month ago

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

github-actions[bot] commented 1 month ago

No OpenAPI schema changes detected.

github-actions[bot] commented 1 month ago

No GraphQL schema changes detected.

github-actions[bot] commented 1 month ago

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