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

use custom DNS in the ath container to enable HAR recording #1331

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented Aug 14, 2023

Use a custom DNS so firefox does not bypass the proxy, whilst also configuring docker with a mapping for the address to avoid flakyness.

The code will still work without the --add-host if people are starting the test suite manually, however it will then rely on an external DNS service which may be flaky.

Avoid using the sslip.io DNS service in CI whilst keeping it for local
debugging / test runs.

the entry for  JENKINS_LOCAL_HOSTNAME is added as a hosts for the docker
container when running in CI so that we do not trly on DNS queries in
the tests, but will still have a HAR when run locally in docker (unless
the host is also added there)
@jtnord jtnord requested a review from timja August 14, 2023 12:03
@jtnord jtnord marked this pull request as ready for review August 14, 2023 12:10
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

please file PRs for any consumers, e.g.

https://github.com/jenkinsci/jenkins/blob/master/ath.sh#L29

@@ -80,4 +80,4 @@ fi

set -x

BROWSER=$browser JENKINS_WAR=$war $MVN $extra_args "$@"
BROWSER=$browser JENKINS_LOCAL_HOSTNAME=jenkins.127.0.0.1.sslip.io JENKINS_WAR=$war $MVN $extra_args "$@"
Copy link
Member

Choose a reason for hiding this comment

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

should this be configurable?

Copy link
Member Author

@jtnord jtnord Aug 14, 2023

Choose a reason for hiding this comment

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

we could do it a different way - not modify the files and just start docker with the environment variable and the host I guess.

That way consumers will be unaffected, (but they would not get HAR files unless they adapted their usage)

@jtnord
Copy link
Member Author

jtnord commented Aug 14, 2023

please file PRs for any consumers, e.g.

https://github.com/jenkinsci/jenkins/blob/master/ath.sh#L29

do you know of any more consumers than this https://github.com/search?q=org%3Ajenkinsci%20jenkins%2Fath&type=code shows the only other consumer of the container as the xvnc plugin - but that does not use run.sh so will be unaffected.

jtnord added a commit to jtnord/jenkins that referenced this pull request Aug 14, 2023
downstream of jenkinsci/acceptance-test-harness#1331 adds a host entry to avoid DNS lookups using the sslip.io DNS service.
@jtnord jtnord marked this pull request as draft August 14, 2023 13:53
@timja
Copy link
Member

timja commented Aug 14, 2023

not that I know of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants