-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2907 from DataDog/cbeauchesne/python-2799
[python] Use healthcheck to get info #2799
- Loading branch information
Showing
15 changed files
with
93 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -658,7 +658,7 @@ def configure(self, replay): | |
) | ||
|
||
# https://github.com/DataDog/system-tests/issues/2799 | ||
if self.library in ("nodejs",): | ||
if self.library in ("nodejs", "python"): | ||
self.healthcheck = { | ||
"test": f"curl --fail --silent --show-error localhost:{self.port}/healthcheck", | ||
"retries": 60, | ||
|
@@ -685,18 +685,14 @@ def configure(self, replay): | |
else: | ||
self.appsec_rules_file = (self.image.env | self.environment).get("DD_APPSEC_RULES", None) | ||
|
||
if self.weblog_variant == "python3.12": | ||
if self.library < "[email protected]": # profiling causes a seg fault on 2.0.0 | ||
self.environment["DD_PROFILING_ENABLED"] = "false" | ||
|
||
def post_start(self): | ||
from utils import weblog | ||
|
||
logger.debug(f"Docker host is {weblog.domain}") | ||
|
||
# new way of getting info from the weblog. Only working for nodejs right now | ||
# new way of getting info from the weblog. Only working for nodejs and python right now | ||
# https://github.com/DataDog/system-tests/issues/2799 | ||
if self.library == "nodejs": | ||
if self.library in ("nodejs", "python"): | ||
with open(self.healthcheck_log_file, mode="r", encoding="utf-8") as f: | ||
data = json.load(f) | ||
lib = data["library"] | ||
|
@@ -749,6 +745,10 @@ def __init__(self, host_log_folder) -> None: | |
image_name="postgres:alpine", | ||
name="postgres", | ||
host_log_folder=host_log_folder, | ||
# healthcheck={ | ||
# "test": "pg_isready -q -U postgres -d system_tests_dbname", | ||
# "retries": 30, | ||
# }, | ||
user="postgres", | ||
environment={"POSTGRES_PASSWORD": "password", "PGPORT": "5433"}, | ||
volumes={ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
utils/build/docker/python/parametric/system_tests_library_version.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
python -c "import ddtrace; print(ddtrace.__version__)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters