Skip to content

root: skip current tab when refreshing others#18674

Merged
BeryJu merged 1 commit intomainfrom
root/ws-fix-all-tabs-refresh
Dec 8, 2025
Merged

root: skip current tab when refreshing others#18674
BeryJu merged 1 commit intomainfrom
root/ws-fix-all-tabs-refresh

Conversation

@BeryJu
Copy link
Member

@BeryJu BeryJu commented Dec 8, 2025

small oversight

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu added the backport/version-2025.10 Add this label to PRs to backport changes to version-2025.10 label Dec 8, 2025
@BeryJu BeryJu requested review from a team as code owners December 8, 2025 13:28
@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 3dd0a49
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6936d293763ecf0008b02780
😎 Deploy Preview https://deploy-preview-18674--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
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 3dd0a49
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6936d2935143010008818f30
😎 Deploy Preview https://deploy-preview-18674--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.

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit 3dd0a49
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6936d29367ffe30007efec30

@codecov
Copy link

codecov bot commented Dec 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2816 1 2815 2
View the top 1 failed test(s) by shortest run time
authentik.flows.tests.test_executor.TestFlowExecutor::test_reevaluate_remove_consecutive
Stack Traces | 0.166s run time
self = <unittest.case._Outcome object at 0x7f99bdced0f0>
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.13.9.............../x64/lib/python3.13/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.13.9.............../x64/lib/python3.13/unittest/case.py:651: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

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):
>       if method() is not None:

.../hostedtoolcache/Python/3.13.9.............../x64/lib/python3.13/unittest/case.py:606: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

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:516: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
first = <FlowStageBinding: Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502>
second = <FlowStageBinding: Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502>
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.13.9.............../x64/lib/python3.13/unittest/case.py:907: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <authentik.flows.tests.test_executor.TestFlowExecutor testMethod=test_reevaluate_remove_consecutive>
first = <FlowStageBinding: Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502>
second = <FlowStageBinding: Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502>
msg = '<Flow[13 chars] Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502> != <Flow[13 chars] Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502>'

    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 0d76a76b-03a7-4038-b3c5-428570a79502> != <Flow[13 chars] Flow-stage binding #2 to 0d76a76b-03a7-4038-b3c5-428570a79502>

.../hostedtoolcache/Python/3.13.9.............../x64/lib/python3.13/unittest/case.py:900: 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.

@BeryJu BeryJu merged commit ff91edd into main Dec 8, 2025
92 of 94 checks passed
@BeryJu BeryJu deleted the root/ws-fix-all-tabs-refresh branch December 8, 2025 13:57
authentik-automation bot pushed a commit that referenced this pull request Dec 8, 2025
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@authentik-automation
Copy link
Contributor

🍒 Cherry-pick to version-2025.10 created: #18675

BeryJu added a commit that referenced this pull request Dec 8, 2025
…version-2025.10) (#18675)

root: skip current tab when refreshing others (#18674)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L. <jens@goauthentik.io>
kensternberg-authentik added a commit that referenced this pull request Dec 11, 2025
* main: (23 commits)
  *: Auto compress images (#18673)
  website/integrations: update kimai doc (#18629)
  root: skip current tab when refreshing others (#18674)
  core: add digraph group hierarchy (#17050)
  core: bump astral-sh/uv from 0.9.15 to 0.9.16 (#18668)
  core: bump goauthentik.io/api/v3 from 3.2025120.16 to 3.2025120.18 (#18661)
  web: bump type-fest from 5.3.0 to 5.3.1 in /web (#18663)
  ci: bump peter-evans/create-pull-request from 7.0.9 to 7.0.11 (#18666)
  web: bump vite from 7.2.6 to 7.2.7 in /web (#18662)
  core: bump goauthentik/fips-debian from `a80dbbd` to `10c8086` (#18665)
  ci: bump actions/create-github-app-token from 2.2.0 to 2.2.1 (#18664)
  ci: bump astral-sh/setup-uv from 7.1.4 to 7.1.5 in /.github/actions/setup (#18667)
  website/docs: background tasks: add more detail about "next run" (#18660)
  website/docs: install-config: fix dump_config command (#18659)
  website/integrations: wordpress: fix redirect uri (#18658)
  stages/mtls: always include cert in flow plan (#18657)
  endpoints: fix UI bugs, add user binding, etc (#18609)
  sources/ldap: make server info optional (#18648)
  web/admin: fix event volume chart not updating with query (#18649)
  web: Bump types, fix ESLint errors (#17546)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2025.10 Add this label to PRs to backport changes to version-2025.10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants