whole-tale / girder_wholetale

Girder plugin providing basic Whole Tale functionality
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Wait for instance to return some content before assuming it works #563

Closed Xarthisius closed 1 year ago

Xarthisius commented 1 year ago

Problem

As reported by @craig-willis, there's a peculiar issue where Xpra based instances run successfully but iframe in the Interactive view doesn't show anything until you hard refresh the dashboard. It's caused by the fact that our current "health" check only looks for 200 status code, which might happen way before software inside the container actually initiliazes

Proposed solution

Apart from checking the error code we can check if GET instance_url returns any data.

How to test?

  1. Deploy on .stage (already did that)
  2. Run any STATA (desktop) tale and confirm that Xpra comes up without refresh.
codecov[bot] commented 1 year ago

Codecov Report

Base: 92.80% // Head: 92.78% // Decreases project coverage by -0.01% :warning:

Coverage data is based on head (ab8abae) compared to base (fe022c0). Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #563 +/- ## ========================================== - Coverage 92.80% 92.78% -0.02% ========================================== Files 60 60 Lines 4820 4822 +2 ========================================== + Hits 4473 4474 +1 - Misses 347 348 +1 ``` | [Impacted Files](https://codecov.io/gh/whole-tale/girder_wholetale/pull/563?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale) | Coverage Δ | | |---|---|---| | [server/models/instance.py](https://codecov.io/gh/whole-tale/girder_wholetale/pull/563/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale#diff-c2VydmVyL21vZGVscy9pbnN0YW5jZS5weQ==) | `86.78% <66.66%> (-0.43%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=whole-tale)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.