fix(workbench): skip disabled resource profiles in capacity test#515
Merged
ian-flores merged 2 commits intoJul 22, 2026
Merged
Conversation
Workbench renders resource profiles the authenticated user is not entitled to as visible [role='option'] elements marked aria-disabled='true' / data-disabled. The capacity test detected every option as launchable and then clicked it, so Playwright blocked waiting for the disabled element to become enabled until the 5s timeout blew up. Detect the disabled state up front: - _detect_profiles now reports each profile's disabled flag; auto-detect filters out disabled profiles and skips the scenario only when every profile is disabled (nothing launchable). - _launch_session checks the resolved option before clicking and raises ResourceProfileDisabled instead of clicking a disabled option; an explicitly configured but disabled profile skips with a clear reason naming the likely group/entitlement restriction. Fixes #514 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…city twin Address review feedback on PR #515's disabled-resource-profile handling: - launch_sessions records a disabled configured profile and continues to the remaining profiles instead of aborting the whole scenario on the first one; it skips only when nothing was launchable across all profiles. - Move _option_is_disabled and ResourceProfileDisabled into workbench/conftest.py and apply the disabled-option check in test_session_capacity_k8s.py, whose diverged copy of _launch_session still hung on disabled options. - Replace the list[dict[str, object]] profile records with a DetectedProfile frozen dataclass, dropping the str() casts and object-typed leakage.
Collaborator
|
Hey Sam. I reviewed #515 and pushed one commit onto your branch ( Three things it changes:
|
ian-flores
approved these changes
Jul 21, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the
test_launch_sessions_with_the_configured_resource_profile[chromium]timeout when a Workbench resource profile is visible but disabled for the authenticated user.Closes #514
Root cause
Workbench renders resource profiles a user is not entitled to (e.g. a group-restricted profile) as visible
[role='option']elements markedaria-disabled="true"/data-disabled. The capacity test detected every option as launchable, thenoption.click()on a disabled one blocked until Playwright's 5s timeout:Fix
_option_is_disabled()— new helper checkingaria-disabled/data-disabled._detect_profiles()— now returns each profile's name and disabled flag (instead of a bare name list).launch_sessions) — launches only enabled profiles; skips the whole scenario with a clear reason only when every profile is disabled (nothing launchable)._launch_session()— checks the resolved option before clicking and raisesResourceProfileDisabledrather than clicking a disabled option. An explicitly configured (workbench.session_profiles) but disabled profile nowpytest.skips with a message naming the profile and the likely group/entitlement restriction.Behavior decisions
pytest.skipwith reason (environment condition, not a failure)pytest.skip— nothing launchableTesting
ruff check/ruff format --checkpass.pytest --collect-onlycollects cleanly.🤖 Generated with Claude Code