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(Targets): Target list fails to populate if WebSocket connection is not established #1276

Merged
merged 6 commits into from
Jun 11, 2024

Conversation

aali309
Copy link
Contributor

@aali309 aali309 commented Jun 11, 2024

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 all commits using a GPG signature

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


Fixes: #1272

Description of the change:

see #1272

Motivation for the change:

#1272 (comment)

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
  2. ...

@andrewazores
Copy link
Member

I think the fix for this problem should include changing this behaviour:

.pipe(concatMap((sessionState) => (sessionState === SessionState.USER_SESSION ? this.queryForTargets() : EMPTY)))

ie there are places where getSessionState() is called to prevent things from updating until the websocket is connected. The line linked above prevents the target list from loading until there is a websocket connection. Instead of changing the session state calculation, which I think already accurately reflects the actual websocket connection state, I think it might be better to search for places that call getSessionState() and see if it's really necessary to call it and check for a session.

For example here as well:

@aali309 aali309 force-pushed the TargetListFailsToPopulate branch from 9dea67b to e140058 Compare June 11, 2024 18:16
@andrewazores andrewazores force-pushed the TargetListFailsToPopulate branch from a6a4d65 to 5b21d14 Compare June 11, 2024 19:09
@andrewazores andrewazores merged commit d143a8b into cryostatio:main Jun 11, 2024
18 checks passed
mergify bot pushed a commit that referenced this pull request Jun 11, 2024
…s not established (#1276)

Co-authored-by: Andrew Azores <aazores@redhat.com>
(cherry picked from commit d143a8b)
andrewazores pushed a commit that referenced this pull request Jun 11, 2024
…s not established (#1276) (#1282)

Co-authored-by: Andrew Azores <aazores@redhat.com>
(cherry picked from commit d143a8b)

Co-authored-by: Atif Ali <56743004+aali309@users.noreply.github.com>
@aali309 aali309 deleted the TargetListFailsToPopulate branch June 11, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] Target list fails to populate if WebSocket connection is not established
2 participants