Skip to content

outposts: only dispatch logout task if any outpost exists (cherry-pick #20920 to version-2026.2) - #20949

Merged
rissson merged 1 commit into
version-2026.2from
cherry-pick/20920-to-version-2026.2
Mar 17, 2026
Merged

rissson merged 1 commit into
version-2026.2from
cherry-pick/20920-to-version-2026.2

Conversation

@authentik-automation

Copy link
Copy Markdown
Contributor

Cherry-pick of #20920 to version-2026.2 branch.

Original PR: #20920
Original Author: @rissson
Cherry-picked commit: 9f2047e

@netlify

netlify Bot commented Mar 17, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit d14dddb
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69b945206d82a20008af459c
😎 Deploy Preview https://deploy-preview-20949--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.

@rissson
rissson enabled auto-merge (squash) March 17, 2026 12:16
@codecov

codecov Bot commented Mar 17, 2026 •

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
3047 3 3044 4
View the top 3 failed test(s) by shortest run time
tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba::test_source_sync
Stack Traces | 153s run time
self = <unittest.case._Outcome object at 0x7f2d39211010>
test_case = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync>
subTest = False

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, subTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:58: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync>
result = <TestCaseFunction test_source_sync>

    def run(self, result=None):
        if result is None:
            result = self.defaultTestResult()
            startTestRun = getattr(result, 'startTestRun', None)
            stopTestRun = getattr(result, 'stopTestRun', None)
            if startTestRun is not None:
                startTestRun()
        else:
            stopTestRun = None
    
        result.startTest(self)
        try:
            testMethod = getattr(self, self._testMethodName)
            if (getattr(self.__class__, "__unittest_skip__", False) or
                getattr(testMethod, "__unittest_skip__", False)):
                # If the class or method was skipped.
                skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
                            or getattr(testMethod, '__unittest_skip_why__', ''))
                _addSkip(result, self, skip_why)
                return result
    
            expecting_failure = (
                getattr(self, "__unittest_expecting_failure__", False) or
                getattr(testMethod, "__unittest_expecting_failure__", False)
            )
            outcome = _Outcome(result)
            start_time = time.perf_counter()
            try:
                self._outcome = outcome
    
                with outcome.testPartExecutor(self):
>                   self._callSetUp()

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:665: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync>

    def _callSetUp(self):
>       self.setUp()

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:612: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync>

    def setUp(self):
        self.admin_password = generate_key()
        super().setUp()
>       self.samba = self.run_container(
            image="ghcr.io/beryju/test-samba-dc:latest",
            cap_add=["SYS_ADMIN"],
            ports={
                "389": "389/tcp",
            },
            environment={
                "SMB_DOMAIN": "test.goauthentik.io",
                "SMB_NETBIOS": "goauthentik",
                "SMB_ADMIN_PASSWORD": self.admin_password,
            },
        )

tests/e2e/test_source_ldap_samba.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync>
specs = {'cap_add': ['SYS_ADMIN'], 'detach': True, 'environment': {'AUTHENTIK_HOST': 'http://10.1.0.74:55549', 'SMB_ADMIN_PASS...SMB_DOMAIN': 'test.goauthentik.io', 'SMB_NETBIOS': 'goauthentik'}, 'image': 'ghcr.io/beryju/test-samba-dc:latest', ...}
container = <Container: 518ffb9510c5>
state = {'Dead': False, 'Error': '', 'ExitCode': 0, 'FinishedAt': '0001-01-01T00:00:00Z', ...}

    def run_container(self, **specs: Any) -> Container:
        if "network_mode" not in specs:
            specs["network"] = self.__network.name
        specs["labels"] = self.docker_labels
        specs["detach"] = True
        if hasattr(self, "live_server_url"):
            specs.setdefault("environment", {})
            specs["environment"]["AUTHENTIK_HOST"] = self.live_server_url
        container: Container = self.docker_client.containers.run(**specs)
        container.reload()
        state = container.attrs.get("State", {})
        if "Health" not in state:
            return container
>       self.wait_for_container(container)

tests/docker.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync>
container = <Container: 518ffb9510c5>

    def wait_for_container(self, container: Container) -> Container:
        """Check that container is health"""
        attempt = 0
        while True:
            container.reload()
            status = container.attrs.get("State", {}).get("Health", {}).get("Status")
            if status == "healthy":
                return container
            sleep(1)
            attempt += 1
            if attempt >= self.max_healthcheck_attempts:
                self.output_container_logs(container)
>               raise self.failureException("Container failed to start")
E               AssertionError: Container failed to start

tests/docker.py:57: AssertionError
tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba::test_source_sync_group
Stack Traces | 307s run time
self = <unittest.case._Outcome object at 0x7f2d34440410>
test_case = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync_group>
subTest = False

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, subTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:58: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync_group>
result = <TestCaseFunction test_source_sync_group>

    def run(self, result=None):
        if result is None:
            result = self.defaultTestResult()
            startTestRun = getattr(result, 'startTestRun', None)
            stopTestRun = getattr(result, 'stopTestRun', None)
            if startTestRun is not None:
                startTestRun()
        else:
            stopTestRun = None
    
        result.startTest(self)
        try:
            testMethod = getattr(self, self._testMethodName)
            if (getattr(self.__class__, "__unittest_skip__", False) or
                getattr(testMethod, "__unittest_skip__", False)):
                # If the class or method was skipped.
                skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
                            or getattr(testMethod, '__unittest_skip_why__', ''))
                _addSkip(result, self, skip_why)
                return result
    
            expecting_failure = (
                getattr(self, "__unittest_expecting_failure__", False) or
                getattr(testMethod, "__unittest_expecting_failure__", False)
            )
            outcome = _Outcome(result)
            start_time = time.perf_counter()
            try:
                self._outcome = outcome
    
                with outcome.testPartExecutor(self):
>                   self._callSetUp()

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:665: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync_group>

    def _callSetUp(self):
>       self.setUp()

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:612: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync_group>

    def setUp(self):
        self.admin_password = generate_key()
        super().setUp()
>       self.samba = self.run_container(
            image="ghcr.io/beryju/test-samba-dc:latest",
            cap_add=["SYS_ADMIN"],
            ports={
                "389": "389/tcp",
            },
            environment={
                "SMB_DOMAIN": "test.goauthentik.io",
                "SMB_NETBIOS": "goauthentik",
                "SMB_ADMIN_PASSWORD": self.admin_password,
            },
        )

tests/e2e/test_source_ldap_samba.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync_group>
specs = {'cap_add': ['SYS_ADMIN'], 'detach': True, 'environment': {'AUTHENTIK_HOST': 'http://10.1.0.74:55549', 'SMB_ADMIN_PASS...SMB_DOMAIN': 'test.goauthentik.io', 'SMB_NETBIOS': 'goauthentik'}, 'image': 'ghcr.io/beryju/test-samba-dc:latest', ...}
container = <Container: 3cd1b776f1af>
state = {'Dead': False, 'Error': '', 'ExitCode': 0, 'FinishedAt': '0001-01-01T00:00:00Z', ...}

    def run_container(self, **specs: Any) -> Container:
        if "network_mode" not in specs:
            specs["network"] = self.__network.name
        specs["labels"] = self.docker_labels
        specs["detach"] = True
        if hasattr(self, "live_server_url"):
            specs.setdefault("environment", {})
            specs["environment"]["AUTHENTIK_HOST"] = self.live_server_url
        container: Container = self.docker_client.containers.run(**specs)
        container.reload()
        state = container.attrs.get("State", {})
        if "Health" not in state:
            return container
>       self.wait_for_container(container)

tests/docker.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_source_sync_group>
container = <Container: 3cd1b776f1af>

    def wait_for_container(self, container: Container) -> Container:
        """Check that container is health"""
        attempt = 0
        while True:
            container.reload()
            status = container.attrs.get("State", {}).get("Health", {}).get("Status")
            if status == "healthy":
                return container
            sleep(1)
            attempt += 1
            if attempt >= self.max_healthcheck_attempts:
                self.output_container_logs(container)
>               raise self.failureException("Container failed to start")
E               AssertionError: Container failed to start

tests/docker.py:57: AssertionError
tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba::test_sync_password
Stack Traces | 330s run time
self = <unittest.case._Outcome object at 0x7f2d335e2c10>
test_case = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_sync_password>
subTest = False

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, subTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:58: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_sync_password>
result = <TestCaseFunction test_sync_password>

    def run(self, result=None):
        if result is None:
            result = self.defaultTestResult()
            startTestRun = getattr(result, 'startTestRun', None)
            stopTestRun = getattr(result, 'stopTestRun', None)
            if startTestRun is not None:
                startTestRun()
        else:
            stopTestRun = None
    
        result.startTest(self)
        try:
            testMethod = getattr(self, self._testMethodName)
            if (getattr(self.__class__, "__unittest_skip__", False) or
                getattr(testMethod, "__unittest_skip__", False)):
                # If the class or method was skipped.
                skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
                            or getattr(testMethod, '__unittest_skip_why__', ''))
                _addSkip(result, self, skip_why)
                return result
    
            expecting_failure = (
                getattr(self, "__unittest_expecting_failure__", False) or
                getattr(testMethod, "__unittest_expecting_failure__", False)
            )
            outcome = _Outcome(result)
            start_time = time.perf_counter()
            try:
                self._outcome = outcome
    
                with outcome.testPartExecutor(self):
>                   self._callSetUp()

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:665: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_sync_password>

    def _callSetUp(self):
>       self.setUp()

.../hostedtoolcache/Python/3.14.3........./x64/lib/python3.14/unittest/case.py:612: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_sync_password>

    def setUp(self):
        self.admin_password = generate_key()
        super().setUp()
>       self.samba = self.run_container(
            image="ghcr.io/beryju/test-samba-dc:latest",
            cap_add=["SYS_ADMIN"],
            ports={
                "389": "389/tcp",
            },
            environment={
                "SMB_DOMAIN": "test.goauthentik.io",
                "SMB_NETBIOS": "goauthentik",
                "SMB_ADMIN_PASSWORD": self.admin_password,
            },
        )

tests/e2e/test_source_ldap_samba.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_sync_password>
specs = {'cap_add': ['SYS_ADMIN'], 'detach': True, 'environment': {'AUTHENTIK_HOST': 'http://10.1.0.74:55549', 'SMB_ADMIN_PASS...SMB_DOMAIN': 'test.goauthentik.io', 'SMB_NETBIOS': 'goauthentik'}, 'image': 'ghcr.io/beryju/test-samba-dc:latest', ...}
container = <Container: 6c8574f1fe69>
state = {'Dead': False, 'Error': '', 'ExitCode': 0, 'FinishedAt': '0001-01-01T00:00:00Z', ...}

    def run_container(self, **specs: Any) -> Container:
        if "network_mode" not in specs:
            specs["network"] = self.__network.name
        specs["labels"] = self.docker_labels
        specs["detach"] = True
        if hasattr(self, "live_server_url"):
            specs.setdefault("environment", {})
            specs["environment"]["AUTHENTIK_HOST"] = self.live_server_url
        container: Container = self.docker_client.containers.run(**specs)
        container.reload()
        state = container.attrs.get("State", {})
        if "Health" not in state:
            return container
>       self.wait_for_container(container)

tests/docker.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_source_ldap_samba.TestSourceLDAPSamba testMethod=test_sync_password>
container = <Container: 6c8574f1fe69>

    def wait_for_container(self, container: Container) -> Container:
        """Check that container is health"""
        attempt = 0
        while True:
            container.reload()
            status = container.attrs.get("State", {}).get("Health", {}).get("Status")
            if status == "healthy":
                return container
            sleep(1)
            attempt += 1
            if attempt >= self.max_healthcheck_attempts:
                self.output_container_logs(container)
>               raise self.failureException("Container failed to start")
E               AssertionError: Container failed to start

tests/docker.py:57: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@rissson
rissson disabled auto-merge March 17, 2026 12:53
@rissson
rissson merged commit ac803b2 into version-2026.2 Mar 17, 2026
86 of 88 checks passed
@rissson
rissson deleted the cherry-pick/20920-to-version-2026.2 branch March 17, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant