Skip to content

Conversation

@iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Mar 21, 2023

Description

This PR adds consistency for the ConfigCat endpoint we use in Gitpod. Currently, most internal components use https://cdn.configcat.com/ directly and external clients (like VS Code Desktop) use our proxy (gitpod.io/configcat), which is preferred (we control caching there). This PR unifies all code to use our ConfigCat proxy.

There is a new configuration field of the supervisor named EnabledConfigCat and a corresponding environment variable on the server, GITPOD_CONFIGCAT_ENABLED.

Related Issue(s)

Relates to #16906 and #16903

How to test

  1. Open this PR in gitpod.io
  2. use kubectl describe deployment server to check the CONFIG_CAT relate env is setting correct.
  3. use kubectl describe pod ws-{instanceID} to check GITPOD_CONFIGCAT_ENABLED is set.
  4. change something in configcat, make sure it can still work.

Release Notes

NONE

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /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-pd-configcat.1 because the annotations in the pull request description changed
(with .werft/ from main)

@iQQBot iQQBot marked this pull request as ready for review March 22, 2023 07:01
@iQQBot iQQBot requested review from a team March 22, 2023 07:01
@iQQBot iQQBot requested a review from a team as a code owner March 22, 2023 07:01
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: IDE team: staff-engineers labels Mar 22, 2023
@iQQBot iQQBot force-pushed the pd/configcat branch 2 times, most recently from 742e9f9 to d36f905 Compare March 22, 2023 08:21
@easyCZ
Copy link
Member

easyCZ commented Mar 22, 2023

Cool, we can keep it with backwards compatibility and cleanup, after we roll it out.

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 22, 2023

Cool, we can keep it with backwards compatibility and cleanup, after we roll it out.

@easyCZ Could you give an approve?

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

We should also normalize how the config is specified in the installer. Right now, there's some info passed into the proxy, and some passed into the Webapp.Experiments config. We should only one place for these

@roboquat roboquat added size/L and removed size/M labels Mar 22, 2023
@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 22, 2023

We should also normalize how the config is specified in the installer. Right now, there's some info passed into the proxy, and some passed into the Webapp.Experiments config. We should only one place for these

Yeah, I remove these 2 unused configs, because it's same as default value.

@akosyakov
Copy link
Member

@filiptronicek Are you taking of a review from IDE side? Don't want to intervene.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

I did not try, code wise looks good.

/hold

if someone else wants to review, otherwise merge when are ready

Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

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

@iQQBot did something change for the supervisor? I cannot see GITPOD_CONFIGCAT_ENABLED, although the server deployment has both CONFIGCAT_SDK_KEY and CONFIGCAT_BASE_URL set correctly 🤔.

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 22, 2023

did something change for the supervisor? I cannot see GITPOD_CONFIGCAT_ENABLED, although the server deployment has both CONFIGCAT_SDK_KEY and CONFIGCAT_BASE_URL set correctly 🤔.

Ah, we use ide-service to set env, but we don't enabled configcat in ide-service, added in e5450a5

Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

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

Tested and all looks good

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 23, 2023

To unblock merge, I plan to move commit 5835bcc to another PR

@iQQBot
Copy link
Contributor Author

iQQBot commented Mar 23, 2023

/unhold

@roboquat roboquat merged commit b465d06 into main Mar 23, 2023
@roboquat roboquat deleted the pd/configcat branch March 23, 2023 10:01
@roboquat roboquat added the deployed: webapp Meta team change is running in production label Mar 24, 2023
@roboquat roboquat added the deployed: IDE IDE change is running in production label Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployed: IDE IDE change is running in production deployed: webapp Meta team change is running in production release-note-none size/M team: IDE team: staff-engineers team: webapp Issue belongs to the WebApp team

Projects

Status: In Validation

Development

Successfully merging this pull request may close these issues.

6 participants