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(noti): set STOPPED state for ActiveRecordingStopped notifications #1430

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented Mar 27, 2023

Welcome to Cryostat! 👋

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 the last commit: git commit --amend --signoff

Fixes #1428

Description of the change:

Correct the descriptor state before sending notifications.

Motivation for the change:

See #1428

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
  2. Create any recording then stop it. Observe the payload containing a recs that has STOPPED state.

@tthvo tthvo added the fix label Mar 27, 2023
@tthvo tthvo requested review from andrewazores and maxcao13 March 27, 2023 02:13
@mergify mergify bot added the safe-to-test label Mar 27, 2023
@tthvo tthvo force-pushed the recs-stop-state branch from e4b7dad to fc0f685 Compare March 27, 2023 02:17
@github-actions
Copy link
Contributor

Test image available:

$ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1430-fc0f68542723772b193431e3fcc18bc975657bfa sh smoketest.sh

Copy link
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

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

INFO: Outgoing WS message: {"meta":{"category":"ActiveRecordingStopped","type":{"type":"application","subType":"json"},"serverTime":1679954870},"message":{"recording":{"downloadUrl":"http://localhost:8181/api/v1/targets/service:jmx:rmi:%2F%2F%2Fjndi%2Frmi:%2F%2Flocalhost:9095%2Fjmxrmi/recordings/asdf","reportUrl":"http://localhost:8181/api/v1/targets/service:jmx:rmi:%2F%2F%2Fjndi%2Frmi:%2F%2Flocalhost:9095%2Fjmxrmi/reports/asdf","metadata":{"labels":{}},"archiveOnStop":false,"id":2,"name":"asdf","state":"STOPPED","startTime":1679954840322,"duration":30000,"continuous":false,"toDisk":true,"maxSize":0,"maxAge":0},"target":"service:jmx:rmi:///jndi/rmi://localhost:9095/jmxrmi"}}

Works well! Looks good to me!

@andrewazores andrewazores merged commit b3b8a01 into cryostatio:main Mar 28, 2023
@tthvo tthvo deleted the recs-stop-state branch March 28, 2023 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] ActiveRecordingStopped notification has RUNNING state field
3 participants