Skip to content

Commit 2481b0b

Browse files
author
Xiaochong Wei
committed
Address comments
1 parent 5ca0420 commit 2481b0b

File tree

2 files changed

+22
-46
lines changed

2 files changed

+22
-46
lines changed

.github/workflows/maven-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ jobs:
6464
retention-days: 1
6565
- name: Clean Maven Output
6666
run: ./mvnw clean -pl '!:presto-server,!:presto-cli,!presto-test-coverage'
67-
presto-coordinator-with-clp-connector-runtime-image:
68-
name: presto-coordinator-runtime-image
67+
presto-coordinator-image:
68+
name: presto-coordinator-image
6969
needs: maven-checks
7070
runs-on: ubuntu-22.04
7171
if: ${{ always() && success() }}
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: prestocpp-worker-with-clp-connector-runtime-image-build
1+
name: prestissimo-worker-images-build
22

33
on:
44
# TODO: specifiy the branch to the release-0.293 when finalize the PR
55
pull_request:
66
push:
77

88
jobs:
9-
prestocpp-worker-with-clp-connector-runtime-image:
10-
name: prestocpp-worker-with-clp-connector-runtime-image
9+
prestissimo-worker-images-build:
10+
name: prestissimo-worker-images-build
1111
runs-on: ubuntu-22.04
1212
steps:
1313
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
@@ -22,69 +22,45 @@ jobs:
2222
password: ${{secrets.GITHUB_TOKEN}}
2323

2424
- name: "Set up metadata for dependency image"
25-
id: "meta-dependency"
25+
id: "metadata-deps-image"
2626
uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
2727
with:
2828
images: >-
2929
ghcr.io/${{github.repository}}/prestissimo-worker-dev-env
3030
tags: |-
3131
type=raw,value=dev
3232
33-
- name: "Set up metadata for runtime image"
34-
id: "meta-runtime"
35-
uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
36-
with:
37-
images: >-
38-
ghcr.io/${{github.repository}}/prestissimo-worker
39-
tags: |-
40-
type=raw,value=dev
41-
42-
- name: Check for dependency changes or missing dependency image
43-
id: dependency-changes
44-
run: |
45-
git fetch origin ${{ github.event.before }} --depth=1 || true
46-
dep_changed=false
47-
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^presto-native-execution/scripts'; then
48-
dep_changed=true
49-
fi
50-
51-
velox_old_sha=$(git ls-tree ${{ github.event.before }} presto-native-execution/velox | awk '{print $3}')
52-
velox_new_sha=$(git ls-tree ${{ github.sha }} presto-native-execution/velox | awk '{print $3}')
53-
cd presto-native-execution/velox
54-
if git diff --name-only ${velox_old_sha} ${velox_new_sha} | grep -q '^scripts'; then
55-
dep_changed=true
56-
fi
57-
echo "dep-changed=${dep_changed}" >> $GITHUB_OUTPUT
58-
59-
image_exists=true
60-
if ! docker manifest inspect "${{ steps.meta-dependency.outputs.tags }}" > /dev/null 2>&1; then
61-
image_exists=false
62-
fi
63-
echo "image-exists=${image_exists}" >> $GITHUB_OUTPUT
64-
6533
- name: "Build and push dependency image"
66-
if: steps.dependency-changes.outputs.dep-changed == 'true' || steps.dependency-changes.outputs.image-exists == 'false'
6734
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
6835
with:
6936
context: "./presto-native-execution/"
7037
file: "./presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile"
7138
push: >-
7239
${{github.event_name != 'pull_request'
7340
&& github.ref == 'refs/heads/release-0.293-clp-connector'}}
74-
tags: "${{steps.meta-dependency.outputs.tags}}"
75-
labels: "${{steps.meta-dependency.outputs.labels}}"
41+
tags: "${{steps.metadata-deps-image.outputs.tags}}"
42+
labels: "${{steps.metadata-deps-image.outputs.labels}}"
43+
44+
- name: "Set up metadata for runtime image"
45+
id: "metadata-runtime-image"
46+
uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
47+
with:
48+
images: >-
49+
ghcr.io/${{github.repository}}/prestissimo-worker
50+
tags: |-
51+
type=raw,value=dev
7652
7753
- name: Get number of cores
7854
id: get-cores
7955
run: |-
80-
echo "num-threads=$(nproc)" >> $GITHUB_OUTPUT
56+
echo "num_cores=$(nproc)" >> $GITHUB_OUTPUT
8157
8258
- name: "Build and push runtime image"
8359
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
8460
with:
8561
build-args: |-
86-
NUM_THREADS=${{steps.get-cores.outputs.num-threads}}
87-
DEPENDENCY_IMAGE=${{steps.meta-dependency.outputs.tags}}
62+
NUM_THREADS=${{steps.get-cores.outputs.num_cores}}
63+
DEPENDENCY_IMAGE=${{steps.metadata-deps-image.outputs.tags}}
8864
BASE_IMAGE=ubuntu:22.04
8965
OSNAME=ubuntu
9066
EXTRA_CMAKE_FLAGS=-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON
@@ -93,5 +69,5 @@ jobs:
9369
push: >-
9470
${{github.event_name != 'pull_request'
9571
&& github.ref == 'refs/heads/release-0.293-clp-connector'}}
96-
tags: "${{steps.meta-runtime.outputs.tags}}"
97-
labels: "${{steps.meta-runtime.outputs.labels}}"
72+
tags: "${{steps.metadata-runtime-image.outputs.tags}}"
73+
labels: "${{steps.metadata-runtime-image.outputs.labels}}"

0 commit comments

Comments
 (0)