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

Remove ScalarDB Server #2050

Merged
merged 5 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
45 changes: 0 additions & 45 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ jobs:
if: always()
run: |
mkdir -p /tmp/gradle_test_reports/core
mkdir -p /tmp/gradle_test_reports/server
mkdir -p /tmp/gradle_test_reports/schema-loader
cp -a core/build/reports/tests/test /tmp/gradle_test_reports/core/
cp -a server/build/reports/tests/test /tmp/gradle_test_reports/server/
cp -a schema-loader/build/reports/tests/test /tmp/gradle_test_reports/schema-loader/

- name: Upload Gradle test reports
Expand All @@ -73,11 +71,9 @@ jobs:
if: always()
run: |
mkdir -p /tmp/gradle_spotbugs_reports/core
mkdir -p /tmp/gradle_spotbugs_reports/server
mkdir -p /tmp/gradle_spotbugs_reports/schema-loader
mkdir -p /tmp/gradle_spotbugs_reports/integration-test
cp -a core/build/reports/spotbugs /tmp/gradle_spotbugs_reports/core/
cp -a server/build/reports/spotbugs /tmp/gradle_spotbugs_reports/server/
cp -a schema-loader/build/reports/spotbugs /tmp/gradle_spotbugs_reports/schema-loader/
cp -a integration-test/build/reports/spotbugs /tmp/gradle_spotbugs_reports/integration-test/

Expand All @@ -101,11 +97,6 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_VENDOR }}

- name: Dockerfile Lint for ScalarDB Server
uses: gradle/gradle-build-action@v3
with:
arguments: ':server:dockerfileLint'

- name: Dockerfile Lint for ScalarDB Schema Loader
if: always()
uses: gradle/gradle-build-action@v3
Expand Down Expand Up @@ -1250,39 +1241,3 @@ jobs:
with:
name: multi_storage_integration_test_reports_${{ matrix.mode.label }}
path: core/build/reports/tests/integrationTestMultiStorage

integration-test-for-scalardb-server:
name: ScalarDB Server integration test
runs-on: ubuntu-latest

steps:
- name: Run MySQL 8
run: |
docker run -e MYSQL_ROOT_PASSWORD=mysql -p 3306:3306 -d mysql:8 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin

- uses: actions/checkout@v4

- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_VENDOR }}

- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test
uses: actions/setup-java@v4
if: ${{ !(env.INT_TEST_JAVA_RUNTIME_VERSION == env.JAVA_VERSION && env.INT_TEST_JAVA_RUNTIME_VENDOR == env.JAVA_VENDOR) }}
with:
java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}
distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}

- name: Setup and execute Gradle 'integrationTestScalarDbServer' task
uses: gradle/gradle-build-action@v3
with:
arguments: integrationTestScalarDbServer -PjavaVersion=${{ env.JAVA_VERSION }} -PjavaVendor=${{ env.JAVA_VENDOR }} -PintegrationTestJavaRuntimeVersion=${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} -PintegrationTestJavaRuntimeVendor=${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}

- name: Upload Gradle test reports
uses: actions/upload-artifact@v4
if : always()
with:
name: scalardb_server_integration_test_reports
path: server/build/reports/tests/integrationTestScalarDbServer
13 changes: 0 additions & 13 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ jobs:
- name: Checkout the current repository
uses: actions/checkout@v4

- name: Build scalardb-server zip
run: ./gradlew :server:distZip

- name: Upload scalardb-server zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_PROJECT_ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: server/build/distributions/scalardb-server-${{ steps.version.outputs.version }}.zip
asset_name: scalardb-server-${{ steps.version.outputs.version }}.zip
asset_content_type: application/zip

- name: Build scalardb-schema-loader jar
run: ./gradlew :schema-loader:shadowJar

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
VERSION=$(./gradlew :core:properties -q | grep "version:" | awk '{print $2}')
echo "version=${VERSION}" >> $GITHUB_OUTPUT

- name: Upload SNAPSHOT versions for scalardb, scalardb-server, scalardb-rpc, scalardb-schema-loader, and scalardb-integration-test to Maven Snapshot Repository
- name: Upload SNAPSHOT versions for scalardb, scalardb-schema-loader, and scalardb-integration-test to Maven Snapshot Repository
if: contains(steps.version.outputs.version, '-SNAPSHOT')
run: |
echo "${{secrets.SIGNING_SECRET_KEY_RING}}" | base64 -d > ~/.gradle/secring.gpg
Expand All @@ -61,5 +61,4 @@ jobs:
- name: Push SNAPSHOT containers
if: contains(steps.version.outputs.version, '-SNAPSHOT')
run: |
docker push ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }}
docker push ghcr.io/scalar-labs/scalardb-schema-loader:${{ steps.version.outputs.version }}
5 changes: 0 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
uses: ./.github/workflows/upload-artifacts.yaml
secrets:
CR_PAT: ${{ secrets.CR_PAT }}
ACR_LOGIN_SERVER: ${{ secrets.ACR_LOGIN_SERVER }}
ACR_USER: ${{ secrets.ACR_USER }}
ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }}
AWS_MARKETPLACE_ROLE_OIDC: ${{ secrets.AWS_MARKETPLACE_ROLE_OIDC }}
AWS_MARKETPLACE_ECR_ID: ${{ secrets.AWS_MARKETPLACE_ECR_ID }}
SIGNING_SECRET_KEY_RING: ${{ secrets.SIGNING_SECRET_KEY_RING }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/remove-untagged-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: scalardb-server
uses: camargo/delete-untagged-action@v1
with:
github-token: ${{ secrets.CR_PAT }}
package-name: scalardb-server

- name: scalardb-schema-loader
uses: camargo/delete-untagged-action@v1
with:
Expand Down
51 changes: 1 addition & 50 deletions .github/workflows/upload-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ on:
secrets:
CR_PAT:
required: true
ACR_LOGIN_SERVER:
required: true
ACR_USER:
required: true
ACR_PASSWORD:
required: true
AWS_MARKETPLACE_ROLE_OIDC:
required: true
AWS_MARKETPLACE_ECR_ID:
required: true
SIGNING_SECRET_KEY_RING:
required: true
SIGNING_KEY_ID:
Expand Down Expand Up @@ -67,53 +57,14 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Login to Azure Container Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.ACR_LOGIN_SERVER }}
username: ${{ secrets.ACR_USER }}
password: ${{ secrets.ACR_PASSWORD }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_MARKETPLACE_ROLE_OIDC }}
aws-region: us-east-1

- name: Login to Amazon Elastic Container Registry
uses: aws-actions/amazon-ecr-login@v2
with:
registries: ${{ secrets.AWS_MARKETPLACE_ECR_ID }}

- name: Create containers
run: ./gradlew docker

- name: Push containers
run: |
docker push ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }}
docker push ghcr.io/scalar-labs/scalardb-schema-loader:${{ steps.version.outputs.version }}

- name: Push containers to Azure Container Registry
run: |
docker tag ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }} ${{ secrets.ACR_LOGIN_SERVER }}/scalardb-server:${{ steps.version.outputs.version }}
docker tag ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }} ${{ secrets.ACR_LOGIN_SERVER }}/scalardb-server:${{ steps.version.outputs.minor_version }}
docker push ${{ secrets.ACR_LOGIN_SERVER }}/scalardb-server:${{ steps.version.outputs.version }}
docker push ${{ secrets.ACR_LOGIN_SERVER }}/scalardb-server:${{ steps.version.outputs.minor_version }}

# Push the latest tag image since it is required from the perspective of the specification of Azure Marketplace.
- name: Push latest tag to Azure Container Registry
if: ${{ steps.version.outputs.version == steps.version.outputs.latest_version }}
run: |
docker tag ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }} ${{ secrets.ACR_LOGIN_SERVER }}/scalardb-server:latest
docker push ${{ secrets.ACR_LOGIN_SERVER }}/scalardb-server:latest

# Push the patch version image only since AWS Marketplace restricts using the latest tag.
- name: Push containers to Amazon Elastic Container Registry
run: |
docker tag ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }} ${{ secrets.AWS_MARKETPLACE_ECR_ID }}.dkr.ecr.us-east-1.amazonaws.com/scalar/scalardb-server:${{ steps.version.outputs.version }}
docker push ${{ secrets.AWS_MARKETPLACE_ECR_ID }}.dkr.ecr.us-east-1.amazonaws.com/scalar/scalardb-server:${{ steps.version.outputs.version }}

- name: Upload scalardb, scalardb-server, scalardb-rpc, scalardb-schema-loader, and scalardb-integration-test to Maven Central Repository
- name: Upload scalardb, scalardb-schema-loader, and scalardb-integration-test to Maven Central Repository
run: |
echo "${{secrets.SIGNING_SECRET_KEY_RING}}" | base64 -d > ~/.gradle/secring.gpg
./gradlew publish \
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/vuln-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,37 +86,6 @@ jobs:
VERSION=$(./gradlew :core:properties -q | grep "version:" | awk '{print $2}')
echo "version=${VERSION}" >> $GITHUB_OUTPUT

- name: Run Trivy vulnerability scanner for ScalarDB Server
if: always()
uses: aquasecurity/trivy-action@master
with:
image-ref: ghcr.io/scalar-labs/scalardb-server:${{ steps.version.outputs.version }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
timeout: '60m'

- name: Post Trivy vulnerability check failure for ScalarDB Server to Slack
if: failure()
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":octagonal_sign: The vulnerability check for ScalarDB Server on `${{ github.repository }}` <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|failed> with `${{ steps.prepare-target-ref.outputs.target-ref }}`"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SECURITY_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

- name: Run Trivy vulnerability scanner for ScalarDB Schema Loader
if: always()
uses: aquasecurity/trivy-action@master
Expand Down Expand Up @@ -147,4 +116,3 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SECURITY_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ To add a dependency using Maven:
* Javadoc
* [scalardb](https://javadoc.io/doc/com.scalar-labs/scalardb/latest/index.html) - ScalarDB: A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases
* [scalardb-rpc](https://javadoc.io/doc/com.scalar-labs/scalardb-rpc/latest/index.html) - ScalarDB RPC libraries
* [scalardb-server](https://javadoc.io/doc/com.scalar-labs/scalardb-server/latest/index.html) - ScalarDB Server: A gRPC interface of ScalarDB
* [scalardb-schema-loader](https://javadoc.io/doc/com.scalar-labs/scalardb-schema-loader/latest/index.html) - ScalarDB Schema Loader: A tool for schema creation and schema deletion in ScalarDB
* [Jepsen tests](https://github.com/scalar-labs/scalar-jepsen)
* [TLA+](tla+/consensus-commit/README.md)
Expand Down
9 changes: 0 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,8 @@ subprojects {
sqlserverDriverVersion = '11.2.3.jre8'
sqliteDriverVersion = '3.46.0.0'
yugabyteDriverVersion = '42.3.5-yb-5'
grpcVersion = '1.60.0'
protobufVersion = '3.21.12'
annotationVersion = '1.3.2'
picocliVersion = '4.7.6'
scalarAdminVersion = '2.2.0'
dropwizardMetricsVersion = '4.2.26'
prometheusVersion = '0.16.0'
commonsTextVersion = '1.12.0'
jettyVersion = '9.4.54.v20240208'
junitVersion = '5.10.3'
commonsLangVersion = '3.14.0'
assertjVersion = '3.26.0'
Expand All @@ -52,11 +45,9 @@ subprojects {
errorproneVersion = '2.10.0'
errorproneJavacVersion = '9+181-r4173-1'
gsonVersion = '2.11.0'
log4jVersion = '2.23.1'
stefanbirknerSystemLambdaVersion = '1.2.1'
spotbugsPluginVersion = '5.2.5'
errorpronePluginVersion = '3.1.0'
protobufPluginVersion = '0.8.19'
shadowPluginVersion = '7.1.2'
// Make JDK11+ use the same version as JDK8 uses
googleJavaFormatVersion = '1.7'
Expand Down
1 change: 0 additions & 1 deletion conf/database.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ scalar.db.password=cassandra
#scalar.db.consensus_commit.serializable_strategy=

# The given namespace name will be used by operations that do not already specify a namespace.
# If you would like to use this setting with ScalarDB server, it needs to be set on the client-side configuration.
# By default, no default namespace name is set on operations.
#scalar.db.default_namespace_name=<a_namespace_name>

1 change: 0 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ configurations {
}

dependencies {
implementation project(':rpc')
implementation "com.google.guava:guava:${guavaVersion}"
implementation "com.google.inject:guice:${guiceVersion}"
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
Expand Down
6 changes: 0 additions & 6 deletions core/src/main/java/com/scalar/db/service/StorageModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import com.scalar.db.storage.jdbc.JdbcDatabase;
import com.scalar.db.storage.multistorage.MultiStorage;
import com.scalar.db.storage.multistorage.MultiStorageAdmin;
import com.scalar.db.storage.rpc.GrpcAdmin;
import com.scalar.db.storage.rpc.GrpcStorage;

/** @deprecated As of release 3.6.0. Will be removed in release 5.0.0 */
@Deprecated
Expand Down Expand Up @@ -54,10 +52,6 @@ protected void configure() {
storageClass = MultiStorage.class;
storageAdminClass = MultiStorageAdmin.class;
break;
case "grpc":
storageClass = GrpcStorage.class;
storageAdminClass = GrpcAdmin.class;
break;
default:
throw new IllegalArgumentException("Storage '" + config.getStorage() + "' isn't supported");
}
Expand Down
14 changes: 0 additions & 14 deletions core/src/main/java/com/scalar/db/service/TransactionModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,11 @@
import com.scalar.db.storage.jdbc.JdbcDatabase;
import com.scalar.db.storage.multistorage.MultiStorage;
import com.scalar.db.storage.multistorage.MultiStorageAdmin;
import com.scalar.db.storage.rpc.GrpcAdmin;
import com.scalar.db.storage.rpc.GrpcStorage;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitAdmin;
import com.scalar.db.transaction.consensuscommit.ConsensusCommitManager;
import com.scalar.db.transaction.consensuscommit.TwoPhaseConsensusCommitManager;
import com.scalar.db.transaction.jdbc.JdbcTransactionAdmin;
import com.scalar.db.transaction.jdbc.JdbcTransactionManager;
import com.scalar.db.transaction.rpc.GrpcTransactionAdmin;
import com.scalar.db.transaction.rpc.GrpcTransactionManager;
import com.scalar.db.transaction.rpc.GrpcTwoPhaseCommitTransactionManager;

/** @deprecated As of release 3.6.0. Will be removed in release 5.0.0 */
@Deprecated
Expand Down Expand Up @@ -65,10 +60,6 @@ protected void configure() {
storageClass = MultiStorage.class;
storageAdminClass = MultiStorageAdmin.class;
break;
case "grpc":
storageClass = GrpcStorage.class;
storageAdminClass = GrpcAdmin.class;
break;
default:
throw new IllegalArgumentException("Storage '" + config.getStorage() + "' isn't supported");
}
Expand All @@ -90,11 +81,6 @@ protected void configure() {
transactionAdminClass = JdbcTransactionAdmin.class;
twoPhaseCommitTransactionManagerClass = null;
break;
case "grpc":
transactionManagerClass = GrpcTransactionManager.class;
transactionAdminClass = GrpcTransactionAdmin.class;
twoPhaseCommitTransactionManagerClass = GrpcTwoPhaseCommitTransactionManager.class;
break;
default:
throw new IllegalArgumentException(
"Transaction manager '" + config.getTransactionManager() + "' isn't supported");
Expand Down
Loading
Loading