From 4da70f40f28410de4fe3e6a86ce2ef2bc9044d8e Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Tue, 28 Apr 2026 08:06:02 -0700 Subject: [PATCH 1/6] Remove unnecessary comment from requests.get in wait_for_emulator_start function --- pctasks/dev/pctasks/dev/cosmosdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pctasks/dev/pctasks/dev/cosmosdb.py b/pctasks/dev/pctasks/dev/cosmosdb.py index ef0a6dc6..34cbfcdb 100644 --- a/pctasks/dev/pctasks/dev/cosmosdb.py +++ b/pctasks/dev/pctasks/dev/cosmosdb.py @@ -34,7 +34,7 @@ def wait_for_emulator_start(url: str) -> None: try_count = 0 while True: try: - resp = requests.get(url, verify=False) # CodeQL [SM03157] Not used in production. # fmt: skip + resp = requests.get(url, verify=False) # CodeQL [SM03157] Not used in production. resp.raise_for_status() break except Exception as e: From 54ef9cfd83b48142e76095f0c807a5c3ec3cce3f Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Fri, 1 May 2026 11:03:50 -0700 Subject: [PATCH 2/6] build/pull pctasks-ingest before running tests --- .github/workflows/pr.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 51746421..868a53c9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,6 +34,10 @@ jobs: - name: Setup run: ./scripts/setup --no-aux-servers + - name: Build task images needed by unit tests + run: | + docker build -t pctasks-ingest:latest -f pctasks/ingest/Dockerfile pctasks + - name: Test run: ./scripts/test From 3bfcc33fd550984d86db2839c6a827ba2a01f86a Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Fri, 1 May 2026 11:24:36 -0700 Subject: [PATCH 3/6] undo adding image build --- .github/workflows/pr.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 868a53c9..51746421 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,10 +34,6 @@ jobs: - name: Setup run: ./scripts/setup --no-aux-servers - - name: Build task images needed by unit tests - run: | - docker build -t pctasks-ingest:latest -f pctasks/ingest/Dockerfile pctasks - - name: Test run: ./scripts/test From 702c15ce763d9489eec416a1d73b9bd6151b0140 Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Fri, 1 May 2026 11:48:07 -0700 Subject: [PATCH 4/6] experimenting with Copilot suggestions --- .github/workflows/pr.yml | 1 + pctasks/client/tests/test_client.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 51746421..71fae7c3 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,6 +6,7 @@ on: env: PCTASKS_COSMOSDB__URL: ${{ secrets.COSMOSDB_URL }} PCTASKS_COSMOSDB__TEST_CONTAINER_SUFFIX: ${{ github.run_id }} + PCTASKS_INGEST_IMAGE: localhost:5001/pctasks-ingest:latest permissions: id-token: write diff --git a/pctasks/client/tests/test_client.py b/pctasks/client/tests/test_client.py index c5e591ba..5570a016 100644 --- a/pctasks/client/tests/test_client.py +++ b/pctasks/client/tests/test_client.py @@ -1,3 +1,4 @@ +import os import pathlib import pytest @@ -26,7 +27,7 @@ def test_client_submit(): tasks=[ TaskDefinition( id="submit_unit_test", - image="pctasks-ingest:latest", + image= os.environ.get("PCTASKS_INGEST_IMAGE", "pctasks-ingest:latest"), code=CodeConfig(src=str(code)), task="mycode:MyMockTask", args={"result_path": "/dev/null"}, From 5f0ec8d442dbf8e6d2e8d37893faaccc8a9d55b1 Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Fri, 1 May 2026 12:01:44 -0700 Subject: [PATCH 5/6] Format code for better readability in test_client_submit function --- pctasks/client/tests/test_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pctasks/client/tests/test_client.py b/pctasks/client/tests/test_client.py index 5570a016..846e993c 100644 --- a/pctasks/client/tests/test_client.py +++ b/pctasks/client/tests/test_client.py @@ -27,7 +27,9 @@ def test_client_submit(): tasks=[ TaskDefinition( id="submit_unit_test", - image= os.environ.get("PCTASKS_INGEST_IMAGE", "pctasks-ingest:latest"), + image=os.environ.get( + "PCTASKS_INGEST_IMAGE", "pctasks-ingest:latest" + ), code=CodeConfig(src=str(code)), task="mycode:MyMockTask", args={"result_path": "/dev/null"}, From 8c5fb63d94362a62809d5f42e50b2eff18ee9e0b Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Fri, 1 May 2026 12:19:17 -0700 Subject: [PATCH 6/6] Undo changes --- .github/workflows/pr.yml | 1 - pctasks/client/tests/test_client.py | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 71fae7c3..51746421 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,7 +6,6 @@ on: env: PCTASKS_COSMOSDB__URL: ${{ secrets.COSMOSDB_URL }} PCTASKS_COSMOSDB__TEST_CONTAINER_SUFFIX: ${{ github.run_id }} - PCTASKS_INGEST_IMAGE: localhost:5001/pctasks-ingest:latest permissions: id-token: write diff --git a/pctasks/client/tests/test_client.py b/pctasks/client/tests/test_client.py index 846e993c..c5e591ba 100644 --- a/pctasks/client/tests/test_client.py +++ b/pctasks/client/tests/test_client.py @@ -1,4 +1,3 @@ -import os import pathlib import pytest @@ -27,9 +26,7 @@ def test_client_submit(): tasks=[ TaskDefinition( id="submit_unit_test", - image=os.environ.get( - "PCTASKS_INGEST_IMAGE", "pctasks-ingest:latest" - ), + image="pctasks-ingest:latest", code=CodeConfig(src=str(code)), task="mycode:MyMockTask", args={"result_path": "/dev/null"},