diff --git a/.github/workflows/maven-checks.yml b/.github/workflows/maven-checks.yml index e2df97491d862..2295c413bef7b 100644 --- a/.github/workflows/maven-checks.yml +++ b/.github/workflows/maven-checks.yml @@ -46,5 +46,70 @@ jobs: run: | export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" ./mvnw install -B -V -T 1C -DskipTests -Dmaven.javadoc.skip=true --no-transfer-progress -P ci -pl '!presto-test-coverage,!:presto-docs' - - name: Clean Maven Output - run: ./mvnw clean -pl '!:presto-server,!:presto-cli,!presto-test-coverage' + - name: "Upload presto-server" + if: matrix.java == '8.0.442' + uses: "actions/upload-artifact@v4" + with: + name: "presto-server" + path: "presto-server/target/presto-server-0.293.tar.gz" + if-no-files-found: "error" + retention-days: 1 + - name: "Upload presto-cli" + if: matrix.java == '8.0.442' + uses: "actions/upload-artifact@v4" + with: + name: "presto-cli" + path: "presto-cli/target/presto-cli-0.293-executable.jar" + if-no-files-found: "error" + retention-days: 1 + - name: "Clean Maven output" + run: "./mvnw clean -pl '!:presto-server,!:presto-cli,!presto-test-coverage'" + + presto-coordinator-image: + name: "presto-coordinator-image" + needs: "maven-checks" + runs-on: "ubuntu-22.04" + steps: + - uses: "actions/checkout@v4" + with: + submodules: "recursive" + + - name: "Download presto-server" + uses: "actions/download-artifact@v4" + with: + name: "presto-server" + path: "./docker" + + - name: "Download presto-cli" + uses: "actions/download-artifact@v4" + with: + name: "presto-cli" + path: "./docker" + + - name: "Login to image registry" + uses: "docker/login-action@v3" + with: + registry: "ghcr.io" + username: "${{github.actor}}" + password: "${{secrets.GITHUB_TOKEN}}" + + - name: "Set up container image metadata" + id: "meta" + uses: "docker/metadata-action@v5" + with: + images: "ghcr.io/${{github.repository}}/coordinator" + tags: "type=raw,value=dev" + + - name: "Build and push" + uses: "docker/build-push-action@v6" + with: + build-args: |- + JMX_PROMETHEUS_JAVA_AGENT_VERSION=0.20.0 + PRESTO_VERSION=0.293 + context: "./docker" + file: "./docker/Dockerfile" + push: >- + ${{github.event_name != 'pull_request' + && github.ref == 'refs/heads/release-0.293-clp-connector'}} + tags: "${{steps.meta.outputs.tags}}" + labels: "${{steps.meta.outputs.labels}}" diff --git a/.github/workflows/prestissimo-worker-images-build.yml b/.github/workflows/prestissimo-worker-images-build.yml new file mode 100644 index 0000000000000..b36dcb71949be --- /dev/null +++ b/.github/workflows/prestissimo-worker-images-build.yml @@ -0,0 +1,70 @@ +name: "prestissimo-worker-images-build" + +on: + pull_request: + push: + +jobs: + prestissimo-worker-images-build: + name: "prestissimo-worker-images-build" + runs-on: "ubuntu-22.04" + steps: + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" + with: + submodules: "recursive" + + - name: "Login to image registry" + uses: "docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772" + with: + registry: "ghcr.io" + username: "${{github.actor}}" + password: "${{secrets.GITHUB_TOKEN}}" + + - name: "Set up metadata for dependency image" + id: "metadata-deps-image" + uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804" + with: + images: "ghcr.io/${{github.repository}}/prestissimo-worker-dev-env" + tags: "type=raw,value=dev" + + - name: "Build and push dependency image" + uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4" + with: + context: "./presto-native-execution" + file: "./presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile" + push: >- + ${{github.event_name != 'pull_request' + && github.ref == 'refs/heads/release-0.293-clp-connector'}} + tags: "${{steps.metadata-deps-image.outputs.tags}}" + labels: "${{steps.metadata-deps-image.outputs.labels}}" + + - name: "Set up metadata for runtime image" + id: "metadata-runtime-image" + uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804" + with: + images: "ghcr.io/${{github.repository}}/prestissimo-worker" + tags: "type=raw,value=dev" + + - name: "Get number of cores" + id: "get-cores" + run: |- + echo "num_cores=$(nproc)" >> $GITHUB_OUTPUT + + - name: "Build and push runtime image" + uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4" + with: + build-args: |- + BASE_IMAGE=ubuntu:22.04 + DEPENDENCY_IMAGE=${{steps.metadata-deps-image.outputs.tags}} + EXTRA_CMAKE_FLAGS=-DPRESTO_ENABLE_TESTING=OFF \ + -DPRESTO_ENABLE_PARQUET=ON \ + -DPRESTO_ENABLE_S3=ON + NUM_THREADS=${{steps.get-cores.outputs.num_cores}} + OSNAME=ubuntu + context: "./presto-native-execution" + file: "./presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile" + push: >- + ${{github.event_name != 'pull_request' + && github.ref == 'refs/heads/release-0.293-clp-connector'}} + tags: "${{steps.metadata-runtime-image.outputs.tags}}" + labels: "${{steps.metadata-runtime-image.outputs.labels}}" diff --git a/presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile b/presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile index 7ae303f21f27d..0cd18dc3ce498 100644 --- a/presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile +++ b/presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile @@ -39,6 +39,13 @@ FROM ${BASE_IMAGE} ENV BUILD_BASE_DIR=_build ENV BUILD_DIR="" +# Temporary fix for https://github.com/prestodb/presto/issues/25531 +# TODO: Update this code when there's a proper fix +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + COPY --chmod=0775 --from=prestissimo-image /prestissimo/${BUILD_BASE_DIR}/${BUILD_DIR}/presto_cpp/main/presto_server /usr/bin/ COPY --chmod=0775 --from=prestissimo-image /runtime-libraries/* /usr/lib64/prestissimo-libs/ COPY --chmod=0755 ./etc /opt/presto-server/etc