From e2f9f82bf7b7203f06c596bb831cfca1cc296732 Mon Sep 17 00:00:00 2001 From: Enrico Donnici Date: Mon, 18 Nov 2024 10:57:53 +0100 Subject: [PATCH 1/6] Run the master PR on pull requests for testing --- .github/workflows/master.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 5b9a125495f2d..7c9ef9f145031 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -4,6 +4,9 @@ on: push: branches: - master + pull_request: # DELETEME + branches: + - master jobs: cache: From cbbd6c08376a5b3bb446a6dcb9fdce88764fd233 Mon Sep 17 00:00:00 2001 From: Enrico Donnici Date: Mon, 18 Nov 2024 11:05:47 +0100 Subject: [PATCH 2/6] Log less while replaying traces. --- .ddev/ci/scripts/traces.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.ddev/ci/scripts/traces.py b/.ddev/ci/scripts/traces.py index 0d4ff11917563..1e8297c250ccb 100644 --- a/.ddev/ci/scripts/traces.py +++ b/.ddev/ci/scripts/traces.py @@ -40,10 +40,8 @@ def replay(*, record_file: str, port: int) -> None: record = json.loads(line) path = record['path'] body = b64decode(record['body']) - - print(f'PUT {path} {len(body)} bytes: ', end='') conn.request('PUT', path, body=body, headers=record['headers']) - print(conn.getresponse().read().decode('utf-8')) + print(conn.getresponse().status, conn.getresponse().reason) def main(): From eb46ea72591d595bc77f736694dad7d4c4ce8c7c Mon Sep 17 00:00:00 2001 From: Enrico Donnici Date: Mon, 18 Nov 2024 12:14:11 +0100 Subject: [PATCH 3/6] Fix response printing. --- .ddev/ci/scripts/traces.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ddev/ci/scripts/traces.py b/.ddev/ci/scripts/traces.py index 1e8297c250ccb..250fe7e1bad01 100644 --- a/.ddev/ci/scripts/traces.py +++ b/.ddev/ci/scripts/traces.py @@ -41,7 +41,8 @@ def replay(*, record_file: str, port: int) -> None: path = record['path'] body = b64decode(record['body']) conn.request('PUT', path, body=body, headers=record['headers']) - print(conn.getresponse().status, conn.getresponse().reason) + response = conn.getresponse() + print(response.status, response.reason) def main(): From 2264787e887dead97072a2ec9bd65578ea1227fc Mon Sep 17 00:00:00 2001 From: Enrico Donnici Date: Mon, 18 Nov 2024 12:20:57 +0100 Subject: [PATCH 4/6] Better fix for ResponseNotReady --- .ddev/ci/scripts/traces.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.ddev/ci/scripts/traces.py b/.ddev/ci/scripts/traces.py index 250fe7e1bad01..0210b9bc73caa 100644 --- a/.ddev/ci/scripts/traces.py +++ b/.ddev/ci/scripts/traces.py @@ -42,6 +42,7 @@ def replay(*, record_file: str, port: int) -> None: body = b64decode(record['body']) conn.request('PUT', path, body=body, headers=record['headers']) response = conn.getresponse() + response.read() # Needs to be done to prevent ResponseNotReady. print(response.status, response.reason) From bfe809defc6218446f9977f01af05de46ba0143a Mon Sep 17 00:00:00 2001 From: Enrico Donnici Date: Mon, 18 Nov 2024 14:53:31 +0100 Subject: [PATCH 5/6] Set the agent log level to "warn" for uploading traces. --- .github/workflows/submit-traces.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/submit-traces.yml b/.github/workflows/submit-traces.yml index c972794b20284..865471add95d9 100644 --- a/.github/workflows/submit-traces.yml +++ b/.github/workflows/submit-traces.yml @@ -21,7 +21,7 @@ jobs: DD_API_KEY: "${{ secrets.DD_API_KEY }}" DD_HOSTNAME: "none" DD_INSIDE_CI: "true" - DD_LOG_LEVEL: "trace" + DD_LOG_LEVEL: "warn" steps: - uses: actions/checkout@v4 From bc06bb553cea2ecdbca99e392d3e0996f3e515a2 Mon Sep 17 00:00:00 2001 From: Enrico Donnici Date: Mon, 18 Nov 2024 17:53:16 +0100 Subject: [PATCH 6/6] Remove testing code. --- .github/workflows/master.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 7c9ef9f145031..5b9a125495f2d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -4,9 +4,6 @@ on: push: branches: - master - pull_request: # DELETEME - branches: - - master jobs: cache: