Skip to content

Migrate build and E2E tests to Azure Pipelines - #656

Merged
komal-rani522 merged 10 commits into
masterfrom
chore/migrate-azure-pipeline
Nov 11, 2026
Merged

komal-rani522 merged 10 commits into
masterfrom
chore/migrate-azure-pipeline

Conversation

@komal-rani522

@komal-rani522 komal-rani522 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Added

  • Azure Pipelines coverage for Python 3.9–3.13, with sequential matrix jobs to reduce shared E2E test-data conflicts.
  • uv dependency caching, formatting/lint checks, optional type checking, test-result publishing, and documentation artifacts.
  • Contributor instructions for the azure-kusto-python-e2e variable group, workload identity, required settings, and optional blob/Application Insights coverage.

Changed

  • Move build and E2E validation to Azure Pipelines and remove the GitHub Actions build workflow, including its suggested-change reviews and GitHub Pages deployment. Azure publishes documentation artifacts but does not deploy Pages.
  • Run unit and Kusto E2E tests for trusted builds using the explicit kusto-connectors-arm-sc service connection. The fork-build path runs tests without Azure credentials.
  • Use uv-managed Python installations instead of the hosted agent tool cache, including support for Python 3.9 on newer Ubuntu images.
  • Map variable-group settings into the test environment; fail explicitly for missing required inputs and warn when optional coverage is unavailable.
  • Run poe types with basedpyright --level error, making warnings non-blocking. The Azure type-check step remains optional, so actual type errors also do not fail the overall job.
  • Azure project policy disables fork PR runs and requires maintainer approval for same-repository PR runs. These policies and service-connection approvals are configured outside the YAML.

Fixed

  • Provide an explicit nonsecret dummy engine URL only for the credential-free fork step, preventing token-provider test collection from depending on variable-group availability.
  • Correct the ingestion-by-tag E2E test by seeding tagged data before attempting duplicate ingestion and checking that the row count remains unchanged throughout a bounded observation window.
  • Resolve 24 type-check errors through typing corrections and compatible test updates, without intended SDK behavior changes.

Validation

Validated on commit 5e28d05de3b8871d54c0ec2f1f2c4e3452d666d5 by Azure Pipelines run 20261110.6: Succeeded (not partially succeeded), covering the complete Python 3.9–3.13 matrix.

Python Passed Skipped Failed Pytest warnings
3.9 301 35 0 24
3.10 301 35 0 24
3.11 301 35 0 24
3.12 301 35 0 161
3.13 301 35 0 161
  • poe test --ci (pytest -n8 --junit-xml pytest.xml) — passed across all five Python versions, including blob ingestion.
  • poe check-format and poe lint — passed across the matrix.
  • poe types (uv run basedpyright --level error) — passed across all five versions with no reported errors. Warnings are filtered by the error-only policy, not resolved in source.
  • The 35 skips per version are existing conditions: 24 optional authentication tests, 8 unsupported redirect cases, 1 cloud-metadata 404 case, 1 MSI timeout test, and 1 local-emulator test. Blob ingestion was not skipped.
  • Remaining non-blocking warnings include pandas downcasting, deprecated datetime.utcnow() on Python 3.12+, missing local .env, the hosted-image migration notice, and a cache-key change between restore/save as the lockfile hash changes during the job.
  • Credential-free collection check: with ENGINE_CONNECTION_STRING=https://dummy.kusto.windows.net and authentication environment variables cleared, uv run --no-sync pytest --collect-only -n0 -q --ignore=azure-kusto-data\tests\test_e2e_data.py --ignore=azure-kusto-ingest\tests\test_e2e_ingest.py — passed locally, 289 tests collected (exit code 0). The Azure run was a trusted-branch run and did not execute the fork-only step.
  • Documentation generation/publication is restricted to master and was not exercised by this branch run. GitHub Pages deployment is no longer provided by this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 019ed4af-f34c-4cc8-8465-a038be55d9f6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 019ed4af-f34c-4cc8-8465-a038be55d9f6
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    5 files  ±0      5 suites  ±0   14m 14s ⏱️ + 6m 47s
  336 tests ±0    301 ✅ ±0   35 💤 ±0  0 ❌ ±0 
1 680 runs  ±0  1 505 ✅ ±0  175 💤 ±0  0 ❌ ±0 

Results for commit 2e190be. ± Comparison against base commit 3f53425.

♻️ This comment has been updated with latest results.

komal-rani522 and others added 7 commits October 8, 2026 13:24
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 019ed4af-f34c-4cc8-8465-a038be55d9f6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4ce38852-3d06-4124-b043-c7591a9f49f7
Provision matrix interpreters with uv, preserve sequential E2E jobs, and validate variable-group inputs. Document pipeline setup requirements.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Seed tagged data before conditional ingestion and observe the row count for delayed duplicates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Correct optional and response annotations, narrow synchronous client types, and fix pandas test typing. Leave warning-only diagnostics and the type-check baseline unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The credential-free build step can fail during test collection when fork builds lack ENGINE_CONNECTION_STRING, because --no-e2e does not prevent import-time access to the missing setting.

1 open issue
What changed in this PR

Migrates build and E2E validation from GitHub Actions to Azure Pipelines, with contributor setup guidance and typing corrections.

Changes:

  • Adds a sequential Python 3.9–3.13 matrix, uv caching, validation checks, and test/documentation artifacts.
  • Documents Azure authentication and variable-group requirements; removes the GitHub Actions workflow and Pages deployment.
  • Fixes ingestion-by-tag test setup and duplicate detection, and updates typing without intended SDK behavior changes.
File Description
pyproject.toml Restricts type-check reporting to errors.
CONTRIBUTING.md Documents Azure CI setup and type-check policy.
azure-kusto-ingest/​tests/​test_e2e_ingest.py Seeds tagged data, observes duplicate suppression, and adjusts typing.
azure-kusto-data/​tests/​test_helpers.py Uses a type-compatible null-value assertion.
azure-kusto-data/​tests/​test_e2e_data.py Narrows the response type before checking status.
azure-kusto-data/​azure/​kusto/​data/​exceptions.py Updates type-only imports and error-dictionary typing.
azure-kusto-data/​azure/​kusto/​data/​env_utils.py Adds overloads for environment lookup return types.
azure-kusto-data/​azure/​kusto/​data/​client.py Narrows the HTTP session type.
azure-kusto-data/​azure/​kusto/​data/​client_base.py Narrows the cluster URL type for endpoint validation.
azure-kusto-data/​azure/​kusto/​data/​_cloud_settings.py Marks the session parameter as optional.
.github/​workflows/​build.yml Removes the previous validation and Pages workflow.
.azuredevops/​build.yml Implements the Azure validation matrix and artifact publishing.

Review effort: Balanced

Comment thread .azuredevops/build.yml Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Credentialed PR execution depends on Azure DevOps fork restrictions, same-repository PR approvals, and service-connection approvals outside this checkout that a maintainer should verify for the migrated pipeline.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@komal-rani522
komal-rani522 merged commit abfcda6 into master Nov 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants