Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
kenstott committed Sep 30, 2024
2 parents f5272da + 0b86832 commit ab975d5
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: docker/build-push-action@v5
with:
context: .
tags: ghcr.io/hasura/meta_connector:latest
tags: ghcr.io/hasura/ndc-calcite:latest
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ target/
/adapters/hive/hadoop_data/

/test-connector/
/adapters/file/data/files/2022CbpOceanEconomyTable__2022CbpIaOceanEconomy.json
/adapters/file/data/files/2022CbpOceanEconomyTable__Notes.json
/grafana/tempo-data/*

adapters/file/data/files/2022CbpOceanEconomyTable__2022CbpIaOceanEconomy.json
adapters/file/data/files/2022CbpOceanEconomyTable__Notes.json
10 changes: 5 additions & 5 deletions adapters/cassandra/configuration.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "5",
"$schema": "schema.json",
"model_file_path": "/Users/kennethstott/Documents/GitHub/calcite-connector/adapters/cassandra/model.json",
"fixes": true
}
"version": "5",
"$schema": "schema.json",
"model_file_path": "/etc/connector/model.json",
"fixes": true
}
2 changes: 1 addition & 1 deletion adapters/jdbc/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cd ../..
docker build --platform linux/arm64,linux/amd64 . -t ghcr.io/hasura/meta_connector:latest
docker build --platform linux/arm64,linux/amd64 . -t ghcr.io/hasura/ndc-calcite:latest
2 changes: 1 addition & 1 deletion adapters/jdbc/dev.docker-compose.calcite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
build:
context: .
dockerfile_inline: |-
FROM meta_connector:latest
FROM ndc-calcite:latest
COPY ./ /etc/connector
develop:
watch:
Expand Down
2 changes: 1 addition & 1 deletion adapters/jdbc/docker-compose.calcite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
build:
context: .
dockerfile_inline: |-
FROM meta_connector:latest
FROM ndc-calcite:latest
COPY ./ /etc/connector
develop:
watch:
Expand Down
8 changes: 4 additions & 4 deletions build-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ cd ../..
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/repos/hasura/ndc-calcite/releases/latest)
#TAG=$(echo "$release_info" | grep 'tag_name' | awk -F':' '{print $2}' | tr -d ' "",')
docker build . --platform linux/arm64 -t ghcr.io/hasura/meta_connector:latest
docker build . --platform linux/arm64 -t ghcr.io/hasura/ndc-calcite:latest
#docker buildx build --platform linux/arm64 --output type=oci,dest=./image.tar .
#docker tag ghcr.io/hasura/meta_connector:latest ghcr.io/hasura/meta_connector:"$TAG"
#docker push ghcr.io/hasura/meta_connector:latest
#docker push ghcr.io/hasura/meta_connector:"$TAG"
#docker tag ghcr.io/hasura/ndc-calcite:latest ghcr.io/hasura/ndc-calcite:"$TAG"
#docker push ghcr.io/hasura/ndc-calcite:latest
#docker push ghcr.io/hasura/ndc-calcite:"$TAG"

cd calcite-rs-jni/calcite
./gradlew assemble
Expand Down
11 changes: 6 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mvn clean
cd calcite
./gradlew clean

create a tag name from the last connector release
# create a tag name from the last connector release
cd ../..
release_info=$(curl -L \
-H "Accept: application/vnd.github+json" \
Expand All @@ -14,10 +14,11 @@ release_info=$(curl -L \
TAG=$(echo "$release_info" | grep 'tag_name' | awk -F':' '{print $2}' | tr -d ' "",')

# build arm & amd versions
docker build . --no-cache --platform linux/arm64,linux/amd64 -t ghcr.io/hasura/meta_connector:latest
# docker build . --no-cache --platform linux/arm64,linux/amd64 -t ghcr.io/hasura/ndc-calcite:latest
docker build . --no-cache -t ghcr.io/hasura/ndc-calcite:latest
#docker buildx build --platform linux/arm64 --output type=oci,dest=./image.tar .
docker tag ghcr.io/hasura/meta_connector:"$TAG"
docker tag ghcr.io/hasura/ndc-calcite:"$TAG"

# push to docker hub
docker push ghcr.io/hasura/meta_connector:latest
docker push ghcr.io/hasura/meta_connector:"$TAG"
docker push ghcr.io/hasura/ndc-calcite:latest
docker push ghcr.io/hasura/ndc-calcite:"$TAG"
2 changes: 1 addition & 1 deletion calcite-rs-jni/calcite
Submodule calcite updated 2 files
+1 −1 core/build.gradle.kts
+0 −143 pom.xml
2 changes: 1 addition & 1 deletion cli-update-model.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH="$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")"
docker run --entrypoint ndc-calcite-cli "OTEL_LOGS_EXPORTER=console" -e "OTEL_TRACES_EXPORTER=console" -e "OTEL_METRICS_EXPORTER=console" -e "RUST_LOG=debug" -e "LOG_LEVEL=all" -e HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/app/output -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/etc/connector:ro ghcr.io/hasura/meta_connector:latest update
docker run --entrypoint ndc-calcite-cli "OTEL_LOGS_EXPORTER=console" -e "OTEL_TRACES_EXPORTER=console" -e "OTEL_METRICS_EXPORTER=console" -e "RUST_LOG=debug" -e "LOG_LEVEL=all" -e HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/app/output -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/etc/connector:ro ghcr.io/hasura/ndc-calcite:latest update
4 changes: 2 additions & 2 deletions cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo $HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH
mkdir -p $HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH
#rm -rf ${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}
#mkdir -p ${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}
docker run --entrypoint ndc-calcite-cli -e "OTEL_LOG_LEVEL=trace" -e "OTEL_LOGS_EXPORTER=console" -e "OTEL_TRACES_EXPORTER=console" -e "RUST_LOG=debug" -e "LOG_LEVEL=all" -e HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/app/output -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/etc/connector:ro ghcr.io/hasura/meta_connector:latest update
docker run --entrypoint ndc-calcite-cli -e "OTEL_LOG_LEVEL=trace" -e "OTEL_LOGS_EXPORTER=console" -e "OTEL_TRACES_EXPORTER=console" -e "RUST_LOG=debug" -e "LOG_LEVEL=all" -e HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/app/output -v "${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}":/etc/connector:ro ghcr.io/hasura/ndc-calcite:latest update

echo "include:\n - path: ${filepath}/compose.yaml" > temp.yml
echo "$content" >> temp.yml
Expand All @@ -33,7 +33,7 @@ services:
build:
context: .
dockerfile_inline: |-
FROM ghcr.io/hasura/meta_connector:latest
FROM ghcr.io/hasura/ndc-calcite:latest
COPY ./ /etc/connector
develop:
watch:
Expand Down
2 changes: 1 addition & 1 deletion cmd.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export LOCAL_PATH=$(PWD)/test3/app/connector/calcite
docker run -it --entrypoint /bin/bash -e "OTEL_LOG_LEVEL=trace" -e "OTEL_LOGS_EXPORTER=console" -e "OTEL_TRACES_EXPORTER=console" -e "RUST_LOG=debug" -e "LOG_LEVEL=all" -e "HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH=${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}" -v ${LOCAL_PATH}:/etc/connector ghcr.io/hasura/meta_connector:latest
docker run -it --entrypoint /bin/bash -e "OTEL_LOG_LEVEL=trace" -e "OTEL_LOGS_EXPORTER=console" -e "OTEL_TRACES_EXPORTER=console" -e "RUST_LOG=debug" -e "LOG_LEVEL=all" -e "HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH=${HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH}" -v ${LOCAL_PATH}:/etc/connector ghcr.io/hasura/ndc-calcite:latest
2 changes: 1 addition & 1 deletion crates/values/src/values.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub const DEV_CONFIG_FILE_NAME: &str = "dev.local.configuration.json";
pub const CONFIGURATION_FILENAME: &str = "configuration.json";
pub const CONFIGURATION_JSONSCHEMA_FILENAME: &str = "schema.json";
pub const DOCKER_IMAGE_NAME: &str = "ghcr.io/hasura/meta_connector";
pub const DOCKER_IMAGE_NAME: &str = "ghcr.io/hasura/ndc-calcite";
pub const DOCKER_CONNECTOR_DIR: &str = "/etc/connector";

pub const DOCKER_CONNECTOR_RW: &str = "/app/output";
Expand Down

0 comments on commit ab975d5

Please sign in to comment.