Skip to content

tests: avoid fixed proxy e2e ports#22770

Closed
dominic-r wants to merge 4 commits into
mainfrom
sdko/fix-schema-ci-e2e
Closed

tests: avoid fixed proxy e2e ports#22770
dominic-r wants to merge 4 commits into
mainfrom
sdko/fix-schema-ci-e2e

Conversation

@dominic-r
Copy link
Copy Markdown
Member

@dominic-r dominic-r commented Jun 1, 2026

Summary

Fix proxy e2e failures caused by tests binding containers to fixed host ports. The tests now allocate per-test host ports and still route container-to-container traffic over Docker DNS where possible.

The shared Docker cleanup also removes stopped labelled containers, so a failed container start does not leave names behind and cascade into later test failures.

Related

The separate endpoint e2e failure from blank agent OS versions is handled in goauthentik/platform#960.

Validation

  • uv run ruff check tests/docker.py tests/e2e/test_provider_proxy.py tests/e2e/test_provider_proxy_forward.py
  • uv run ruff format --check tests/docker.py tests/e2e/test_provider_proxy.py tests/e2e/test_provider_proxy_forward.py
  • git diff --check

rissson added 2 commits May 29, 2026 01:06
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@dominic-r dominic-r requested a review from a team as a code owner June 1, 2026 00:32
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit cb29dec
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a1cd3112dc18000087eb717
😎 Deploy Preview https://deploy-preview-22770--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dominic-r dominic-r force-pushed the sdko/fix-schema-ci-e2e branch from cb29dec to 962ee2e Compare June 1, 2026 00:34
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit cb29dec
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a1cd311ceeb860008eefe97
😎 Deploy Preview https://deploy-preview-22770--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dominic-r dominic-r force-pushed the sdko/fix-schema-ci-e2e branch from 962ee2e to 3305011 Compare June 1, 2026 00:37
@dominic-r dominic-r changed the title tests: avoid fixed proxy e2e ports tests: stabilize e2e CI Jun 1, 2026
Bind proxy e2e containers to per-test host ports and clean up stopped labelled containers so CI runner port collisions do not cascade across tests.

Endpoint e2e blank OS version failures are fixed in goauthentik/platform#960.

Agent-thread: https://sdko.org/internal/threads/019e808d-fc02-7182-bf00-c3912c0ece92

A7k-product: product

A7k-product-repo: 1

Co-authored-by: Agent <agent@svc.sdko.net>
@dominic-r dominic-r force-pushed the sdko/fix-schema-ci-e2e branch from 3305011 to 39be121 Compare June 1, 2026 00:41
@dominic-r dominic-r self-assigned this Jun 1, 2026
@dominic-r dominic-r changed the title tests: stabilize e2e CI tests: avoid fixed proxy e2e ports Jun 1, 2026
@dominic-r dominic-r changed the base branch from fix-schema to main June 1, 2026 00:43
@dominic-r dominic-r requested a review from a team as a code owner June 1, 2026 00:43
Trigger CI for PR #22770 after updating the related e2e fixes.

Agent-thread: https://sdko.org/internal/threads/019e808d-fc02-7182-bf00-c3912c0ece92

A7k-product: product

A7k-product-repo: 1

Co-authored-by: Agent <agent@svc.sdko.net>
Comment thread tests/docker.py
def get_free_port(self) -> int:
"""Find an unused local TCP port for a later container bind."""
with socket() as sock:
sock.bind(("0.0.0.0", 0)) # nosec: test-only local port discovery.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.25%. Comparing base (9e75f62) to head (11cd5cd).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22770      +/-   ##
==========================================
- Coverage   93.30%   93.25%   -0.05%     
==========================================
  Files        1033     1033              
  Lines       60150    60150              
  Branches      400      400              
==========================================
- Hits        56120    56090      -30     
- Misses       4030     4060      +30     
Flag Coverage Δ
conformance 36.56% <ø> (+<0.01%) ⬆️
e2e 41.83% <ø> (+0.06%) ⬆️
integration 32.51% <ø> (-0.61%) ⬇️
rust 0.00% <ø> (ø)
unit 92.23% <ø> (ø)
unit-migrate 92.26% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeryJu
Copy link
Copy Markdown
Member

BeryJu commented Jun 2, 2026

fixed by #22785

@BeryJu BeryJu closed this Jun 2, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in authentik Core Jun 2, 2026
@BeryJu BeryJu deleted the sdko/fix-schema-ci-e2e branch June 2, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants