Skip to content

Add Azure VM and AKS integration test jobs to the test-artifacts workflow#2216

Open
movence wants to merge 6 commits into
mainfrom
feature/azure-integration-test-workflow
Open

Add Azure VM and AKS integration test jobs to the test-artifacts workflow#2216
movence wants to merge 6 commits into
mainfrom
feature/azure-integration-test-workflow

Conversation

@movence

@movence movence commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description of the issue

No CI coverage existed for the agent running on non-AWS hosts (Azure VM / AKS) with the default OTel config. The test suites live in the test repo (companion PR: aws/amazon-cloudwatch-agent-test#730) but need workflow jobs to provision and run them.

Description of changes

Adds two jobs to test-artifacts.yml (+168 lines, workflow-only change):

  • AzureVM-default-otel — terraform-provisions an Azure VM, installs the built .deb, and runs the on-VM Go test suite (test/azure/vm).
  • AKS-default-otel — terraform-provisions an AKS cluster, deploys the agent DaemonSet from the integration-test ECR image, and runs the runner-side Go test suite (test/azure/aks).

Both jobs gate on test_dir_filter containing their test path (a ./test/azure filter runs both), authenticate to Azure via OIDC, and always run terraform destroy on teardown. The Login ECR step's registry output feeds the image repo; the AKS pull-secret token is minted inside terraform, so no docker config JSON passes through shell interpolation.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

  • Both jobs green end-to-end: 30113003649 (latest, validates the rebased branch HEAD e79c5fe6), 30048181167, 30029802668, 30018222183. All three AKS subtests pass; Azure VM passing across 11 consecutive runs.
  • The final run validates this exact branch HEAD: build artifacts were rebuilt from it and the SHA matches.

Worth noting

  • On filtered dispatches (e.g. test_dir_filter=./test/azure) the run-level conclusion shows failure even when every created job succeeds. This is pre-existing on main: ~12 jobs have no != '[]' guard on their matrix, so an empty filtered matrix fails at job startup (invisible in the jobs API but counted in the run conclusion). Job-level checks are the meaningful signal; adding the same guard the ITAR/CN jobs already use would fix the badge and can be a follow-up.
  • Requires repo config for Azure, already in place: secrets AZURE_CLIENT_ID / AZURE_CLIENT_SECRET / AZURE_TENANT_ID / AZURE_SUBSCRIPTION_ID (service-principal login) and variables AZURE_RESOURCE_GROUP / AZURE_VNET_NAME / AZURE_OIDC_PROVIDER_ARN / AZURE_TOKEN_AUDIENCE.

@movence
movence requested a review from a team as a code owner July 23, 2026 18:19
@movence movence added the ready for testing Indicates this PR is ready for integration tests to run label Jul 23, 2026
movence added 6 commits July 23, 2026 21:23
Inline AzureVMIntegrationTest job that provisions an Azure VM, installs
the pre-built agent .deb via SSH, and runs the Go integration test from
the test repo's terraform/azure/vm directory.
Transaction Search (CloudWatchLogs trace segment destination) is required
for the OTLP endpoint but breaks legacy PutTraceSegments-based tests in
us-west-2. Since the setting is per-region, isolate the Azure test by
running it in us-east-2 where Transaction Search is enabled, and revert
us-west-2 to the XRay destination so existing xray_test/otlp_test jobs
pass as before.
Adds AKS-default-otel job that provisions an AKS cluster, deploys the
CWA DaemonSet from the pre-built ECR image, generates OTLP load via a
hostNetwork Job, and validates delivery via CloudWatch APIs.
The AKS job referenced a setup-go commit SHA that does not exist,
causing the job to fail at action resolution. Use the same v4.3.0
pin as the other jobs in this workflow.
The pull secret is generated inside terraform via the
aws_ecr_authorization_token data source, so the step output and the
terraform variable are no longer consumed.
- AzureVM job now only fires when the filter matches ./test/azure/vm
  or the broader ./test/azure (same pattern as the AKS job).
- Pass github_test_repo and github_test_repo_branch to terraform
  destroy for both AzureVM and AKS jobs so state files resolve
  correctly during teardown.
@movence
movence force-pushed the feature/azure-integration-test-workflow branch from 69c92b8 to e79c5fe Compare July 24, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for testing Indicates this PR is ready for integration tests to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant