Skip to content

Commit

Permalink
Remove storage server implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Dumas committed Sep 17, 2024
1 parent 30b6ef7 commit a23e3d8
Show file tree
Hide file tree
Showing 76 changed files with 6 additions and 5,760 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci-delta-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
paths:
- 'delta/**'
- 'ship/**'
- 'storage/**'
- 'build.sbt'
- 'project/**'
- '.github/workflows/ci-delta-static-analysis.yml'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
pull_request:
paths:
- 'delta/**'
- 'storage/**'
- 'tests/**'
- 'build.sbt'
- 'project/**'
Expand All @@ -26,12 +25,11 @@ jobs:
java-version: '21'
cache: 'sbt'
check-latest: true
- name: Clean, build Delta & Storage images
- name: Clean, build Delta image
run: |
sbt -Dsbt.color=always -Dsbt.supershell=false \
clean \
app/Docker/publishLocal \
storage/Docker/publishLocal
app/Docker/publishLocal
- name: Start services
run: docker compose -f tests/docker/docker-compose.yml up -d
- name: Waiting for Delta to start
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci-release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ jobs:
echo ${{ secrets.DOCKER_PASS }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
sbt -Dsbt.color=always -Dsbt.supershell=false \
app/Docker/publish \
storage/Docker/publish \
ship/Docker/publish
2 changes: 0 additions & 2 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
paths:
- 'cli/**'
- 'delta/**'
- 'storage/**'
- 'build.sbt'
- 'project/**'
- 'ship/**'
Expand Down Expand Up @@ -47,5 +46,4 @@ jobs:
echo ${{ secrets.DOCKER_PASS }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
sbt -Dsbt.color=always -Dsbt.supershell=false \
app/Docker/publish \
storage/Docker/publish \
ship/Docker/publish
45 changes: 0 additions & 45 deletions .github/workflows/ci-storage.yml

This file was deleted.

99 changes: 2 additions & 97 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ val akkaHttpCirceVersion = "1.39.2"
val akkaCorsVersion = "1.2.0"
val akkaVersion = "2.6.21"
val alpakkaVersion = "3.0.4"
val apacheCompressVersion = "1.27.1"
val apacheIOVersion = "2.16.1"
val awsSdkVersion = "2.28.1"
val betterMonadicForVersion = "0.3.1"
val caffeineVersion = "3.1.8"
Expand Down Expand Up @@ -75,8 +73,6 @@ lazy val akkaTestKit = "com.typesafe.akka" %% "akka
lazy val akkaTestKitTyped = "com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion
lazy val alpakkaFile = "com.lightbend.akka" %% "akka-stream-alpakka-file" % alpakkaVersion
lazy val alpakkaSse = "com.lightbend.akka" %% "akka-stream-alpakka-sse" % alpakkaVersion
lazy val apacheCompress = "org.apache.commons" % "commons-compress" % apacheCompressVersion
lazy val apacheIO = "commons-io" % "commons-io" % apacheIOVersion
lazy val awsSdk = "software.amazon.awssdk" % "s3" % awsSdkVersion
lazy val betterMonadicFor = "com.olegpy" %% "better-monadic-for" % betterMonadicForVersion
lazy val caffeine = "com.github.ben-manes.caffeine" % "caffeine" % caffeineVersion
Expand Down Expand Up @@ -763,78 +759,6 @@ lazy val ship = project
Docker / packageName := "nexus-ship"
)

lazy val cargo = taskKey[(File, String)]("Run Cargo to build 'nexus-fixer'")

lazy val storage = project
.in(file("storage"))
.enablePlugins(UniversalPlugin, UniversalDeployPlugin, JavaAppPackaging, JavaAgent, DockerPlugin, BuildInfoPlugin)
.settings(
shared,
compilation,
assertJavaVersion,
kamonSettings,
storageAssemblySettings,
coverage,
release,
servicePackaging,
addArtifact(Artifact("delta-storage-app", "application"), assembly),
coverageMinimumStmtTotal := 75
)
.dependsOn(kernel, testkit % "test->compile")
.settings(cargo := {
import scala.sys.process._

val log = streams.value.log
val cmd = Process(Seq("cargo", "build", "--release"), baseDirectory.value / "permissions-fixer")
if (cmd.! == 0) {
log.success("Cargo build successful.")
(baseDirectory.value / "permissions-fixer" / "target" / "release" / "nexus-fixer") -> "bin/nexus-fixer"
} else {
log.error("Cargo build failed.")
throw new RuntimeException
}
})
.settings(
name := "storage",
moduleName := "storage",
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := "ch.epfl.bluebrain.nexus.storage.config",
Docker / packageName := "nexus-storage",
libraryDependencies ++= Seq(
apacheCompress,
apacheIO,
akkaHttp,
akkaHttpCirce,
akkaStream,
akkaSlf4j,
alpakkaFile,
catsCore,
catsEffect,
circeCore,
circeGenericExtras,
fs2io,
logback,
pureconfig,
akkaHttpTestKit % Test,
akkaTestKit % Test,
mockito % Test,
munit % Test,
munitCatsEffect % Test,
scalaTest % Test
),
addCompilerPlugin(betterMonadicFor),
cleanFiles ++= Seq(
baseDirectory.value / "permissions-fixer" / "target" / "**",
baseDirectory.value / "nexus-storage.jar"
),
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-o", "-u", "target/test-reports"),
Test / parallelExecution := false,
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.ScalaLibrary,
Universal / mappings := {
(Universal / mappings).value :+ cargo.value
}
)

lazy val tests = project
.in(file("tests"))
.dependsOn(testkit)
Expand Down Expand Up @@ -871,7 +795,7 @@ lazy val root = project
.in(file("."))
.settings(name := "nexus", moduleName := "nexus")
.settings(compilation, shared, noPublish)
.aggregate(docs, delta, ship, storage, tests)
.aggregate(docs, delta, ship, tests)

lazy val noPublish = Seq(
publish / skip := true,
Expand Down Expand Up @@ -920,23 +844,6 @@ lazy val kamonSettings = Seq(
javaAgents += kanelaAgent
)

lazy val storageAssemblySettings = Seq(
assembly / assemblyJarName := "nexus-storage.jar",
assembly / test := {},
assembly / assemblyMergeStrategy := {
case PathList("org", "apache", "commons", "logging", xs @ _*) => MergeStrategy.last
case PathList("org", "apache", "commons", "codec", xs @ _*) => MergeStrategy.last
case PathList("akka", "remote", "kamon", xs @ _*) => MergeStrategy.last
case PathList("kamon", "instrumentation", "akka", "remote", xs @ _*) => MergeStrategy.last
case PathList("javax", "annotation", xs @ _*) => MergeStrategy.first
case PathList("META-INF", "okio.kotlin_module") => MergeStrategy.first
case x if x.endsWith("module-info.class") => MergeStrategy.discard
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
)

lazy val discardModuleInfoAssemblySettings = Seq(
assembly / assemblyMergeStrategy := {
case x if x.contains("io.netty.versions.properties") => MergeStrategy.discard
Expand Down Expand Up @@ -1036,9 +943,7 @@ ThisBuild / licenses := Seq("Apache-2.0" -> url("http://www.
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/BlueBrain/nexus"), "scm:git:[email protected]:BlueBrain/nexus.git"))
ThisBuild / developers := List(
Developer("imsdu", "Simon Dumas", "[email protected]", url("https://bluebrain.epfl.ch/")),
Developer("olivergrabinski ", "Oliver Grabinski", "[email protected]", url("https://bluebrain.epfl.ch/")),
Developer("shinyhappydan", "Daniel Bell", "[email protected]", url("https://bluebrain.epfl.ch/")),
Developer("dantb", "Daniel Tattan-Birch", "[email protected]", url("https://bluebrain.epfl.ch/"))
Developer("shinyhappydan", "Daniel Bell", "[email protected]", url("https://bluebrain.epfl.ch/"))
)
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trait RemoteStorageClientFixtures extends BeforeAndAfterAll with ConfigFixtures
private val rwx = PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rwxrwxrwx"))
private val tmpFolder: Path = Files.createTempDirectory("root", rwx)

val storageVersion: String = "1.9.0"
val storageVersion: String = "1.10.0"

protected val container: RemoteStorageContainer =
new RemoteStorageContainer(storageVersion, tmpFolder)
Expand Down
15 changes: 0 additions & 15 deletions storage/permissions-fixer/Cargo.toml

This file was deleted.

11 changes: 0 additions & 11 deletions storage/permissions-fixer/Dockerfile

This file was deleted.

41 changes: 0 additions & 41 deletions storage/permissions-fixer/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions storage/permissions-fixer/build.rs

This file was deleted.

56 changes: 0 additions & 56 deletions storage/permissions-fixer/src/config.rs

This file was deleted.

Loading

0 comments on commit a23e3d8

Please sign in to comment.