Skip to content

chore: fix flaky Windows AAS e2e with a self-contained test app#2376

Merged
ava-silver merged 2 commits into
masterfrom
ava.silver/chore/fix-windows-aas-e2e-by-shipping-web.config-so-iis-serves-the-node-app
Jun 24, 2026
Merged

chore: fix flaky Windows AAS e2e with a self-contained test app#2376
ava-silver merged 2 commits into
masterfrom
ava.silver/chore/fix-windows-aas-e2e-by-shipping-web.config-so-iis-serves-the-node-app

Conversation

@ava-silver

@ava-silver ava-silver commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Windows e2e was failing because a config issue in the test app -- this just makes it so we use a dedicated test app for this repo and can control the whole config.

What and why?

The serverless e2e job has been red on every master run since #2365, blocking CI for the whole repo. The failing test was aas (Windows) › telemetry flows, which 403'd when driving traffic at the deployed app:

Failed to trigger traffic at https://one-e2e-ci-aas-win-<id>.azurewebsites.net:
403: You do not have permission to view this directory or page.

On Windows, App Service serves Node behind IIS via iisnode, which needs a web.config to hand requests to the app -- without one IIS denies directory browsing and returns 403. The test relied on the prebuilt node-extension.zip from serverless-init-self-monitoring plus SCM_DO_BUILD_DURING_DEPLOYMENT to have Kudu generate that web.config. Verified directly against Azure, the Kudu build does not generate a web.config for az webapp deploy on Windows (and a failed build silently rolls the whole deploy back), so the app never served and the test could never pass.

How?

Replace the external prebuilt package with a self-contained test app defined in the test:

  • A zero-dependency Node HTTP server (app.js) -- no node_modules, no build. The aas instrument site extension injects dd-trace, which auto-instruments the built-in http module, so requests still produce spans.
  • A web.config routing all requests to app.js.

Both files are deployed straight into wwwroot with az webapp deploy --type static (--type static doesn't clean wwwroot, so the two files accumulate). Confirmed end-to-end against Azure: the app returns HTTP 200 and the full instrument/telemetry/uninstrument flow passes.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 24, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

Continuous Integration | End-to-end test the package (Windows) (24)   View in Datadog   GitHub Actions

Continuous Integration | Test standalone binary in ARM Alpine   View in Datadog   GitHub Actions

Continuous Integration | Test standalone binary in Alpine   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1b594d3 | Docs | Datadog PR Page | Give us feedback!

@ava-silver
ava-silver marked this pull request as ready for review June 24, 2026 13:29
@ava-silver
ava-silver requested review from a team as code owners June 24, 2026 13:29
@ava-silver
ava-silver requested a review from avangelillo June 24, 2026 13:29
@ava-silver ava-silver added the chores Related to the CI or developer experience label Jun 24, 2026
@ava-silver ava-silver changed the title chore: fix Windows AAS e2e by shipping web.config so IIS serves the node app chore: fix flaky Windows AAS e2e with a self-contained test app Jun 24, 2026
@ava-silver
ava-silver marked this pull request as draft June 24, 2026 14:54
@ava-silver
ava-silver force-pushed the ava.silver/chore/fix-windows-aas-e2e-by-shipping-web.config-so-iis-serves-the-node-app branch from 0f0bf84 to d1343ab Compare June 24, 2026 14:56
@ava-silver
ava-silver marked this pull request as ready for review June 24, 2026 15:13
@ava-silver
ava-silver requested a review from Drarig29 June 24, 2026 15:13
@ava-silver
ava-silver merged commit 5a06f84 into master Jun 24, 2026
31 of 34 checks passed
@ava-silver
ava-silver deleted the ava.silver/chore/fix-windows-aas-e2e-by-shipping-web.config-so-iis-serves-the-node-app branch June 24, 2026 15:52
@ava-silver ava-silver mentioned this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chores Related to the CI or developer experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants