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

test(smoketest): open services in browser tabs when ready #141

Merged
merged 7 commits into from
Nov 7, 2023

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Nov 4, 2023

Related to #64

To test:

$ ./smoketest.bash -h
$ ./smoketest.bash -b
$ ./smoketest.bash -Xgtb

etc.

@github-actions github-actions bot added the needs-triage Needs thorough attention from code reviewers label Nov 4, 2023
Copy link

github-actions bot commented Nov 4, 2023

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@andrewazores andrewazores added test safe-to-test and removed needs-triage Needs thorough attention from code reviewers labels Nov 6, 2023
@andrewazores andrewazores marked this pull request as ready for review November 6, 2023 19:11
aali309
aali309 previously approved these changes Nov 7, 2023
Copy link
Contributor

@aali309 aali309 left a comment

Choose a reason for hiding this comment

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

LGTM

@mwangggg
Copy link
Member

mwangggg commented Nov 7, 2023

hmm the tabs aren't opening when I use the -b tag

@aali309
Copy link
Contributor

aali309 commented Nov 7, 2023

hmm the tabs aren't opening when I use the -b command

./smoketest.bash -b ?

@mwangggg
Copy link
Member

mwangggg commented Nov 7, 2023

hmm the tabs aren't opening when I use the -b command

./smoketest.bash -b ?

Yes that's the command I'm using and the browser tabs aren't opening.

@andrewazores
Copy link
Member Author

andrewazores commented Nov 7, 2023

hmm the tabs aren't opening when I use the -b command

./smoketest.bash -b ?

Yes that's the command I'm using and the browser tabs aren't opening.

If you do xdg-open https://github.com in your terminal, does that work?

I think this will still end up being contingent on the userhosts and LD_PRELOAD working, since what's happening is that extra bash subshells are forked which poll the services' expected mapped ports and once they come up invokes xdg-open on that URL. But the hostname that the subshells are testing with curl are the service hostnames like s3 and cryostat3, not localhost, so if the userhosts setup isn't working then curl will always fail the poll check and never allow the xdg-open to run.

@mwangggg
Copy link
Member

mwangggg commented Nov 7, 2023

hmm the tabs aren't opening when I use the -b command

./smoketest.bash -b ?

Yes that's the command I'm using and the browser tabs aren't opening.

If you do xdg-open https://github.com in your terminal, does that work?

I think this will still end up being contingent on the userhosts and LD_PRELOAD working, since what's happening is that extra bash subshells are forked which poll the services' expected mapped ports and once they come up invokes xdg-open on that URL. But the hostname that the subshells are testing with curl are the service hostnames like s3 and cryostat3, not localhost, so if the userhosts setup isn't working then curl will always fail the poll check and never allow the xdg-open to run.

yes, that command does open github in my browser

@andrewazores
Copy link
Member Author

Okay, so then I think the culprit must be the userhosts thing.

@andrewazores
Copy link
Member Author

Try USE_USERHOSTS=false ./smoketest.bash -b. This should open things with localhost directly instead of trying to use the userhosts/LD_PRELOAD setup. If that works for you then you can add that line to your ~/.bashrc or similar shell configuration so that it always does that without having to write it out every time.

You might still want to try to fix your userhosts setup at some point because IIRC the way that I set up the jfr-datasource and Grafana dashboard will require it in this smoketest. If you don't fix it then "View in Grafana" won't work, even if everything else does via localhost.

Copy link
Member

@mwangggg mwangggg left a comment

Choose a reason for hiding this comment

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

looks good to me

@andrewazores andrewazores merged commit 7910714 into cryostatio:main Nov 7, 2023
9 checks passed
@andrewazores andrewazores deleted the smoketest-open-tabs branch November 7, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants