Skip to content

Commit

Permalink
[ide-service] remote gp-run experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov authored and roboquat committed Feb 20, 2023
1 parent 40830a8 commit cca07f1
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 45 deletions.
1 change: 0 additions & 1 deletion components/ide-service-api/go/config/ideconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const (
)

type IDEConfig struct {
GpRunImage string `json:"gpRunImage"`
SupervisorImage string `json:"supervisorImage"`
IdeOptions IDEOptions `json:"ideOptions"`
}
Expand Down
10 changes: 0 additions & 10 deletions components/ide-service/pkg/server/ideconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ func ParseConfig(ctx context.Context, b []byte) (*config.IDEConfig, error) {
cfg.IdeOptions.Options[id] = option
}

if cfg.GpRunImage != "" {
if resolved, err := oci_tool.Resolve(ctx, cfg.GpRunImage); err != nil {
log.WithError(err).Error("ide config: cannot resolve latest image digest")
cfg.GpRunImage = ""
} else {
log.WithField("image", cfg.GpRunImage).WithField("resolved", resolved).Info("ide config: resolved latest image digest")
cfg.GpRunImage = resolved
}
}

return &cfg, nil
}

Expand Down
13 changes: 0 additions & 13 deletions components/ide-service/pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,6 @@ func (s *IDEServiceServer) ResolveWorkspaceConfig(ctx context.Context, req *api.
resp.IdeImageLayers = append(resp.IdeImageLayers, desktopImageLayer)
resp.IdeImageLayers = append(resp.IdeImageLayers, desktopUserImageLayers...)
}

if ideConfig.GpRunImage != "" {
featureFlagAttrs := experiments.Attributes{
UserID: req.User.Id,
UserEmail: req.User.GetEmail(),
}
useRunGp := s.experiemntsClient.GetBoolValue(ctx, "ide_service_experimental_rungp", false, featureFlagAttrs)
log.WithField("featureFlagAttrs", featureFlagAttrs).WithField("useRunGp", useRunGp).Debug("calling configcat to check ide_service_experimental_rungp")
if useRunGp {
resp.IdeImageLayers = append(resp.IdeImageLayers, ideConfig.GpRunImage)
log.Debug("adding gp-run layer")
}
}
}

jbGW, ok := ideConfig.IdeOptions.Clients["jetbrains-gateway"]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func ideConfigConfigmap(ctx *common.RenderContext) ([]runtime.Object, error) {
jbPluginLatestImage := resolveLatestImage(ide.JetBrainsBackendPluginImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.JetBrainsBackendPluginLatestImage)
jbLauncherImage := ctx.ImageName(ctx.Config.Repository, ide.JetBrainsLauncherImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.JetBrainsLauncherImage.Version)
idecfg := ide_config.IDEConfig{
GpRunImage: ctx.ImageName("registry.hub.docker.com", "gitpod/gp-run", "ak-test"),
SupervisorImage: ctx.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version),
IdeOptions: ide_config.IDEOptions{
Clients: map[string]ide_config.IDEClient{
Expand Down

0 comments on commit cca07f1

Please sign in to comment.