Skip to content

Commit

Permalink
Remove feature flag for VNet, unhide tsh vnet (#42304)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravicious authored Jun 3, 2024
1 parent c59bc5a commit dc2c649
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 11 deletions.
3 changes: 1 addition & 2 deletions tool/tsh/common/vnet_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ type vnetCommand struct {

func newVnetCommand(app *kingpin.Application) *vnetCommand {
cmd := &vnetCommand{
// TODO(nklaassen): unhide this when ready to ship.
CmdClause: app.Command("vnet", "Start Teleport VNet, a virtual network for TCP application access.").Hidden(),
CmdClause: app.Command("vnet", "Start Teleport VNet, a virtual network for TCP application access."),
}
return cmd
}
Expand Down
1 change: 0 additions & 1 deletion web/packages/teleterm/src/mainProcess/fixtures/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export class MockMainProcessClient implements MainProcessClient {
jsonSchemaFile: createMockFileStorage(),
platform: this.getRuntimeSettings().platform,
});
this.configService.set('feature.vnet', true);
}

subscribeToNativeThemeUpdate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export const createAppConfigSchema = (platform: Platform) => {
.boolean()
.default(false)
.describe('Disables SSH connection resumption.'),
'feature.vnet': z.boolean().default(false).describe('Shows UI for VNet.'),
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default {

export function ActionButtons() {
const appContext = new MockAppContext();
appContext.configService.set('feature.vnet', true);
prepareAppContext(appContext);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ const prepareAppContext = (appContext: MockAppContext) => {
appContext.connectionTracker.disconnectItem = async () => {};
appContext.connectionTracker.removeItem = async () => {};
appContext.connectionTracker.useState = () => null;
appContext.configService.set('feature.vnet', true);
};

const useOpenConnections = () => {
Expand Down
8 changes: 3 additions & 5 deletions web/packages/teleterm/src/ui/Vnet/vnetContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const VnetContext = createContext<VnetContext>(null);

export const VnetContextProvider: FC<PropsWithChildren> = props => {
const [status, setStatus] = useState<VnetStatus>('stopped');
const { vnet, mainProcessClient, configService } = useAppContext();
const { vnet, mainProcessClient } = useAppContext();
const isWorkspaceStateInitialized = useStoreSelector(
'workspacesService',
useCallback(state => state.isInitialized, [])
Expand All @@ -65,10 +65,8 @@ export const VnetContextProvider: FC<PropsWithChildren> = props => {
});

const isSupported = useMemo(
() =>
mainProcessClient.getRuntimeSettings().platform === 'darwin' &&
configService.get('feature.vnet').value,
[mainProcessClient, configService]
() => mainProcessClient.getRuntimeSettings().platform === 'darwin',
[mainProcessClient]
);

const [startAttempt, start] = useAsync(
Expand Down

0 comments on commit dc2c649

Please sign in to comment.