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(reports): report generation does not cause recursive update #368

Merged

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Apr 15, 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: #367

Description of the change:

See the linked bug. There is a Quarkus change that causes the default method implementations in the ReportsService to break the dependency injection system such that the memory caching layer decorator receives an instance of itself for injection, rather than the storage cache layer as a delegate. This causes it to recursively call itself, causing the original bug. Lifting the default method implementations out of the interface and into the concrete implementations fixes the injection bug.

Also renamed some constants for clarity, and re-enabled (largely reimplemented) the report generation test case (related to #42). Funnily enough, after reverting the Quarkus upgrade to the previous working version, fixing up this test suite, and then rolling the upgrade forward again, the bug was not caught by the tests... because the tests disable caching on purpose to ensure things are actually generated as expected and tests are independent of each other. But disabling the cache also fixes the bug inadvertently, while reducing performance.

For now the only enabled report generation tests are for active recordings, but enabling them for archived recordings as well would be good. I have other higher priority things to spend my time on right now, however.

How to manually test:

  1. Run smoketest
  2. Try to generate a report. It should succeed

@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 4/15/2024, 1:28:45 PM. View Actions Run.

Copy link

No OpenAPI schema changes detected.

Copy link

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

@andrewazores andrewazores force-pushed the report-generation-fail-test branch from 936cc76 to 4ad6270 Compare April 15, 2024 17:56
@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 4/15/2024, 2:50:02 PM. View Actions Run.

Copy link

No OpenAPI schema changes detected.

Copy link

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

@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 4/18/2024, 5:20:22 PM. View Actions Run.

Copy link

No OpenAPI schema changes detected.

Copy link

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

@andrewazores andrewazores force-pushed the report-generation-fail-test branch 3 times, most recently from ff7e2b3 to c748807 Compare April 23, 2024 18:41
@andrewazores andrewazores force-pushed the report-generation-fail-test branch from c748807 to aee6e18 Compare April 23, 2024 19:07
@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 4/24/2024, 11:16:54 AM. View Actions Run.

Copy link

No OpenAPI schema changes detected.

Copy link

No GraphQL schema changes detected.

Copy link

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

@andrewazores andrewazores merged commit bf13fb3 into cryostatio:main Apr 24, 2024
8 checks passed
@andrewazores andrewazores deleted the report-generation-fail-test branch April 24, 2024 15:31
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] Report generation failure
2 participants