From 5e3dae39a6afb50fe2a39d97f3e605f2aea57d0e Mon Sep 17 00:00:00 2001 From: komal-rani522 Date: Thu, 8 Oct 2026 12:59:01 +0530 Subject: [PATCH 1/4] Migrate build and E2E tests to Azure Pipelines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 019ed4af-f34c-4cc8-8465-a038be55d9f6 --- .azuredevops/build.yml | 95 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 89 insertions(+), 6 deletions(-) diff --git a/.azuredevops/build.yml b/.azuredevops/build.yml index ce01168f..527ee373 100644 --- a/.azuredevops/build.yml +++ b/.azuredevops/build.yml @@ -1,14 +1,97 @@ -# Temporary Azure Pipelines bootstrap for .github/workflows/build.yml - trigger: - master pr: -- master + branches: + include: + - '*' pool: vmImage: ubuntu-latest -steps: -- script: echo "Hello from Azure Pipelines" - displayName: Hello world +variables: +- group: azure-kusto-python-e2e + +jobs: +- job: BuildAndTest + displayName: Build and test + timeoutInMinutes: 60 + strategy: + failFast: false + matrix: + Python39: + pythonVersion: '3.9' + Python310: + pythonVersion: '3.10' + Python311: + pythonVersion: '3.11' + Python312: + pythonVersion: '3.12' + Python313: + pythonVersion: '3.13' + steps: + - checkout: self + clean: true + + - task: UsePythonVersion@0 + displayName: Use Python $(pythonVersion) + inputs: + versionSpec: $(pythonVersion) + + - bash: | + set -euo pipefail + python -m pip install --disable-pip-version-check uv poethepoet + uv --version + poe --version + displayName: Install build tools + + - bash: poe test --ci --no-e2e + displayName: Run tests without Azure credentials + condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'True')) + + - task: AzureCLI@2 + displayName: Run unit and Kusto E2E tests + condition: and(succeeded(), ne(variables['System.PullRequest.IsFork'], 'True')) + inputs: + azureSubscription: $(AZURE_SERVICE_CONNECTION) + scriptType: bash + scriptLocation: inlineScript + inlineScript: poe test --ci + env: + TEST_DATABASE: $(TEST_DATABASE) + ENGINE_CONNECTION_STRING: $(ENGINE_CONNECTION_STRING) + APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING: $(APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING) + APPLICATION_INSIGHTS_TEST_DATABASE: $(APPLICATION_INSIGHTS_TEST_DATABASE) + + - bash: poe check-format + displayName: Run Ruff formatter check + condition: succeededOrFailed() + + - bash: poe lint + displayName: Run Ruff linter + condition: succeededOrFailed() + + - bash: poe types + displayName: Run type checking + condition: succeededOrFailed() + continueOnError: true + + - bash: poe docs --ci + displayName: Generate documentation + condition: and(succeededOrFailed(), eq(variables['pythonVersion'], '3.9'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + + - task: PublishTestResults@2 + displayName: Publish test results + condition: succeededOrFailed() + inputs: + testResultsFormat: JUnit + testResultsFiles: pytest*.xml + testRunTitle: Python $(pythonVersion) + failTaskOnMissingResultsFile: true + + - task: PublishPipelineArtifact@1 + displayName: Publish documentation + condition: and(succeededOrFailed(), eq(variables['pythonVersion'], '3.9'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + inputs: + targetPath: docs + artifact: documentation From 311bd78a8e7e1363e4f5952b8557ddd38f21a474 Mon Sep 17 00:00:00 2001 From: komal-rani522 Date: Thu, 8 Oct 2026 13:01:16 +0530 Subject: [PATCH 2/4] Fix Azure Pipelines matrix strategy Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 019ed4af-f34c-4cc8-8465-a038be55d9f6 --- .azuredevops/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azuredevops/build.yml b/.azuredevops/build.yml index 527ee373..7a4bb3a2 100644 --- a/.azuredevops/build.yml +++ b/.azuredevops/build.yml @@ -17,7 +17,6 @@ jobs: displayName: Build and test timeoutInMinutes: 60 strategy: - failFast: false matrix: Python39: pythonVersion: '3.9' From 82d6b9ec196f1e493a0443b2250316c8c921a452 Mon Sep 17 00:00:00 2001 From: komal-rani522 Date: Thu, 8 Oct 2026 13:24:13 +0530 Subject: [PATCH 3/4] Stabilize governed Python E2E tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 019ed4af-f34c-4cc8-8465-a038be55d9f6 --- .azuredevops/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azuredevops/build.yml b/.azuredevops/build.yml index 7a4bb3a2..2e2cfffe 100644 --- a/.azuredevops/build.yml +++ b/.azuredevops/build.yml @@ -17,6 +17,7 @@ jobs: displayName: Build and test timeoutInMinutes: 60 strategy: + maxParallel: 1 matrix: Python39: pythonVersion: '3.9' @@ -59,8 +60,6 @@ jobs: env: TEST_DATABASE: $(TEST_DATABASE) ENGINE_CONNECTION_STRING: $(ENGINE_CONNECTION_STRING) - APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING: $(APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING) - APPLICATION_INSIGHTS_TEST_DATABASE: $(APPLICATION_INSIGHTS_TEST_DATABASE) - bash: poe check-format displayName: Run Ruff formatter check From 793db65bbcf375b863a1466e746796a8aa6e1ab0 Mon Sep 17 00:00:00 2001 From: komal-rani522 Date: Tue, 13 Oct 2026 11:20:27 +0530 Subject: [PATCH 4/4] Use actual Azure service connection name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4ce38852-3d06-4124-b043-c7591a9f49f7 --- .azuredevops/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/build.yml b/.azuredevops/build.yml index 2e2cfffe..2c9ddfad 100644 --- a/.azuredevops/build.yml +++ b/.azuredevops/build.yml @@ -53,7 +53,7 @@ jobs: displayName: Run unit and Kusto E2E tests condition: and(succeeded(), ne(variables['System.PullRequest.IsFork'], 'True')) inputs: - azureSubscription: $(AZURE_SERVICE_CONNECTION) + azureSubscription: kusto-connectors-arm-sc scriptType: bash scriptLocation: inlineScript inlineScript: poe test --ci