Skip to content

[proxy] Pre-flight server authentication related endpoints to add additional latency #15078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Nov 30, 2022

Description

Pre-flight requests to server /auth/* endpoints in order to decide whether to send the actual request to server or slow-server depending on the value of the slow_database feature flag.

This change will affect requests to following paths on server: /auth/github/callback /auth /auth/* /apps /apps/*

The pre-flight approach taken here is the same as we use for other api/* endpoints (#14897) and websocket connections (#15035).

Related Issue(s)

Part of #9198 and #14965

How to test

  1. Open the preview environment and start a workspace.
  2. Take the instance id of the running workspace from the application db.
  3. Hit https://af-add-lat37f4cc0217.preview.gitpod-dev.com/api/auth/workspace-cookie/your-instance-id
  4. Enable the slow_database feature flag for your user id in the preview.
  5. Wait up to 3 minutes for the configcat client to fetch the updated feature flag.
  6. Hit https://af-add-lat37f4cc0217.preview.gitpod-dev.com/api/auth/workspace-cookie/your-instance-id and observe that the endpoint now has additional latency.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-slow-database
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-add-latency-to-auth-endpoints.8 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Nov 30, 2022
@roboquat roboquat merged commit 2071284 into main Dec 1, 2022
@roboquat roboquat deleted the af/add-latency-to-auth-endpoints branch December 1, 2022 14:43
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants