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

[Bug] Archives > All Archives > Download does not download JFR file #1738

Closed
andrewazores opened this issue Oct 23, 2023 · 17 comments · Fixed by #1746
Closed

[Bug] Archives > All Archives > Download does not download JFR file #1738

andrewazores opened this issue Oct 23, 2023 · 17 comments · Fixed by #1746
Assignees
Labels
bug Something isn't working

Comments

@andrewazores
Copy link
Member

andrewazores commented Oct 23, 2023

Current Behavior

Since #1692 / #1731 , attempting to download archived recording from the All Archives view partially fails - the JSON metadata file is downloaded, but the actual JFR binary is not.

Expected Behavior

Both the metadata JSON and the JFR binary should be downloaded to the local workstation filesystem.

Steps To Reproduce

  1. Ensure clean state: rm -rf conf/h2* conf/postgres archive/* conf/metadata conf/probes.d conf/rules
  2. Check out latest main or latest cryostat-v2.4 upstream branches, ./mvnw clean package ; podman image prune -f
  3. Run sh smoketest.sh
  4. Select a target, ex. localhost:0 (Cryostat itself)
  5. Create a flight recording, give it at least a few seconds, then archive it
  6. Go to Archives view, select All Archives tab. Expand the table row for localhost:0, click the overflow menu on the recording item, and attempt to download it
  7. Observe what gets downloaded. There should be both a .jfr and a .metadata.json

Environment

- Version: 2.4.0-snapshot, 2.5.0-snapshot

Anything else?

No response

@andrewazores
Copy link
Member Author

Hang on, let me re-test this. It occurs to me that maybe the problem was my testing setup - I used the CI-built test image that should have included the correct frontend changes, but maybe that didn't work and the problem is actually the mismatch of versions.

@andrewazores
Copy link
Member Author

No, I don't think that was it - I can still reproduce the failure with a hand-built test image.

@mwangggg
Copy link
Member

I just tested without the frontend changes from cryostatio/cryostat-web#1127 and I am able to download both the jfr and the metadata json. I will test with the frontend changes and see if the jfr file isn't being downloaded?

@mwangggg
Copy link
Member

even when I run with the CI-built test image or by running yarn start:dev, I see both files being downloaded

@andrewazores
Copy link
Member Author

Hmm. Make sure to try a hard-refresh in your browser as well (probably ctrl+shift+r) to make sure that your browser isn't reusing a cached version of the web-client. We have stuff in the web build process that should cachebust when the client is rebuilt but it doesn't seem to always work as intended.

I'll also try to reproduce this again to verify it's real.

@mwangggg
Copy link
Member

mwangggg commented Oct 23, 2023

I used the CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1127-41c6eeb8817efb52e625a803edf6ceffbd19196d sh smoketest.sh command in my main branch and hard-refreshed my browser and it's still downloading both files:
Screenshot from 2023-10-23 15-58-44

@andrewazores
Copy link
Member Author

Huh, trying it again now it seems to work with the CI-built image for me as well. I'll close this issue then and reopen it in case the issue reappears.

@github-project-automation github-project-automation bot moved this from Todo to Done in 2.4.0 release Oct 23, 2023
@tthvo
Copy link
Member

tthvo commented Oct 23, 2023

Sorry I am seeing the same issue when building the image from latest main. The issue seems to say that the resource does not actually exist.

image

@andrewazores
Copy link
Member Author

^ @tthvo did you check out cryostatio/cryostat-web#1127 along with that build?

@tthvo
Copy link
Member

tthvo commented Oct 23, 2023

Yehh I tried with the image @mwangggg sent above.

image

@andrewazores
Copy link
Member Author

Bah. Trying it once again now and I'm also seeing the .jfr download failure too.

@andrewazores andrewazores reopened this Oct 23, 2023
@tthvo
Copy link
Member

tthvo commented Oct 23, 2023

Logs are not that very helpful haha

WARNING: 10.0.2.100 - - [Mon, 23 Oct 2023 20:55:50 GMT] 2ms "GET /api/beta/fs/recordings/LBAWISRZJVBVCTRYNBVDOZSZIFXGQ2DXIFXFQNTOMM4UGMS2IRJEQU2GMRWGCZJVGNCTQPI=/es-andrewazor-demo-Main_test1_20231023T203544Z.jfr/jwt?token=eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..h6dIg2T14O9fC52w.FECthc2_O3HqU8ff2OwGtc18Xh67X_XuWt_4EqOQQ1ZLk_Xg81UODvx7eaCExkPTpCXTXh6hpfkFuyaT6Dci0rbg_mDvUrwKZVfL4GiDFp1_RUCbeJ_M00lwVXMJUq4kmbFws_sXwXVtgrfN4k7jfMY9RvGeAsTRQckID4FL6HOdIOyoi1453BiAI2bLvp3Mmic65y1v_Dktgtf1C2lr18PzDQpajcnPdJy85Oj21osUbDqJziAGMw3xM2FFj2-ufpXcfc_YYurvFN_MBkZ_u7wJfP-yQSH5w6lU3zRITFRHRDgxg2B9vHpfmVybIe5LA1cjYpke9EOHo59DGJPcGdMKBMSnOSish5dJUkj3Ly5GP8M82Jnw-eZakQ_kBLq1OlruG6mfL2PlsoWwjz38wU_gLMesVf59Me8y6_MoIckvQQ5SVjqvd03ZLt31raL4OMkX2k2X78ghCTJj5ABeH8s9Fs3UHc-2EZ99y6Bg94CZ78Rda1AN7V_qD9uRzpbSOwr03bsvOs4FpysfbMZa77QmWkS6P0xKTtjn_VuyB28LVsZCKGgfj5Lr8mjarTo84nqvE1gxq7OQgOJyWPM3vy6ZJMVdq3KY2BnlB7Xmk5IbcWUsRRzS6GC-Ic5fL15Lp6aR_Yfl_jK0L1Rt4qiHi_TMEeP28rk.a_uV191Unl0c_XDBMm-4IA HTTP/1.1" 404 340 bytes "https://localhost:8181/archives?tab=all-archives" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"

@mwangggg
Copy link
Member

just tried again and I still can't reproduce this issue 😕

@andrewazores
Copy link
Member Author

andrewazores commented Oct 24, 2023

Using the same CI image as before, I just reproduced it now. Maybe let's try the exact same setup and see if we can narrow down where the differences come in.

image

  • rm -rf conf/h2* conf/postgres archive/* conf/metadata conf/probes.d conf/rules to ensure clean state/no existing archives
  • CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1127-41c6eeb8817efb52e625a803edf6ceffbd19196d sh smoketest.sh
  • Open https://localhost:8181 in browser and immediately hard-refresh, then log in (may also be worth trying incognito/private browsing mode instead of hard refresh)
  • Select JMX target cryostat:9093 vertx-fib-demo as discovered by JDP
  • Created a 30 second Profiling recording named test, let it archive on stop
  • Go to Archives > All Archives and try to download it

image

Screenshot_2023-10-24_09-58-03

@mwangggg
Copy link
Member

mwangggg commented Oct 24, 2023

With the exact same steps on my computer, I still see the jfr file 😕 I'm trying in incognito right now. (still downloading jfr in incognito)
Screenshot from 2023-10-24 10-05-54

Screenshot from 2023-10-24 10-06-02

@tthvo
Copy link
Member

tthvo commented Oct 24, 2023

@mwangggg Did u try downloading when in the All Archives tab? Above image shows you are trying in the All Targets tab.

@mwangggg
Copy link
Member

mwangggg commented Oct 25, 2023

oh my god ok I see it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants