Skip to content

sources/ldap: use task dependencies instead of main task - #25604

Open
rissson wants to merge 7 commits into
sync-status-dont-use-manytomany-for-tasksfrom
ldap-tasks-dependencies2
Open

rissson wants to merge 7 commits into
sync-status-dont-use-manytomany-for-tasksfrom
ldap-tasks-dependencies2

Conversation

@rissson

@rissson rissson commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Details

What does this PR change?

Why is this change needed?

How was this tested?

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

Stack created with GitHub Stacks CLI • Give Feedback 💬

@codecov

codecov Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
4257 2 4255 1
View the top 3 failed test(s) by shortest run time
authentik.flows.tests.test_executor.TestFlowExecutor::test_reevaluate_remove_consecutive
Stack Traces | 0.149s run time
self = <unittest.case._Outcome object at 0x7f529386a970>
test_case = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
subTest = False

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

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

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
result = <TestCaseFunction test_reevaluate_remove_consecutive>

    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()
                if outcome.success:
                    outcome.expecting_failure = expecting_failure
                    with outcome.testPartExecutor(self):
>                       self._callTestMethod(testMethod)

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:669: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
method = <bound method TestFlowExecutor.test_reevaluate_remove_consecutive of <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>>

    def _callTestMethod(self, method):
>       result = method()
                 ^^^^^^^^

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:615: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>

    def test_reevaluate_remove_consecutive(self):
        """Test planner with re-evaluate (consecutive stages are removed)"""
        flow = create_test_flow(
            FlowDesignation.AUTHENTICATION,
        )
        false_policy = DummyPolicy.objects.create(
            name=generate_id(), result=False, wait_min=1, wait_max=2
        )
    
        binding = FlowStageBinding.objects.create(
            target=flow,
            stage=DummyStage.objects.create(name=generate_id()),
            order=0,
            evaluate_on_plan=True,
            re_evaluate_policies=False,
        )
        binding2 = FlowStageBinding.objects.create(
            target=flow,
            stage=DummyStage.objects.create(name=generate_id()),
            order=1,
            re_evaluate_policies=True,
        )
        binding3 = FlowStageBinding.objects.create(
            target=flow,
            stage=DummyStage.objects.create(name=generate_id()),
            order=2,
            re_evaluate_policies=True,
        )
        binding4 = FlowStageBinding.objects.create(
            target=flow,
            stage=DummyStage.objects.create(name=generate_id()),
            order=2,
            evaluate_on_plan=True,
            re_evaluate_policies=False,
        )
    
        PolicyBinding.objects.create(policy=false_policy, target=binding2, order=0)
        PolicyBinding.objects.create(policy=false_policy, target=binding3, order=0)
    
        # Here we patch the dummy policy to evaluate to true so the stage is included
        with patch("authentik.policies.dummy.models.DummyPolicy.passes", POLICY_RETURN_TRUE):
            exec_url = reverse("authentik_api:flow-executor", kwargs={"flow_slug": flow.slug})
            # First request, run the planner
            response = self.client.get(exec_url)
            self.assertEqual(response.status_code, 200)
            self.assertStageResponse(response, flow, component="ak-stage-dummy")
    
            plan: FlowPlan = self.client.session[SESSION_KEY_PLAN]
    
            self.assertEqual(plan.bindings[0], binding)
            self.assertEqual(plan.bindings[1], binding2)
>           self.assertEqual(plan.bindings[2], binding3)

.../flows/tests/test_executor.py:546: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
first = <FlowStageBinding: Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62>
second = <FlowStageBinding: Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62>
msg = None

    def assertEqual(self, first, second, msg=None):
        """Fail if the two objects are unequal as determined by the '=='
           operator.
        """
        assertion_func = self._getAssertEqualityFunc(first, second)
>       assertion_func(first, second, msg=msg)

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:925: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
first = <FlowStageBinding: Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62>
second = <FlowStageBinding: Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62>
msg = '<Flow[13 chars] Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62> != <Flow[13 chars] Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62>'

    def _baseAssertEqual(self, first, second, msg=None):
        """The default assertEqual implementation, not type specific."""
        if not first == second:
            standardMsg = '%s != %s' % _common_shorten_repr(first, second)
            msg = self._formatMessage(msg, standardMsg)
>           raise self.failureException(msg)
E           AssertionError: <Flow[13 chars] Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62> != <Flow[13 chars] Flow-stage binding #2 to ae9d0272-360a-40a0-8f7d-78bd2ddf2d62>

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:918: AssertionError
tests.e2e.test_provider_rac.TestProviderRAC::test_rac_ssh
Stack Traces | 155s run time
self = <unittest.case._Outcome object at 0x7f1725c2a510>
test_case = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>
subTest = False

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

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

self = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>
result = <TestCaseFunction test_rac_ssh>

    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()
                if outcome.success:
                    outcome.expecting_failure = expecting_failure
                    with outcome.testPartExecutor(self):
>                       self._callTestMethod(testMethod)

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:669: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>
method = <bound method TestProviderRAC.test_rac_ssh of <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>>

    def _callTestMethod(self, method):
>       result = method()
                 ^^^^^^^^

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:615: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>
args = (), kwargs = {}

    @wraps(func)
    def wrapper(self: TransactionTestCase, *args, **kwargs):
        """Run test again if we're below max_retries, including tearDown and
        setUp. Otherwise raise the error"""
        nonlocal count
        try:
>           return func(self, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/decorators.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>,)
kwargs = {}

    @wraps(func)
    def wrapper(*args, **kwargs):
        for file in files:
            content = BlueprintInstance(path=file).retrieve()
            Importer.from_string(content).apply()
>       return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^

.../blueprints/tests/__init__.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>,)
kwargs = {}

    @wraps(func)
    def wrapper(*args, **kwargs):
        for file in files:
            content = BlueprintInstance(path=file).retrieve()
            Importer.from_string(content).apply()
>       return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^

.../blueprints/tests/__init__.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>,)
kwargs = {}

    @wraps(func)
    def wrapper(*args, **kwargs):
        for file in files:
            content = BlueprintInstance(path=file).retrieve()
            Importer.from_string(content).apply()
>       return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^

.../blueprints/tests/__init__.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>,)
kwargs = {}

    @wraps(func)
    def wrapper(*args, **kwargs):
        config = apps.get_app_config(app_name)
        if isinstance(config, ManagedAppConfig):
            config._on_startup_callback(None)
>       return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^

.../blueprints/tests/__init__.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>

    @retry()
    @apply_blueprint(
        "default/flow-default-authentication-flow.yaml",
        "default/flow-default-invalidation-flow.yaml",
    )
    @apply_blueprint(
        "default/flow-default-provider-authorization-implicit-consent.yaml",
        "default/flow-default-provider-invalidation.yaml",
    )
    @apply_blueprint(
        "system/providers-rac.yaml",
    )
    @reconcile_app("authentik_crypto")
    def test_rac_ssh(self):
        """Test SSH RAC"""
        test_ssh = self.run_container(
            image="lscr.io/linuxserver/openssh-server:latest",
            ports={
                "2222": "2222",
            },
            environment={
                "USER_NAME": "authentik",
                "USER_PASSWORD": self.password,
                "PASSWORD_ACCESS": "true",
                "SUDO_ACCESS": "true",
            },
        )
    
        rac: RACProvider = RACProvider.objects.create(
            name=generate_id(),
            authorization_flow=Flow.objects.get(
                slug="default-provider-authorization-implicit-consent"
            ),
            delete_token_on_disconnect=True,
        )
        endpoint = Endpoint.objects.create(
            name=generate_id(),
            protocol=Protocols.SSH,
            host=f"{self.host}:2222",
            settings={
                "username": "authentik",
                "password": self.password,
            },
            provider=rac,
        )
        app = Application.objects.create(name=generate_id(), slug=generate_id(), provider=rac)
        outpost: Outpost = Outpost.objects.create(
            name=generate_id(),
            type=OutpostType.RAC,
        )
        outpost.providers.add(rac)
        outpost.build_user_permissions(outpost.user)
    
        self.start_rac(outpost)
    
        self.driver.get(
            self.url("authentik_providers_rac:start", app=app.slug, endpoint=endpoint.pk)
        )
        self.login()
        sleep(1)
    
        iface = self.driver.find_element(By.CSS_SELECTOR, "ak-rac")
        sleep(5)
        state = self.driver.execute_script("return arguments[0].clientState", iface)
        self.assertEqual(state, 3)
    
        uid = generate_id()
        self.driver.find_element(By.CSS_SELECTOR, "body").send_keys(
            f'echo "{uid}" > /tmp/test' + Keys.ENTER
        )
    
        sleep(2)
    
        _, output = test_ssh.exec_run("cat /tmp/test")
>       self.assertEqual(output, f"{uid}\n".encode())

tests/e2e/test_provider_rac.py:108: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>
first = b'cat: /tmp/test: No such file or directory\n'
second = b'gEFBsual8aKaBVfKzElQcoLVFFNDU8IGSAd0P7If\n', msg = None

    def assertEqual(self, first, second, msg=None):
        """Fail if the two objects are unequal as determined by the '=='
           operator.
        """
        assertion_func = self._getAssertEqualityFunc(first, second)
>       assertion_func(first, second, msg=msg)

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:925: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_rac.TestProviderRAC testMethod=test_rac_ssh>
first = b'cat: /tmp/test: No such file or directory\n'
second = b'gEFBsual8aKaBVfKzElQcoLVFFNDU8IGSAd0P7If\n'
msg = "b'cat: /tmp/test: No such file or directory\\n' != b'gEFBsual8aKaBVfKzElQcoLVFFNDU8IGSAd0P7If\\n'"

    def _baseAssertEqual(self, first, second, msg=None):
        """The default assertEqual implementation, not type specific."""
        if not first == second:
            standardMsg = '%s != %s' % _common_shorten_repr(first, second)
            msg = self._formatMessage(msg, standardMsg)
>           raise self.failureException(msg)
E           AssertionError: b'cat: /tmp/test: No such file or directory\n' != b'gEFBsual8aKaBVfKzElQcoLVFFNDU8IGSAd0P7If\n'

.../hostedtoolcache/Python/3.14.7.............../x64/lib/python3.14/unittest/case.py:918: AssertionError
tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit::test_oidcc_implicit_certification_test_plan
Stack Traces | 168s run time
self = <unittest.case._Outcome object at 0x7fe87f7e1fd0>
test_case = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
subTest = False

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

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

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
result = <TestCaseFunction test_oidcc_implicit_certification_test_plan>

    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()
                if outcome.success:
                    outcome.expecting_failure = expecting_failure
                    with outcome.testPartExecutor(self):
>                       self._callTestMethod(testMethod)

.../hostedtoolcache/Python/3.14.7........./x64/lib/python3.14/unittest/case.py:669: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
method = <bound method TestOpenIDConformanceImplicit.test_oidcc_implicit_certification_test_plan of <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>>

    def _callTestMethod(self, method):
>       result = method()
                 ^^^^^^^^

.../hostedtoolcache/Python/3.14.7........./x64/lib/python3.14/unittest/case.py:615: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
args = (), kwargs = {}

    @wraps(func)
    def wrapper(self: TransactionTestCase, *args, **kwargs):
        """Run test again if we're below max_retries, including tearDown and
        setUp. Otherwise raise the error"""
        nonlocal count
        try:
>           return func(self, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/decorators.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>

    @retry()
    def test_oidcc_implicit_certification_test_plan(self):
>       self.run_test(
            "oidcc-implicit-certification-test-plan",
            self.test_plan_config,
            {
                "server_metadata": "discovery",
                "client_registration": "static_client",
            },
        )

tests/openid_conformance/test_oidc_implicit.py:9: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
test_name = 'oidcc-implicit-certification-test-plan'
test_plan_config = {'alias': 'authentik', 'description': 'authentik', 'server': {'discoveryUrl': 'https://10.1.0.13:.../application/o/o...86b5389d15b173109a0555dc47e0cc0949104f1925bcc6565351cb1dffd7e6818cf074f5bd50c210b565121a7328ee8bd40107fc4bbd867'}, ...}
test_variant = {'server_metadata': 'discovery', 'client_registration': 'static_client'}

    def run_test(
        self,
        test_name: str,
        test_plan_config: dict[str, Any],
        test_variant: dict[str, Any] | None = None,
    ):
        self.conformance = Conformance(f"https://{self.host}:8443", None, verify_ssl=False)
    
        test_plan = self.conformance.create_test_plan(
            test_name,
            test_plan_config,
            test_variant,
        )
        plan_id = test_plan["id"]
        for test in test_plan["modules"]:
            # Fetch name and variant of the next test to run
            module_name = test["testModule"]
            variant = test["variant"]
            module_instance = self.conformance.create_test_from_plan_with_variant(
                plan_id, module_name, variant
            )
            module_id = module_instance["id"]
>           self.run_single_test(module_id)

tests/openid_conformance/base.py:87: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
module_id = '8N1USOw8LGMg2Ma'

    def run_single_test(self, module_id: str):
        """Process instructions for a single test, navigate to browser URLs and take screenshots"""
        tested_browser_url = 0
        uploaded_image = 0
        cleared_cookies = False
        while True:
            # Fetch all info
            test_status = self.conformance.get_test_status(module_id)
            test_log = self.conformance.get_test_log(module_id)
            test_info = self.conformance.get_module_info(module_id)
            # Check status early, if we're finished already we don't want to do anything extra
            if test_info["status"] in ["INTERRUPTED", "FINISHED"]:
                return
            # Check if we need to clear cookies - tests only indicates this in their written summary
            # so this check is a bit brittle
            if "cookies" in test_info["summary"] and not cleared_cookies:
                # Navigate to our origin to delete cookies in the right context
                self.driver.get(self.url("authentik_api:user-me") + "?format=json")
                self.driver.delete_all_cookies()
                cleared_cookies = True
            # Check if we need deal with any browser URLs
            browser_urls = test_status.get("browser", {}).get("urls", [])
            if len(browser_urls) > tested_browser_url:
>               self.do_browser(browser_urls[tested_browser_url])

tests/openid_conformance/base.py:122: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
url = 'https://10.1.0.13:.../application/o/authorize/?client_id=4054d882aff59755f2f279968b97ce8806a926e1&nonce=J9VVGv6lK7&redirect_uri=https://localhost:.../a/authentik/callback&response_type=id_token&scope=openid&state=ajCIrGnipg'

    def do_browser(self, url):
        """For any specific OpenID Conformance test, execute the operations required"""
        self.driver.get(url)
        should_expect_completion = False
        if "if/flow/default-authentication-flow" in self.driver.current_url:
            self.logger.debug("Logging in")
            skipped = []
            if "login_hint" in self.driver.current_url:
                skipped.append("ak-stage-identification")
>           self.login(skip_stages=skipped)

tests/openid_conformance/base.py:153: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
shadow_dom = True, skip_stages = []

    def login(self, shadow_dom=True, skip_stages: list[str] | None = None):
        """Perform the entire authentik login flow."""
        skip_stages = skip_stages or []
    
        if "ak-stage-identification" not in skip_stages:
            if shadow_dom:
>               flow_executor = self.get_shadow_root("ak-flow-executor")
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/selenium.py:293: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.openid_conformance.test_oidc_implicit.TestOpenIDConformanceImplicit testMethod=test_oidcc_implicit_certification_test_plan>
selector = 'ak-flow-executor'
container = <selenium.webdriver.remote.webdriver.WebDriver (session="939dd724d571ae86444147a963049ed9")>
timeout = 10

    def get_shadow_root(
        self, selector: str, container: WebElement | WebDriver | None = None, timeout: float = 10
    ) -> WebElement:
        """Get the shadow root of a web component specified by `selector`."""
        if not container:
            container = self.driver
        wait = WebDriverWait(container, timeout)
        host: WebElement | None = None
    
        try:
            host = wait.until(lambda c: c.find_element(By.CSS_SELECTOR, selector))
        except TimeoutException:
            self.fail(f"Timed out waiting for shadow host {selector} to appear")
    
        attempts = 0
    
        while attempts < SHADOW_ROOT_RETRIES:
            try:
                host = container.find_element(By.CSS_SELECTOR, selector)
                return host.shadow_root
            except (
                NoSuchElementException,
                NoSuchShadowRootException,
                DetachedShadowRootException,
                StaleElementReferenceException,
            ):
                attempts += 1
                sleep(0.2)
    
        inner_html = "<no host>"
        if host is not None:
            try:
                inner_html = host.get_attribute("innerHTML") or "<no host>"
            except DetachedShadowRootException, StaleElementReferenceException:
                inner_html = "<stale host>"
    
>       raise RuntimeError(
            f"Failed to obtain shadow root for {selector} after {attempts} attempts. "
            f"Host innerHTML: {inner_html}"
        )
E       RuntimeError: Failed to obtain shadow root for ak-flow-executor after 5 attempts. Host innerHTML: 
E               
E       
E       <div class="ak-c-placeholder" id="ak-placeholder" slot="placeholder">
E           <span class="pf-c-spinner" role="progressbar" aria-valuetext="Loading...">
E               <span class="pf-c-spinner__clipper"></span>
E               <span class="pf-c-spinner__lead-ball"></span>
E               <span class="pf-c-spinner__tail-ball"></span>
E           </span>
E       </div>
E       
E               
E               <ak-brand-links name="flow-links" slot="footer"></ak-brand-links>

tests/selenium.py:270: RuntimeError

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

@netlify

netlify Bot commented Aug 31, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 5a57749
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a9594b93a1c560008a6c011
😎 Deploy Preview https://deploy-preview-25604--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.

@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from 380c0c3 to 5a53a6f Compare August 31, 2026 14:54
@netlify

netlify Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 4045bb9
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a96dc2bbece76000748a899
😎 Deploy Preview https://deploy-preview-25604--authentik-storybook.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.

@netlify

netlify Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit b0d38f5
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a9adef0cc7a690008ffef31
😎 Deploy Preview https://deploy-preview-25604--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.

@netlify

netlify Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit b0d38f5
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a9adef053846700088f7fdc
😎 Deploy Preview https://deploy-preview-25604--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.

@rissson rissson self-assigned this Sep 1, 2026
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from e4841af to 398076c Compare September 1, 2026 13:57
Base automatically changed from tasks-allow-filter-by-uuid to main September 1, 2026 14:00
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch 3 times, most recently from 398076c to 4045bb9 Compare September 1, 2026 14:07
@rissson
rissson changed the base branch from main to sync-status-persistence September 1, 2026 14:20
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from 4045bb9 to 3ace49e Compare September 1, 2026 15:24
Comment thread authentik/lib/sync/models.py Fixed
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch 3 times, most recently from 711ed41 to 1b44e15 Compare September 1, 2026 15:48
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from 1b44e15 to 67eb119 Compare September 1, 2026 16:07
Comment thread authentik/sources/ldap/models.py Resolved
Comment thread authentik/sources/ldap/tasks.py Resolved
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from 5227479 to cd65163 Compare September 1, 2026 16:30
@rissson
rissson requested review from a team as code owners September 3, 2026 15:16

@dewi-tik dewi-tik 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.

Docs approval

@dewi-tik dewi-tik mentioned this pull request Sep 3, 2026
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from 0a31639 to 0affd68 Compare September 3, 2026 15:46
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from a1d516a to 3b03a49 Compare September 4, 2026 12:01
@rissson rissson moved this from In Progress to Needs review in authentik Core Sep 4, 2026
@rissson

rissson commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

storybook is failing, I have no clue why

Comment thread authentik/sources/ldap/api/sources.py Resolved
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from 87f5a5d to 47042e7 Compare September 4, 2026 13:11
Comment thread authentik/sources/ldap/models.py Fixed
Comment thread authentik/sources/ldap/models.py Fixed
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from dcd644b to b0d38f5 Compare September 4, 2026 15:08
@rissson
rissson changed the base branch from sync-status-persistence to sync-status-dont-use-manytomany-for-tasks September 4, 2026 15:12
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
@rissson
rissson force-pushed the ldap-tasks-dependencies2 branch from b0d38f5 to 07eb235 Compare September 4, 2026 15:13
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>

This branch has not been deployed

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

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

3 participants