You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: change SCC mismatch from blocking error to warning
Based on code review feedback:
- Move SCC mismatch message to a constant (SCC_MISMATCH_WARNING_MESSAGE)
- Allow workspace start when containerScc is undefined
- Update message to emphasize SCC difference instead of nested capabilities
- Change from blocking error to warning - dashboard should not prevent
workspace from starting
The hasSccMismatch() function now returns false when containerScc is
undefined, allowing workspaces created before SCC attribute was added
to start normally.
Status indicators now show warning icon instead of failed status, and
start actions log a warning instead of throwing an error.
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Copy file name to clipboardExpand all lines: packages/dashboard-frontend/src/components/Workspace/Status/Indicator/__tests__/__snapshots__/Indicator.spec.tsx.snap
@@ -545,7 +545,7 @@ exports[`Workspace indicator component DevWorkspaces should render STOPPED statu
545
545
</div>
546
546
`;
547
547
548
-
exports[`Workspace indicator component SCC Mismatch should render FAILED status with SCC mismatch tooltip when containerScc does not match currentScc 1`] =`
548
+
exports[`Workspace indicator component SCC Mismatch should render normal status for RUNNING workspace even with SCC mismatch 1`] =`
549
549
<div
550
550
data-testid="patternfly-tooltip"
551
551
>
@@ -557,38 +557,21 @@ exports[`Workspace indicator component SCC Mismatch should render FAILED status
557
557
<div
558
558
data-testid="tooltip-content"
559
559
>
560
-
<span>
561
-
Cannot start: Administrator enabled nested container capabilities. This workspace was created before this change and cannot be started.
exports[`Workspace indicator component SCC Mismatch should render warning for STOPPED workspace when containerScc is undefined but currentScc is defined 1`] =`
619
720
<div
620
721
data-testid="patternfly-tooltip"
621
722
>
@@ -628,7 +729,7 @@ exports[`Workspace indicator component SCC Mismatch should render normal status
628
729
data-testid="tooltip-content"
629
730
>
630
731
<span>
631
-
Cannot start: Administrator enabled nested container capabilities. This workspace was created before this change and cannot be started.
732
+
The workspace was created with a different container SCC (Security Context Constraint) than what is currently configured. The workspace may fail to start.
@@ -650,7 +751,7 @@ exports[`Workspace indicator component SCC Mismatch should render normal status
650
751
data-testid="tooltip-placed-to"
651
752
>
652
753
<span
653
-
aria-label="Workspace status is Failed"
754
+
aria-label="Workspace status has SCC mismatch warning"
654
755
className="statusIndicator"
655
756
data-testid="workspace-status-indicator"
656
757
>
@@ -685,7 +786,7 @@ exports[`Workspace indicator component SCC Mismatch should render normal status
685
786
</div>
686
787
`;
687
788
688
-
exports[`Workspace indicator component SCC Mismatch should render normal status when containerScc matches currentScc 1`] =`
789
+
exports[`Workspace indicator component SCC Mismatch should render warning triangle icon for STOPPED workspace when containerScc does not match currentScc 1`] =`
689
790
<div
690
791
data-testid="patternfly-tooltip"
691
792
>
@@ -697,21 +798,38 @@ exports[`Workspace indicator component SCC Mismatch should render normal status
697
798
<div
698
799
data-testid="tooltip-content"
699
800
>
700
-
RUNNING
801
+
<span>
802
+
The workspace was created with a different container SCC (Security Context Constraint) than what is currently configured. The workspace may fail to start.
0 commit comments