Closed andrewazores closed 3 weeks ago
/build_test
Workflow started at 6/5/2024, 1:15:44 PM. View Actions Run.
No GraphQL schema changes detected.
No OpenAPI schema changes detected.
CI build and push: All tests pass ✅ (JDK17) https://github.com/cryostatio/cryostat3/actions/runs/9388437939
Welcome to Cryostat3! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Fixes: #495
Description of the change:
Corrects a database query. Previously it queried with
find("id", (String) null)
, which generates a SQL query likeselect from Target where jvmId = null
and returns no results, even when there are targets with null JVM IDs. The new query is slightly different:select from Target where jvmId is null
, with the is null being the significant difference. With this the database query correctly comes back with the targets with a null JVM ID.https://stackoverflow.com/questions/9581745/sql-is-null-and-null
Motivation for the change:
This fixes the Target persist hook that is responsible for checking if newly stored credentials apply to targets, checking for targets which do not yet have a JVM ID, and then using the new credentials to try to set the target's JVM ID.
How to manually test:
./smoketest.bash -Ot
target.alias.contains('andrew')
,admin:adminpass123
. TheCredentialsStored
notification should appear, and so should a target update notification for each target