From c3d6cceeb703afc7f3967b0025cfc6ff94a61c0c Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Thu, 13 Jan 2022 18:16:41 +0100 Subject: [PATCH] Drop sandbox classic from the SDK tarball :fire: changelog_begin changelog_end --- .../daml-helper/src/DA/Daml/Helper/Main.hs | 3 +-- .../daml-helper/src/DA/Daml/Helper/Start.hs | 4 +--- .../scala/com/digitalasset/daml/sdk/SdkMain.scala | 2 -- daml-assistant/daml-sdk/util.bzl | 1 - daml-assistant/daml-sdk/validate.sh | 4 ++-- .../src/DA/Daml/Assistant/IntegrationTests.hs | 15 --------------- release/sdk-config.yaml.tmpl | 4 ---- 7 files changed, 4 insertions(+), 29 deletions(-) diff --git a/daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs b/daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs index 17079ff1429e..5e9f1aba6ce1 100644 --- a/daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs +++ b/daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs @@ -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 diff --git a/daml-assistant/daml-helper/src/DA/Daml/Helper/Start.hs b/daml-assistant/daml-helper/src/DA/Daml/Helper/Start.hs index 8b7f8b1777f2..0605af81849e 100644 --- a/daml-assistant/daml-helper/src/DA/Daml/Helper/Start.hs +++ b/daml-assistant/daml-helper/src/DA/Daml/Helper/Start.hs @@ -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 @@ -188,8 +187,7 @@ data StartOptions = StartOptions } data SandboxChoice - = SandboxClassic - | SandboxKV + = SandboxKV | SandboxCanton !SandboxCantonPortSpec data SandboxCantonPortSpec = SandboxCantonPortSpec diff --git a/daml-assistant/daml-sdk/src/main/scala/com/digitalasset/daml/sdk/SdkMain.scala b/daml-assistant/daml-sdk/src/main/scala/com/digitalasset/daml/sdk/SdkMain.scala index 09d1604ff102..9f9006da7f88 100644 --- a/daml-assistant/daml-sdk/src/main/scala/com/digitalasset/daml/sdk/SdkMain.scala +++ b/daml-assistant/daml-sdk/src/main/scala/com/digitalasset/daml/sdk/SdkMain.scala @@ -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} @@ -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) } } diff --git a/daml-assistant/daml-sdk/util.bzl b/daml-assistant/daml-sdk/util.bzl index ae9e17abdd99..901bbe95c585 100644 --- a/daml-assistant/daml-sdk/util.bzl +++ b/daml-assistant/daml-sdk/util.bzl @@ -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", diff --git a/daml-assistant/daml-sdk/validate.sh b/daml-assistant/daml-sdk/validate.sh index 18c5e767853d..51a0d480758b 100755 --- a/daml-assistant/daml-sdk/validate.sh +++ b/daml-assistant/daml-sdk/validate.sh @@ -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 @@ -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 diff --git a/daml-assistant/integration-tests/src/DA/Daml/Assistant/IntegrationTests.hs b/daml-assistant/integration-tests/src/DA/Daml/Assistant/IntegrationTests.hs index 6d7d6d0a231c..991c0e28ef84 100644 --- a/daml-assistant/integration-tests/src/DA/Daml/Assistant/IntegrationTests.hs +++ b/daml-assistant/integration-tests/src/DA/Daml/Assistant/IntegrationTests.hs @@ -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_) @@ -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 diff --git a/release/sdk-config.yaml.tmpl b/release/sdk-config.yaml.tmpl index d85ee470e5ca..46542b0b7b9d 100644 --- a/release/sdk-config.yaml.tmpl +++ b/release/sdk-config.yaml.tmpl @@ -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"