Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
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
27 changes: 27 additions & 0 deletions .github/workflows/clp-execution-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
runs-on: "ubuntu-latest"
outputs:
ubuntu_jammy_image_changed: "${{steps.filter.outputs.ubuntu_jammy_image}}"
ubuntu_noble_image_changed: "${{steps.filter.outputs.ubuntu_noble_image}}"
steps:
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
with:
Expand All @@ -46,6 +47,10 @@ jobs:
- ".github/actions/clp-execution-image-build/action.yaml"
- ".github/workflows/clp-execution-image-build.yaml"
- "tools/docker-images/clp-execution-base-ubuntu-jammy/**/*"
ubuntu_noble_image:
- ".github/actions/clp-execution-image-build/action.yaml"
- ".github/workflows/clp-execution-image-build.yaml"
- "tools/docker-images/clp-execution-base-ubuntu-noble/**/*"

ubuntu-jammy-execution-image:
name: "ubuntu-jammy-execution-image"
Expand All @@ -68,3 +73,25 @@ jobs:
image_registry_password: "${{secrets.GITHUB_TOKEN}}"
platform_id: "ubuntu"
platform_version_id: "jammy"

ubuntu-noble-execution-image:
name: "ubuntu-noble-execution-image"
if: "'true' == needs.filter-relevant-changes.outputs.ubuntu_noble_image_changed"
needs: "filter-relevant-changes"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
with:
submodules: "recursive"

- name: "Workaround actions/runner-images/issues/6775"
shell: "bash"
run: "chown $(id -u):$(id -g) -R ."

- uses: "./.github/actions/clp-execution-image-build"
with:
image_registry: "ghcr.io"
image_registry_username: "${{github.actor}}"
image_registry_password: "${{secrets.GITHUB_TOKEN}}"
platform_id: "ubuntu"
platform_version_id: "noble"
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
2 changes: 1 addition & 1 deletion components/clp-py-utils/clp_py_utils/sql_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def create_mysql_connection(

def create_mariadb_connection(
self, disable_localhost_socket_connection: bool = False
) -> mariadb.connection:
) -> mariadb.Connection:
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
try:
connection = mariadb.connect(
**self.database_config.get_mysql_connection_params(
Expand Down
2 changes: 1 addition & 1 deletion components/clp-py-utils/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python = "^3.8 || ^3.10"
boto3 = "^1.35.81"
# mariadb version must be compatible with libmariadev installed in runtime env.
# See https://mariadb.com/docs/server/connect/programming-languages/python/install/#Dependencies
mariadb = "~1.0.11"
mariadb = "~1.1.10"
mysql-connector-python = "^8.2.0"
pydantic = "^1.10.13"
python-dotenv = "^1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion components/job-orchestration/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Brotli = "^1.1.0"
celery = "^5.3.6"
# mariadb version must be compatible with libmariadev installed in runtime env.
# See https://mariadb.com/docs/server/connect/programming-languages/python/install/#Dependencies
mariadb = "~1.0.11"
mariadb = "~1.1.10"
msgpack = "^1.0.7"
mysql-connector-python = "^8.2.0"
pika = "^1.3.2"
Expand Down
16 changes: 16 additions & 0 deletions tools/docker-images/clp-execution-base-ubuntu-noble/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:noble AS base

WORKDIR /root

RUN mkdir -p ./tools/docker-images/clp-execution-base-ubuntu-noble
COPY ./tools/docker-images/clp-execution-base-ubuntu-noble/setup-scripts ./tools/docker-images/clp-execution-base-ubuntu-noble/setup-scripts

RUN ./tools/docker-images/clp-execution-base-ubuntu-noble/setup-scripts/install-prebuilt-packages.sh
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved

# Remove cached files
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Flatten the image
FROM scratch
COPY --from=base / /
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
39 changes: 39 additions & 0 deletions tools/docker-images/clp-execution-base-ubuntu-noble/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Exit on any error
set -e

# Error on undefined variable
set -u
set -o pipefail

Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
repo_root=${script_dir}/../../../

Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
arch=$(uname -m)

if [ "$arch" = "x86_64" ]; then
arch_name="x86"
elif [ "$arch" = "aarch64" ]; then
arch_name="arm64"
else
echo "Error: Unsupported architecture - $arch"
exit 1
fi

build_cmd=(
docker build
--tag clp-execution-${arch_name}-ubuntu-noble:dev
"$repo_root"
--file "${script_dir}/Dockerfile"
)
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved

if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ;
then
build_cmd+=(
--label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)"
--label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)"
)
fi
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved

"${build_cmd[@]}"
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# Exit on any error
set -e

# Error on undefined variable
set -u
set -o pipefail

Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
ca-certificates \
checkinstall \
curl \
libcurl4 \
libmariadb-dev \
libssl-dev \
python3 \
rsync \
zstd
Comment thread
quinntaylormitchell marked this conversation as resolved.
Resolved