Skip to content

Commit 6e2a5b7

Browse files
author
Xiaochong Wei
committed
Try fix
1 parent 48dff13 commit 6e2a5b7

File tree

5 files changed

+131
-57
lines changed

5 files changed

+131
-57
lines changed

.github/actions/yscope-image-build/action.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: "yscope-image-build"
22

33
inputs:
4+
build_args:
5+
default: |
6+
PRESTO_VERSION=0.293
7+
description: "The build args for building the image"
8+
required: false
9+
context_dir:
10+
default: "./"
11+
description: "Which directory we are in when building the image"
12+
required: false
413
dockerfile_path:
514
description: "Dockerfile relative path from the root of the project"
615
required: true
@@ -59,8 +68,11 @@ runs:
5968
- name: "Build and Push"
6069
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
6170
with:
62-
context: "./"
71+
context: ${{inputs.context_dir}}
6372
file: ${{inputs.dockerfile_path}}
6473
push: true
6574
tags: "${{steps.meta.outputs.tags}}"
6675
labels: "${{steps.meta.outputs.labels}}"
76+
build-args: |
77+
${{inputs.build_args}}
78+
JMX_PROMETHEUS_JAVAAGENT_VERSION=0.20.0
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: maven checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
env:
8+
# An envar that signals to tests we are executing in the CI environment
9+
CONTINUOUS_INTEGRATION: true
10+
MAVEN_OPTS: "-Xmx1024M -XX:+ExitOnOutOfMemoryError"
11+
MAVEN_INSTALL_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError"
12+
RETRY: .github/bin/retry
13+
14+
concurrency:
15+
group: "${{github.workflow}}-${{github.ref}}"
16+
17+
# Cancel in-progress jobs for efficiency. Exclude the `release-0.293-clp-connector` branch so
18+
# that each commit to release-0.293-clp-connector is checked completely.
19+
cancel-in-progress: "${{github.ref != 'refs/heads/release-0.293-clp-connector'}}"
20+
21+
jobs:
22+
maven-checks:
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
java: [ 8.0.442, 17.0.13 ]
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 45
29+
steps:
30+
- name: Free Disk Space
31+
run: |
32+
df -h
33+
sudo apt-get clean
34+
df -h
35+
- uses: actions/checkout@v4
36+
with:
37+
show-progress: false
38+
- uses: actions/setup-java@v4
39+
with:
40+
distribution: 'temurin'
41+
java-version: ${{ matrix.java }}
42+
cache: 'maven'
43+
- name: Download nodejs to maven cache
44+
run: .github/bin/download_nodejs
45+
- name: Maven Checks
46+
run: |
47+
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
48+
./mvnw install -B -V -T 1C -DskipTests -Dmaven.javadoc.skip=true --no-transfer-progress -P ci -pl '!presto-test-coverage,!:presto-docs'
49+
- name: Upload presto-server tarball
50+
if: matrix.java == '8.0.442'
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: presto-server
54+
path: presto-server/target/presto-server-0.293.tar.gz
55+
- name: Upload presto-cli executable
56+
if: matrix.java == '8.0.442'
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: presto-cli
60+
path: presto-cli/target/presto-cli-0.293-executable.jar
61+
- name: Clean Maven Output
62+
run: ./mvnw clean -pl '!:presto-server,!:presto-cli,!presto-test-coverage'
63+
64+
presto-coordinator-runtime-image:
65+
name: presto-coordinator-runtime-image
66+
needs: maven-checks
67+
runs-on: ubuntu-22.04
68+
if: ${{ always() && success() }}
69+
steps:
70+
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
71+
with:
72+
submodules: "recursive"
73+
74+
- name: "Login to Image Registry"
75+
uses: "docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772"
76+
with:
77+
registry: ghcr.io
78+
username: ${{github.actor}}
79+
password: ${{secrets.GITHUB_TOKEN}}
80+
81+
- name: Download presto-server
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: presto-server
85+
path: /tmp
86+
87+
- name: Download presto-cli
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: presto-cli
91+
path: /tmp
92+
93+
- name: "Run build.sh"
94+
working-directory: ./docker
95+
run: |
96+
mv /tmp/presto-server-0.293.tar.gz ./
97+
mv /tmp/presto-cli-0.293-executable.jar ./
98+
99+
docker buildx create --name container --driver docker-container --use
100+
101+
IMAGE_NAME=yscope-presto-with-clp-connector-coordinator \
102+
REG_ORG=ghcr.io/anlowee \
103+
PUBLISH=true \
104+
./build.sh 0.293
105+
106+
rm presto-server-0.293.tar.gz
107+
rm presto-cli-0.293-executable.jar

.github/workflows/presto-coordinator-runtime-image-build.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

docker/build.sh

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,19 @@ VERSION=$1; shift
1717
TAG="${TAG:-latest}"
1818
IMAGE_NAME="${IMAGE_NAME:-presto}"
1919
REG_ORG="${REG_ORG:-docker.io/prestodb}"
20-
PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64,linux/ppc64le}"
21-
TMP_IIDFILE=$(mktemp)
22-
IIDFILE="${IIDFILE:-$TMP_IIDFILE}"
2320
PUBLISH="${PUBLISH:-false}"
24-
BUILDER="${BUILDER:-container}"
2521

26-
export BUILDX_NO_DEFAULT_ATTESTATIONS=""
27-
# If PUBLISH=false, images only stores in local cache, otherwise they are pushed to th container registry
28-
docker buildx build --builder="${BUILDER}" --iidfile "${IIDFILE}" \
22+
# Compose full image name with tag
23+
FULL_IMAGE_NAME="${REG_ORG}/${IMAGE_NAME}:${TAG}"
24+
25+
# Build image using regular docker build
26+
docker build \
2927
--build-arg="PRESTO_VERSION=${VERSION}" \
3028
--build-arg="JMX_PROMETHEUS_JAVAAGENT_VERSION=0.20.0" \
31-
--output "type=image,name=${REG_ORG}/${IMAGE_NAME},push-by-digest=true,name-canonical=true,push=${PUBLISH}" \
32-
--platform "${PLATFORMS}" -f Dockerfile .
29+
-t "${FULL_IMAGE_NAME}" \
30+
-f Dockerfile .
3331

34-
if [[ "$PUBLISH" = "true" ]]; then
35-
# This only happens when push=true, since push-by-digest=true in the above build step, need to tag the images explicitly
36-
docker buildx imagetools create --builder="${BUILDER}" \
37-
-t "${REG_ORG}/${IMAGE_NAME}:${TAG}" "${REG_ORG}/${IMAGE_NAME}@$(cat "$IIDFILE")"
32+
# Optionally push the image
33+
if [[ "$PUBLISH" == "true" ]]; then
34+
docker push "${FULL_IMAGE_NAME}"
3835
fi

presto-clp/src/test/java/com/facebook/presto/plugin/clp/TestClpQueryBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class TestClpQueryBase
7575
new AnalyzePropertyManager(),
7676
createTestTransactionManager(new CatalogManager()));
7777

78-
protected static final ClpTableHandle table = new ClpTableHandle(new SchemaTableName("default", "test"), "", ClpTableHandle.StorageType.FS);
78+
protected static final ClpTableHandle table = new ClpTableHandle(new SchemaTableName("default", "test"), "");
7979
protected static final ClpColumnHandle city = new ClpColumnHandle(
8080
"city",
8181
RowType.from(ImmutableList.of(

0 commit comments

Comments
 (0)