From 96fdfd7a125465ce981290ef117dd6efb5ca89ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Tur=C3=B3ci?= <64769322+mturoci@users.noreply.github.com> Date: Tue, 18 Jul 2023 08:36:17 +0200 Subject: [PATCH] ci: Fix nightly. (#2077) --- e2e/Makefile | 1 + e2e/utils.py | 4 ++-- py/Makefile | 3 ++- setup.ps1 | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e/Makefile b/e2e/Makefile index d97da43ed3..186f416c86 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -1,6 +1,7 @@ setup: python3 -m venv venv + ./venv/bin/pip install --upgrade pip ./venv/bin/pip install -r requirements.txt ./venv/bin/python -m pip install --editable ../py/h2o_wave ./venv/bin/playwright install diff --git a/e2e/utils.py b/e2e/utils.py index 2b94693be6..079f0996bd 100644 --- a/e2e/utils.py +++ b/e2e/utils.py @@ -9,7 +9,7 @@ cwd = os.path.join(os.path.dirname(__file__)) wave_executable = os.path.join(cwd, 'venv', 'bin', 'wave') s = requests.Session() -s.mount('http://', HTTPAdapter(max_retries=Retry(total=15, backoff_factor=2))) +s.mount('http://', HTTPAdapter(max_retries=Retry(total=5, backoff_factor=2))) def start_waved(env: Optional[Dict[str, str]] = None): @@ -21,7 +21,7 @@ def start_waved(env: Optional[Dict[str, str]] = None): if waved_p.returncode is not None: raise Exception('Failed to start waved') - res = s.get(f'http://localhost:10101/{os.environ.get("H2O_WAVE_BASE_URL", "/")}') + res = s.get(f'http://localhost:10101/{os.environ.get("H2O_WAVE_BASE_URL", "/")}', timeout=10) if res.status_code != 200: raise Exception('Failed to start waved') diff --git a/py/Makefile b/py/Makefile index d5f0440cbf..90c7eb0695 100644 --- a/py/Makefile +++ b/py/Makefile @@ -36,8 +36,9 @@ setup: ## Install dependencies setup-tests: ## Install dependencies for tests only python3 -m venv venv + echo "# Generated in hatch_build.py\n__platform__ = 'linux'\n__arch__ = 'amd64'" > h2o_wave/h2o_wave/metadata.py ./venv/bin/python -m pip install --editable h2o_wave - ./venv/bin/pip install httpx + ./venv/bin/pip install httpx typing_extensions .PHONY: docs docs: ## Build API docs diff --git a/setup.ps1 b/setup.ps1 index 0ebeb8b298..c68818b288 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -9,8 +9,10 @@ Set-Location .. # Setup Py tests. Set-Location py python -m venv venv +.\venv\Scripts\python -m pip install --upgrade pip .\venv\Scripts\python -m pip install --editable h2o_wave -.\venv\Scripts\pip install httpx +.\venv\Scripts\pip install httpx typing_extensions +echo "# Generated in hatch_build.py\n__platform__ = 'linux'\n__arch__ = 'amd64'" > h2o_wave/h2o_wave/metadata.py if ($LastExitCode -ne 0) { exit $LastExitCode } Set-Location ..