Skip to content

[server] Remove superfluous config field builtinAuthProvidersConfigured #9612

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
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/server/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ import { log, LogrusLogLevel } from "@gitpod/gitpod-protocol/lib/util/logging";
import { filePathTelepresenceAware } from "@gitpod/gitpod-protocol/lib/env";

export const Config = Symbol("Config");
export type Config = Omit<ConfigSerialized, "hostUrl" | "chargebeeProviderOptionsFile"> & {
Copy link
Member

Choose a reason for hiding this comment

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

A possible risk with this change across boundaries is that a revert of just server may be broken against Installer config provided.

Normally, when removing config it's first made unused by the consumer (server) and then removed in later releases from the config specified.

Copy link
Member Author

Choose a reason for hiding this comment

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

A possible risk with this change across boundaries is that a revert of just server may be broken against Installer config provided.

In theory yes, but we 1) do not validate server config (so won't break if it's passed nonetheless), and 2) it's always overridden here.

export type Config = Omit<ConfigSerialized, "hostUrl" | "chargebeeProviderOptionsFile" | "licenseFile"> & {
hostUrl: GitpodHostUrl;
workspaceDefaults: WorkspaceDefaults;
chargebeeProviderOptions?: ChargebeeProviderOptions;
builtinAuthProvidersConfigured: boolean;
};

export interface WorkspaceDefaults {
Expand Down Expand Up @@ -87,7 +88,6 @@ export interface ConfigSerialized {

authProviderConfigs: AuthProviderParams[];
authProviderConfigFiles: string[];
builtinAuthProvidersConfigured: boolean;
disableDynamicAuthProviderLogin: boolean;

/**
Expand Down
1 change: 0 additions & 1 deletion install/installer/pkg/components/server/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {

return providers
}(),
BuiltinAuthProvidersConfigured: len(ctx.Config.AuthProviders) > 0,
DisableDynamicAuthProviderLogin: false,
MaxEnvvarPerUserCount: 4048,
MaxConcurrentPrebuildsPerRef: 10,
Expand Down
1 change: 0 additions & 1 deletion install/installer/pkg/components/server/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type ConfigSerialized struct {
LicenseFile string `json:"licenseFile"`
DefinitelyGpDisabled bool `json:"definitelyGpDisabled"`
EnableLocalApp bool `json:"enableLocalApp"`
BuiltinAuthProvidersConfigured bool `json:"builtinAuthProvidersConfigured"`
DisableDynamicAuthProviderLogin bool `json:"disableDynamicAuthProviderLogin"`
MaxEnvvarPerUserCount int32 `json:"maxEnvvarPerUserCount"`
MaxConcurrentPrebuildsPerRef int32 `json:"maxConcurrentPrebuildsPerRef"`
Expand Down