Skip to content

Conversation

filiptronicek
Copy link
Member

Description

Introduces a way for us to expire POV cells, controlled by the new cell_disabled feature flag.

Related Issue(s)

Fixes ENT-794

How to test

Visit the following preview env. You can also try flipping the feature flag mentioned above and see what it does.

https://ft-disable8a89f3dd88.preview.gitpod-dev.com/

Comment on lines +298 to +312
const isCellDisabled = await getExperimentsClientForBackend().getValueAsync(
"cell_disabled",
false,
{},
);
if (
isCellDisabled &&
requestContext.requestMethod === "gitpod.v1.UserService/getAuthenticatedUser"
) {
const error = self.apiConverter.toError(
new ApplicationError(ErrorCodes.CELL_EXPIRED, "Cell is disabled"),
);
done(error);
throw error;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part does the heavy lifting

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM and it works ✔️

I would love to discuss this, otherwise am fine with merging. 👍

@@ -382,6 +382,11 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
}

private async checkUser(methodName?: string, logPayload?: {}, ctx?: LogContext): Promise<User> {
const cellDisabled = await getExperimentsClientForBackend().getValueAsync("cell_disabled", false, {});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

@roboquat roboquat merged commit fdbf605 into main Sep 18, 2024
18 of 19 checks passed
@roboquat roboquat deleted the ft/disabled-cell-screen branch September 18, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants