Skip to content

[server] Use public services endpoint for webhooks ENG-524 #18367

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 3 commits into from
Jul 28, 2023

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Jul 27, 2023

Description

  1. Add publicServicesUrl to server config. This needs to be configurable as it can be customized in Dedicated
  2. Default to services.DOMAIN when not provided
  3. Propagate the value into server
  4. Use the value of publicServicesUrl when constructing webhook URLs
Summary generated by Copilot

🤖 Generated by Copilot at e5e6e5b

This pull request adds a new configuration property publicServicesUrl to the server component of Gitpod, which defines the external URL for public services such as webhooks. It also updates the logic for generating and validating the hook URLs for various integrations, and for setting the default value of the property based on the installation domain or the experimental web app configuration.

Related Issue(s)

Fixes #

How to test

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment
  • /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
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh
  • with-monitoring

/hold

@easyCZ easyCZ requested a review from a team as a code owner July 27, 2023 09:59
@easyCZ easyCZ changed the title [server] Use public services endpoint for webhooks & config [server] Use public services endpoint for webhooks & config ENG-524 Jul 27, 2023
@svenefftinge
Copy link
Contributor

Why and when would we configure differently than services.DOMAIN?

@easyCZ
Copy link
Member Author

easyCZ commented Jul 27, 2023

I've clarified this with Chris and will be removing the configurability, that means it will always be services.DOMAIN and we don't need to seed the value from the installer.

@roboquat roboquat added size/S and removed size/M labels Jul 27, 2023
@easyCZ easyCZ changed the title [server] Use public services endpoint for webhooks & config ENG-524 [server] Use public services endpoint for webhooks ENG-524 Jul 27, 2023
@easyCZ
Copy link
Member Author

easyCZ commented Jul 28, 2023

Screenshot 2023-07-28 at 9 13 08

Can confirm the webhook registered uses services.

@easyCZ
Copy link
Member Author

easyCZ commented Jul 28, 2023

/unhold

@roboquat roboquat merged commit ecbb418 into main Jul 28, 2023
@roboquat roboquat deleted the mp/server-webhook-services-url branch July 28, 2023 07:14
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