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

Drop sandbox classic from the SDK tarball #12410

Merged
merged 1 commit into from
Jan 17, 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
3 changes: 1 addition & 2 deletions daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ commandParser = subparser $ fold
(long name <> metavar "PORT_NUM" <> help desc))

sandboxChoiceOpt =
flag' SandboxClassic (long "sandbox-classic" <> help "Deprecated. Run with Sandbox Classic.")
<|> flag' SandboxKV (long "sandbox-kv" <> help "Deprecated. Run with Sandbox KV.")
flag' SandboxKV (long "sandbox-kv" <> help "Deprecated. Run with Sandbox KV.")
<|> flag' SandboxCanton (long "sandbox-canton" <> help "Run with Canton Sandbox. The 2.0 default.")
<*> sandboxCantonPortSpecOpt

Expand Down
4 changes: 1 addition & 3 deletions daml-assistant/daml-helper/src/DA/Daml/Helper/Start.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ determineCantonOptions ledgerApiSpec SandboxCantonPortSpec{..} portFile = do
withSandbox :: StartOptions -> FilePath -> [String] -> [String] -> (Process () () () -> SandboxPort -> IO a) -> IO a
withSandbox StartOptions{..} darPath scenarioArgs sandboxArgs kont =
case sandboxChoice of
SandboxClassic -> oldSandbox "sandbox-classic"
SandboxKV -> oldSandbox "sandbox-kv"
SandboxCanton cantonPortSpec -> cantonSandbox cantonPortSpec

Expand Down Expand Up @@ -188,8 +187,7 @@ data StartOptions = StartOptions
}

data SandboxChoice
= SandboxClassic
| SandboxKV
= SandboxKV
| SandboxCanton !SandboxCantonPortSpec

data SandboxCantonPortSpec = SandboxCantonPortSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.daml.lf.engine.trigger.{ServiceMain => TriggerService}
import com.daml.auth.middleware.oauth2.{Main => Oauth2Middleware}
import com.daml.http.{Main => JsonApi}
import com.daml.navigator.{NavigatorBackend => Navigator}
import com.daml.platform.sandbox.{SandboxMain => SandboxClassic}
import com.daml.platform.sandboxnext.{Main => SandboxKV}
import com.daml.script.export.{Main => Export}

Expand All @@ -29,7 +28,6 @@ object SdkMain {
case "oauth2-middleware" => Oauth2Middleware.main(rest)
case "navigator" => Navigator.main(rest)
case "sandbox-kv" => SandboxKV.main(rest)
case "sandbox-classic" => SandboxClassic.main(rest)
case _ => sys.exit(1)
}
}
Expand Down
1 change: 0 additions & 1 deletion daml-assistant/daml-sdk/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def deps(edition):
"//language-support/codegen-main:codegen-main-lib",
"//ledger-service/http-json:http-json-{}".format(edition),
"//ledger/sandbox:sandbox-{}".format(edition),
"//ledger/sandbox-classic:sandbox-classic-{}".format(edition),
"//navigator/backend:navigator-library",
"//daml-script/export",
"//triggers/runner:trigger-runner-lib",
Expand Down
4 changes: 2 additions & 2 deletions daml-assistant/daml-sdk/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ JAVA=$(rlocation "$TEST_WORKSPACE/$1")
SDK_CE=$(rlocation "$TEST_WORKSPACE/$2")
SDK_EE=$(rlocation "$TEST_WORKSPACE/$3")

for cmd in sandbox-kv sandbox-classic; do
for cmd in sandbox-kv; do
ret=0
$JAVA -jar $SDK_CE $cmd --help | grep -q profile-dir || ret=$?
if [[ $ret -eq 0 ]]; then
Expand All @@ -28,7 +28,7 @@ for cmd in sandbox-kv sandbox-classic; do
fi
done

for cmd in sandbox-kv sandbox-classic; do
for cmd in sandbox-kv; do
$JAVA -jar $SDK_EE $cmd --help | grep -q profile-dir
done

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module DA.Daml.Assistant.IntegrationTests (main) where
import Conduit hiding (connect)
import Control.Concurrent
import Control.Concurrent.STM
import Control.Exception.Extra
import Control.Lens
import Control.Monad
import Control.Monad.Loops (untilM_)
Expand Down Expand Up @@ -660,20 +659,6 @@ quickstartTests quickstartDir mvnDir getSandbox =
Tar.Conduit.Extra.untar (Tar.Conduit.Extra.restoreFile throwError mvnDir)
callCommandSilentIn quickstartDir "daml codegen java"
callCommandSilentIn quickstartDir $ unwords ["mvn", mvnRepoFlag, "-q", "compile"]
subtest "Sandbox Classic startup" $ do
p :: Int <- fromIntegral <$> getFreePort
withDamlServiceIn quickstartDir "sandbox-classic"
[ "--wall-clock-time"
, "--port"
, show p
, ".daml/dist/quickstart-0.0.1.dar"
] $ \ ph -> do
waitForConnectionOnPort 240 ph (threadDelay 500000) p
addr:_ <- getAddrInfo (Just socketHints) (Just "127.0.0.1") (Just $ show p)
bracket
(socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr))
close
(\s -> connect s (addrAddress addr))
subtest "mvn exec:java@run-quickstart" $ do
QuickSandboxResource {quickProjDir, quickSandboxPort, quickDar} <- getSandbox
withDevNull $ \devNull -> do
Expand Down
4 changes: 0 additions & 4 deletions release/sdk-config.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ commands:
path: daml-helper/daml-helper
desc: "Deprecated. Launch Sandbox KV (the default Sandbox implementation for SDK < 2.0.0)"
args: ["run-jar", "--logback-config=sandbox-logback.xml", "daml-sdk/daml-sdk.jar", "sandbox-kv"]
- name: sandbox-classic
path: daml-helper/daml-helper
desc: "Deprecated. Launch Sandbox Classic (the default Sandbox implementation for SDK <= 0.13.55)"
args: ["run-jar", "--logback-config=sandbox-logback.xml", "daml-sdk/daml-sdk.jar", "sandbox-classic"]
- name: navigator
path: daml-helper/daml-helper
desc: "Launch the Navigator"
Expand Down