Skip to content

Inject new IApplicationCluster dependency into server and wsman-bridge #14084

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

Closed
wants to merge 1 commit into from

Conversation

andrew-farries
Copy link
Contributor

Description

Create a new IApplicationClusterProvider interface and inject implementations into WorkspaceManagerClientProvider.

The injected implemenations will be used to let the WorkspaceManagerClientProvider know in which application cluster it runs.

By injecting a new dependency, we can do the environment variable check once at the top of the object composition graph rather than having to read the environment in multiple places lower down the object graph.

Related Issue(s)

Part of #9198 and #13800

How to test

No behaviour change - all tests pass and workspaces start as before.

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

Add an IApplicationClusterProvider interface an inject an implementation
into WorkspaceManagerClientProvider.

This will be used to let the WorkspaceManagerClientProvider know in
which application cluster it runs.

By injecting a new dependency, we can do the environment variable check
once at the top of the object composition graph.
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-bind-application-cluster-provider.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 Oct 21, 2022

function newApplicationClusterProvider(): IApplicationClusterProvider {
return {
getApplicationCluster: () => process.env.GITPOD_INSTALLATION_SHORTNAME ?? "",
Copy link
Member

Choose a reason for hiding this comment

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

Can we read from Config here? See here for an example.

@andrew-farries
Copy link
Contributor Author

closing after discussion of a different approach with @geropl

@andrew-farries andrew-farries deleted the af/bind-application-cluster-provider branch October 21, 2022 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants