Skip to content

Add opt-in legacy CRUD collection for internal consumers - #1363

Draft
Diamond (diamondpowell) wants to merge 5 commits into
mainfrom
dipowell/crud-collector-contract
Draft

Diamond (diamondpowell) wants to merge 5 commits into
mainfrom
dipowell/crud-collector-contract

Conversation

@diamondpowell

Copy link
Copy Markdown
Contributor

Summary

  • Preserve default collector operation names, row schema, and append behavior.
  • Add explicit --legacy-output support for existing internal ADX consumers, retaining canonical operation data alongside legacy aliases.
  • Accept pipeline context through CLI arguments or environment variables; preserve numeric counts and JSON-encoded node-pool data.
  • Validate legacy input before atomic output publication, preserving prior results on failures.
  • Update focused tests and collector documentation.

Integration

Companion internal migration: https://msazure.visualstudio.com/CloudNativeCompute/_git/telescope/pullrequest/16193735

The internal wrapper opts into legacy output. Existing open-source callers do not need to change. No ADX table or dashboard connection changes are included. Merge this package change before the internal migration consumes open-source main.

Validation

  • Full local Python suite: 836 passed, 1 skipped; 83.46% coverage.
  • Pylint: 10.00/10; no Pylance diagnostics; whitespace checks passed.
  • Installed-wheel compatibility checks: small VMSS, small VirtualMachines, and large VMSS; actual internal collector script and seven CLI dispatch signatures (cloud clients mocked).
  • Confirmed canonical default output/append behavior, legacy fields and types, selected-cluster context, failure metadata, unchanged source files, and legacy rerun idempotency.
  • Live internal installed-package validation: pending; temporary configuration will remain on a disposable internal validation branch.

Kept as draft until live validation evidence is available.

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

Copy link
Copy Markdown

For reviewers only: reply /run-tf-integration to trigger the terraform integration pipeline before approving the PR.

@diamondpowell

Copy link
Copy Markdown
Contributor Author

Live installed-package validation has been queued: internal build 188117777.

  • Open-source package commit: 11b8f69914dd8143db6c6e9e59b76f6c0693b37c.
  • Internal production PR companion commit: c13adf8d49e1a53b1dc5ff7e9592cc17af135598 (PR 16193735).
  • Disposable validation commit: 9ca42e8e94d6ff2b727b390305e3e6680fff4c3e, branch dipowell/crud-collector-validation-20261028.
  • Scope: westcentralus, small VMSS and VirtualMachines cases, all three workload types, exact package-commit provenance check, and seven-row legacy result-contract assertions.

The temporary pipeline/configuration changes are not on the production PR branch. Run is queued/running, not yet reported as passed. Production ADX table names and upload routing are unchanged.

Return the successful CLI attempt timestamp and retry flag expected by shared instrumentation. Exercise real instrumentation in create and scale regressions and preserve failure timing.

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

Copy link
Copy Markdown
Contributor Author

Build 188117777 passed the VMSS lifecycle and all seven legacy-result assertions. VirtualMachines failed before collection because the CLI helper returned a boolean while shared provisioning instrumentation expected (request_started_at, retry_occurred). Both resource-group cleanup steps succeeded. Fixed in 35f440e with real-instrumentation create/direct/progressive scale and failure regressions: 201 targeted tests passed, 93.18% CLI-helper coverage, Pylint 10/10. Replacement internal build 188195239 is queued on disposable validation commit 20425a0ea91c38d46894628e82eb44c89f2ec866: https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=188195239 . Live rerun has not yet passed; no production table/routing changes.

@diamondpowell

Copy link
Copy Markdown
Contributor Author

Audited live validation: build 188195239

Verified the evidence beyond the green pipeline status:

  • Internal source: 20425a0ea91c38d46894628e82eb44c89f2ec866; package source: 35f440e88a60f4cb31972c5c86c8db8b854c4ab3 (current PR head); shared templates: 1889c34df737aed96181e121b9ff1ecbdeca99f2.
  • Both jobs built/reinstalled the feature-branch wheel and imported the collector from Python 3.10 site-packages, not a source-tree PYTHONPATH.
  • Both small VMSS and VirtualMachines jobs executed create, scale up, Deployment, StatefulSet, Job, scale down, delete, collect, upload, and resource-group cleanup successfully.
  • Independently downloaded both persisted result blobs and verified seven distinct operations each, actual ARM pool types (not just matrix labels), scale 1 -> 2 -> 1, all requested workloads (1 Deployment x 10 replicas, 3 StatefulSets x 1 replica, 20 Jobs x 1 completion), successful metadata, timing values, run IDs, and legacy field types.
  • Existing production ADX column schema and JSON mapping match the output envelope. Read-only KQL evaluation of the actual uploaded rows passes the existing scale-operation name, Azure cloud, succeeded, command timing, and node-count predicates for both pool types.
  • Current GitHub Python Validation on this head: 843 passed, 1 skipped; 83.66% coverage; Pylint 10/10.
  • Compared disposable validation branch against production internal PR source c13adf8d: differences are test YAML, package provenance checks, and post-collection assertions; no substituted CRUD implementation or changed production command sequence.

Scope and remaining gates

This is a valid one-region, small-size installed-package lifecycle and output-contract pass. It is not proof of production ingestion/dashboard visibility: blobs were uploaded under the validation-branch path, no matching rows were found in existing CRUD ADX tables, and no production ingestion was forced. Medium/large production scales and other regions were not exercised.

After this package merges, validate the resulting open-source main package before internal cutover, and verify production ingestion/consumer visibility during the approved rollout. The internal default tracks mutable main, so this run proves the recorded commits, not arbitrary future open-source changes.

Run: https://msazure.visualstudio.com/CloudNativeCompute/_build/results?buildId=188195239

Propagate the client timeout through create, direct scale, and progressive scale on both SDK and VirtualMachines CLI paths while retaining the low-level 30-minute default. Add timeout-boundary and failed-result publishing regressions.

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

Copy link
Copy Markdown
Contributor Author

Added timeout follow-up in commit 96aa4e0.

  • The configured AKS client timeout now reaches node-pool create, direct scale, and progressive scale for both SDK and VirtualMachines CLI provisioning. Low-level helpers retain their 1800-second default.
  • Regression tests cover a 2400-second allowance surviving beyond the old 1800-second limit, exact configured/default polling limits, timeout propagation, and publication of failed legacy operation records.
  • Local validation: 205 targeted CRUD/client/helper tests passed; all changed Python files passed Pylint at 10/10. Pylance signature checks passed for the SDK helper and both callable factories.
  • An installed-wheel smoke with synthetic failed-operation data confirmed failure fields are retained, repeat collection is idempotent, and malformed input does not replace previously published output.

A new live cloud run has not been performed for this revision. This comment does not claim end-to-end ADX or dashboard validation.

Keep the historical 1800-second ARM allowance when readiness settings are shorter, extend it for longer requests, and preserve default collector source order. Cover default SDK completion beyond ten minutes, both pool types and all provisioning paths, and nonalphabetic collection ordering.

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

Copy link
Copy Markdown
Contributor Author

Backward-compatibility follow-up published in 9c2b133.

Corrections:

  • Client ARM provisioning now keeps the historical 1800-second allowance when readiness settings are shorter; longer settings still extend it. The default 600-second readiness budget is unchanged. Regression coverage includes an actual mocked SDK operation finishing after 630 seconds and 32 pool/configuration/action combinations across create, direct scale, and progressive scale.
  • Default collection again preserves source enumeration order. Deterministic sorting is limited to opt-in legacy mode.

Validation:

  • Full local suite: 850 passed, 1 skipped; 83.69% coverage; changed Python files Pylint 10/10.
  • Differential execution of the pre-PR default collector versus this revision produced exactly matching 30 output rows for Azure/GPU/AWS/Machine input shapes, including failed records, source order, field values, and append behavior.
  • Fresh wheel build/install passed. Source and installed imports resolved the real Azure SDK namespace; all nine CRUD module CLI help paths and both telescope-crud/telescope-iperf3 console entries worked.

No new live cloud provisioning run was performed for this revision. These checks do not claim deployed ADX/dashboard validation.

Consolidate compatibility test setup without removing distinct cases. Reject missing or unreadable legacy source directories before publication, preserving default collection behavior.

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

Copy link
Copy Markdown
Contributor Author

Validation of exact source commit 3dfd548 is complete:

  • GitHub python-validation, yaml-validation, and CLA checks all passed on this head.
  • Both small live Azure node-pool cases (VirtualMachineScaleSets and VirtualMachines) passed all seven CRUD/workload operations, scaling 1 → 2 → 1.
  • Independently downloaded and validated all 14 uploaded legacy-compatible JSONL rows: actual ARM pool types, successful workloads (one deployment with ten replicas, three StatefulSets, twenty Jobs), readiness targets, timing fields, aliases, and typed context.
  • Installed package source-byte checks and Azure SDK import checks passed in both jobs; teardown completed with no remaining run resource groups.

This does not certify 51/201-node scale or automatic production ADX/dashboard ingestion. Neither PR was merged; no production ingestion settings were changed.

This branch has not been deployed

No deployments
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.

1 participant