Skip to content

[ACIX-1891] Explicitly authorize internet access in E2E tests blocked by pipeline 127765169 - #54240

Merged
KevinFairise2 merged 0 commit into
kfairise/acix-1891-disable-vm-internet-accessfrom
kfairise/acix-1891-authorize-internet-in-tests
Jul 30, 2026
Merged

[ACIX-1891] Explicitly authorize internet access in E2E tests blocked by pipeline 127765169#54240
KevinFairise2 merged 0 commit into
kfairise/acix-1891-disable-vm-internet-accessfrom
kfairise/acix-1891-authorize-internet-in-tests

Conversation

@KevinFairise2

Copy link
Copy Markdown
Member

What

Opts 41 E2E test suites into explicit internet access via ec2.WithInternetAccess() / scenec2.WithInternetAccess().

Why

These tests were failing in pipeline 127765169 after the parent PR #54158 made internet access off by default in all host provisioners (awshost.Provisioner).

The goal is: internet off by default everywhere, explicitly enabled only where needed. This PR enables it for the tests that legitimately require it (downloading packages from apt/yum, pulling Docker images, reaching Datadog APIs, etc.).

Tests fixed (41 files)

  • fleet – upgrade, config, extensions suites
  • installer/script, installer/unix – installer script and package suites
  • agent-platform – install-script, DDOT, package-signing suites
  • apm – VM fakeintake suite (pulls images from ghcr.io)
  • ndm/snmp – SNMP VM and autodiscovery suites
  • cws – EC2 agent suite, Windows agent suite
  • cspm – host benchmark suites (RHEL/AlmaLinux need OS repos)
  • remote-config – RC tracer suite
  • agent-subcommands – Linux + Windows subcommand suites
  • agent-configuration – Linux + Windows configuration suites
  • agent-runtimes – Windows runtime suites
  • netpath – Windows network path integration suite
  • agent-log-pipelines – Windows file tailing suite

Remaining jobs not fixed here

A few jobs in 127765169 are failing for non-internet reasons and are excluded:

  • integration_tests_otel – localhost connection refused / API key (pre-existing)
  • oracle: [21.3.0-xe] – Oracle TNS listener error (pre-existing)
  • new-e2e-ha-agent-failover – uses custom multi-VM provisioner (not awshost.Provisioner)
  • new-e2e-cws: [--run TestKindSuite] – uses Kubernetes provisioner (not awshost.Provisioner)

@KevinFairise2
KevinFairise2 requested review from a team as code owners July 30, 2026 08:39
@KevinFairise2
KevinFairise2 requested review from Pierre-L42, clarkb7, dustmop, jeremy-hanna and louis-cqrl and removed request for a team July 30, 2026 08:39

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot 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.

Datadog Autotest: PASS

More details

The explicit opt-in is ordered after the host provisioner's deny-by-default option, so each changed startup provisioner resolves to the normal internet-enabled security groups. No clear behavioral regression was identified in the reviewed diff.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 3b99387 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b993879e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// permissions are correct so the agent can create
// unix sockets for the UDS transport and communicate with the docker socket.
ec2.WithEC2InstanceOptions(ec2.WithUserData(setupScript)),
ec2.WithEC2InstanceOptions(ec2.WithUserData(setupScript), ec2.WithInternetAccess()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Route tracegen through an approved image cache

In this AWS VM suite, the new egress opt-in is needed because SetupSuite pulls ghcr.io/datadog/apps-tracegen directly at line 60. The scoped E2E guidance explicitly requires cached registries and notes that GHCR is unsupported, so opening internet access preserves an external dependency that remains vulnerable to outages and will fail once CI blocks public egress entirely. Publish or mirror tracegen through a supported cached registry and keep this VM isolated.

AGENTS.md reference: test/new-e2e/AGENTS.md:L1-L2

Useful? React with 👍 / 👎.

e2e.WithProvisioner(
awshost.Provisioner(
awshost.WithRunOptions(
scenec2.WithEC2InstanceOptions(scenec2.WithInternetAccess()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the fakeintake tracer suite isolated

This AWS suite was changed in the parent commit from ProvisionerNoFakeIntake to Provisioner, which wires remote config to the in-account fakeintake, so it no longer needs to contact the public Datadog API. Re-enabling internet access here undoes that isolation without supporting any external operation in the test and needlessly weakens the new security boundary; remove this opt-in and update the now-stale API-key comment instead.

AGENTS.md reference: test/new-e2e/AGENTS.md:L1-L2

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added the long review PR is complex, plan time to review it label Jul 30, 2026
@KevinFairise2
KevinFairise2 force-pushed the kfairise/acix-1891-authorize-internet-in-tests branch from 3b99387 to 4a1fddd Compare July 30, 2026 08:54
@KevinFairise2
KevinFairise2 requested review from a team as code owners July 30, 2026 08:54
@KevinFairise2
KevinFairise2 requested review from a team as code owners July 30, 2026 08:54
@KevinFairise2
KevinFairise2 requested review from charan-manjunath, pierreprinetti and samrcarr and removed request for a team July 30, 2026 08:54
@KevinFairise2
KevinFairise2 merged commit 4a1fddd into kfairise/acix-1891-disable-vm-internet-access Jul 30, 2026
38 of 64 checks passed
@KevinFairise2
KevinFairise2 force-pushed the kfairise/acix-1891-disable-vm-internet-access branch from df28d9b to 26f32ac Compare July 30, 2026 08:57
@KevinFairise2
KevinFairise2 deleted the kfairise/acix-1891-authorize-internet-in-tests branch July 30, 2026 08:58
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 52.16% (+0.08%)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

long review PR is complex, plan time to review it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants