Skip to content
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

Implement experimental support for data spell #1347

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions cmd/agent/container/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ func (cmd *SetupContainerCmd) installIDE(setupInfo *config.Result, ide *provider
return jetbrains.NewRubyMineServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install()
case string(config2.IDEWebStorm):
return jetbrains.NewWebStormServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install()
case string(config2.IDEDataSpell):
return jetbrains.NewDataSpellServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install()
case string(config2.IDEFleet):
return fleet.NewFleetServer(config.GetRemoteUser(setupInfo), ide.Options, log).Install(setupInfo.SubstitutionContext.ContainerWorkspaceFolder)
case string(config2.IDEJupyterNotebook):
Expand Down
2 changes: 2 additions & 0 deletions cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ func (cmd *UpCmd) Run(
return jetbrains.NewRubyMineServer(config2.GetRemoteUser(result), ideConfig.Options, log).OpenGateway(result.SubstitutionContext.ContainerWorkspaceFolder, client.Workspace())
case string(config.IDEWebStorm):
return jetbrains.NewWebStormServer(config2.GetRemoteUser(result), ideConfig.Options, log).OpenGateway(result.SubstitutionContext.ContainerWorkspaceFolder, client.Workspace())
case string(config.IDEDataSpell):
return jetbrains.NewDataSpellServer(config2.GetRemoteUser(result), ideConfig.Options, log).OpenGateway(result.SubstitutionContext.ContainerWorkspaceFolder, client.Workspace())
case string(config.IDEFleet):
return startFleet(ctx, client, log)
case string(config.IDEJupyterNotebook):
Expand Down
1 change: 1 addition & 0 deletions pkg/config/ide.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
IDERubyMine IDE = "rubymine"
IDERider IDE = "rider"
IDEWebStorm IDE = "webstorm"
IDEDataSpell IDE = "dataspell"
IDEFleet IDE = "fleet"
IDEJupyterNotebook IDE = "jupyternotebook"
IDECursor IDE = "cursor"
Expand Down
2 changes: 2 additions & 0 deletions pkg/driver/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ func (d *dockerDriver) RunDockerDevContainer(
args = append(args, "--mount", jetbrains.NewRubyMineServer("", ideOptions, d.Log).GetVolume())
case string(config2.IDEWebStorm):
args = append(args, "--mount", jetbrains.NewWebStormServer("", ideOptions, d.Log).GetVolume())
case string(config2.IDEDataSpell):
args = append(args, "--mount", jetbrains.NewDataSpellServer("", ideOptions, d.Log).GetVolume())
}

// labels
Expand Down
6 changes: 6 additions & 0 deletions pkg/ide/ideparse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ var AllowedIDEs = []AllowedIDE{
Options: jetbrains.WebStormOptions,
Icon: "https://devpod.sh/assets/webstorm.svg",
},
{
Name: config.IDEDataSpell,
DisplayName: "DataSpell",
Options: jetbrains.DataSpellOptions,
Icon: "https://devpod.sh/assets/dataspell.svg",
},
{
Name: config.IDEFleet,
DisplayName: "Fleet",
Expand Down
39 changes: 39 additions & 0 deletions pkg/ide/jetbrains/dataspell.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package jetbrains

import (
"github.com/loft-sh/devpod/pkg/config"
"github.com/loft-sh/devpod/pkg/ide"
"github.com/loft-sh/log"
)

const (
DataSpellProductCode = "DS"
DataSpellDownloadAmd64Template = "https://download.jetbrains.com/ds/dataspell-%s.tar.gz"
DataSpellDownloadArm64Template = "https://download.jetbrains.com/ds/dataspell-%s-aarch64.tar.gz"
)

var DataSpellOptions = ide.Options{
VersionOption: {
Name: VersionOption,
Description: "The version for the binary",
Default: "latest",
},
DownloadArm64Option: {
Name: DownloadArm64Option,
Description: "The download url for the arm64 server binary",
},
DownloadAmd64Option: {
Name: DownloadAmd64Option,
Description: "The download url for the amd64 server binary",
},
}

func NewDataSpellServer(userName string, values map[string]config.OptionValue, log log.Logger) *GenericJetBrainsServer {
amd64Download, arm64Download := getDownloadURLs(DataSpellOptions, values, DataSpellProductCode, DataSpellDownloadAmd64Template, DataSpellDownloadArm64Template)
return newGenericServer(userName, &GenericOptions{
ID: "dataspell",
DisplayName: "DataSpell",
DownloadAmd64: amd64Download,
DownloadArm64: arm64Download,
}, log)
}
Loading