Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7bac92e
Added graal vm plugin to pom.xml and classes to reflection-config.json
subkanthi Jul 7, 2025
27d6cfa
Fixed steps to build ice native image
subkanthi Nov 20, 2025
b1bef04
include amd64 in supported architecture
subkanthi Nov 20, 2025
a2f6743
Added runtime depedencies for native image.
subkanthi Nov 20, 2025
fc1d23a
Added runtime depedencies for native image.
subkanthi Nov 20, 2025
371c0f8
Fixed reflection-config.json
subkanthi Nov 21, 2025
ddbcf9f
remove verify binary step.
subkanthi Nov 21, 2025
303357d
Add support for ARM.
subkanthi Nov 21, 2025
12ef6b0
Added Dockerfile.
subkanthi Nov 22, 2025
d0b8aaf
Remove autogenerated files.
subkanthi Nov 23, 2025
48e0a04
Removed accidentally committed files.
subkanthi Nov 23, 2025
3b3ddbb
Added GITHUB_RELEASE_TEMPLATE.md
subkanthi Nov 23, 2025
3bbcf76
Updated README.md with instructions to build native image.
subkanthi Nov 23, 2025
50ac8e3
Merge x86 and arm native builds into the same profile
xieandrew Apr 27, 2026
96405ee
Fix verify workflow
xieandrew Apr 27, 2026
ed93d90
Try fix workflow
xieandrew Apr 30, 2026
c6662c6
Merge remote-tracking branch 'origin/master' into 29-ice-make-a-downl…
xieandrew Apr 30, 2026
4dd6346
Update reflect-config.json
xieandrew Apr 30, 2026
b98ee64
Add aarch64 paths to resource-config.json
xieandrew Apr 30, 2026
1348f73
Add describe-parquet test
xieandrew May 7, 2026
7a074e4
Merge remote-tracking branch 'origin/master' into 29-ice-make-a-downl…
xieandrew May 8, 2026
321c38a
Add more cases to schema-evolution scenario
xieandrew May 8, 2026
2b2ce95
Merge remote-tracking branch 'origin/master' into 29-ice-make-a-downl…
xieandrew May 18, 2026
85e6f10
Update reflect-config.json
xieandrew May 18, 2026
ce54649
Update reflect-config.json
xieandrew May 18, 2026
d3b9c1e
Merge remote-tracking branch 'origin/master' into 29-ice-make-a-downl…
xieandrew May 26, 2026
6be1df8
Support catalog-export and catalog-import for native
xieandrew May 26, 2026
5894001
Merge branch 'master' of https://github.com/Altinity/ice into 29-ice-…
subkanthi Jun 2, 2026
895cae4
Merge branch '29-ice-make-a-downloadable-binary-wo-java-dependencies'…
subkanthi Jun 2, 2026
11cc445
Update reflect-config.json
xieandrew Jun 10, 2026
739af21
Update pyarrow dependency
xieandrew Jun 10, 2026
fd7b0cd
Merge remote-tracking branch 'origin/master' into 29-ice-make-a-downl…
xieandrew Jul 6, 2026
4b6c406
Merge remote-tracking branch 'origin/master' into 29-ice-make-a-downl…
xieandrew Aug 13, 2026
64cc752
Update reflect-config.json
xieandrew Aug 18, 2026
4676b77
Added native binaries to github release
subkanthi Aug 18, 2026
cb45a53
Merge branch '29-ice-make-a-downloadable-binary-wo-java-dependencies'…
subkanthi Aug 18, 2026
f3ca08f
Merge branch 'master' of https://github.com/Altinity/ice into 29-ice-…
subkanthi Aug 18, 2026
8957584
Update download-artifact to stable version
subkanthi Aug 18, 2026
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
17 changes: 17 additions & 0 deletions .bin/agent-ice
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
PROJECT_ROOT=$(cd -- "$SCRIPT_DIR/.." && pwd)

shopt -s nullglob
jars=("$PROJECT_ROOT"/ice/target/ice-*-shaded.jar)
shopt -u nullglob
if (( ${#jars[@]} == 0 )); then
echo "agent-ice: no ice-*-shaded.jar in $PROJECT_ROOT/ice/target/." >&2
exit 1
fi
jar=$(ls -t "${jars[@]}" | head -n1)

exec "${JAVA_HOME:?JAVA_HOME not set — run inside direnv shell}/bin/java" \
-agentlib:native-image-agent=config-merge-dir=$PROJECT_ROOT/ice/src/main/resources/META-INF/native-image/com.altinity/ice,experimental-class-loader-support \
-jar "$jar" "$@"
21 changes: 21 additions & 0 deletions .bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ test -n "$GITHUB_TOKEN" || (echo 'GITHUB_TOKEN env variable must be set' >&2; ex

./mvnw clean verify

# Preserve native binaries staged by CI (release/native/*) across the wipe.
native_stash=
if [ -d release/native ]; then
native_stash=$(mktemp -d)
cp -a release/native "$native_stash/native"
fi
rm -rf release/
if [ -n "$native_stash" ]; then
mkdir -p release
cp -a "$native_stash/native" release/native
fi

_undo_mvn_version_set() {
./mvnw versions:revert
Expand Down Expand Up @@ -53,6 +63,17 @@ for f in ice ice-rest-catalog; do
github-release upload --user altinity --repo ice --tag "$VERSION_TAG" --name "$f-$VERSION" --file "$f/target/$f-jar"
done

for arch in amd64 arm64; do
native_bin="release/native/ice-native-$arch"
if [ -f "$native_bin" ]; then
echo "Uploading ice-native-$arch..." >&2
github-release upload --user altinity --repo ice --tag "$VERSION_TAG" \
--name "ice-native-$arch-$VERSION" --file "$native_bin"
else
echo "Skipping ice-native-$arch (not found at $native_bin)" >&2
fi
done

echo >&2 'Pushing ice Docker image'
docker-build-ice --push
echo >&2 'Pushing ice-rest-catalog Docker image'
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,37 @@ on:
required: true
concurrency: release
jobs:
native-build:
name: Build native ice (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'graalvm'
cache: maven
- name: Build native image
run: ./mvnw -Pnative -pl ice -am clean package -Dmaven.test.skip=true
- name: Stage artifact
run: |
mkdir -p dist
cp ice/target/ice dist/ice-native-${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: ice-native-${{ matrix.arch }}
path: dist/ice-native-${{ matrix.arch }}
if-no-files-found: error

release:
needs: native-build
runs-on: ubuntu-24.04
steps:
- uses: docker/login-action@v3
Expand Down Expand Up @@ -40,6 +70,13 @@ jobs:
distribution: 'graalvm'
cache: maven

- name: Download native binaries
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: ice-native-*
path: release/native
merge-multiple: true

- run: .bin/release --push
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- run: ./mvnw clean verify
- name: Install
run: ./mvnw install
# TODO: check native-image can build ice
- name: Run Scenario-Based Integration Tests
run: ../mvnw test -Dtest=ScenarioBasedIT
working-directory: ice-rest-catalog
Expand Down Expand Up @@ -58,3 +57,33 @@ jobs:
-Dit.test=DockerScenarioBasedIT,DockerLocalFileIOClickHouseIT,DockerLocalFileIOClickHouseAllTypesIT,DockerElasticMQWatchIT
-Ddocker.image=altinity/ice-rest-catalog:debug-with-ice-latest-master-amd64
-Dclickhouse.image=altinity/clickhouse-server:25.8.16.20002.altinityantalya
native-build:
name: Build and test native image (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
artifact: ice-native-amd64-dynamic
- arch: arm64
runner: ubuntu-24.04-arm
artifact: ice-native-arm64-dynamic
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'graalvm'
cache: maven
- name: Build native image (dynamic linking - no musl required)
run: ./mvnw -Pnative clean install -Dmaven.test.skip=true
- name: Run Scenario-Based Integration Tests
run: ../mvnw test -Dtest=ScenarioBasedIT -Dice.native=true
working-directory: ice-rest-catalog
- name: Upload native binary as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ice/target/ice
if-no-files-found: error
14 changes: 14 additions & 0 deletions GITHUB_RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ curl -sSL https://github.com/altinity/ice/releases/download/REPLACE_WITH_TAG/ice
-o ice && chmod a+x ice && sudo mv ice /usr/local/bin/
```

#### Native (no Java required; needs glibc)

```sh
# linux amd64
curl -sSL https://github.com/altinity/ice/releases/download/REPLACE_WITH_TAG/ice-native-amd64-REPLACE_WITH_VER \
-o ice && chmod a+x ice && sudo mv ice /usr/local/bin/
```

```sh
# linux arm64
curl -sSL https://github.com/altinity/ice/releases/download/REPLACE_WITH_TAG/ice-native-arm64-REPLACE_WITH_VER \
-o ice && chmod a+x ice && sudo mv ice /usr/local/bin/
```

#### Docker

<!-- TODO: @digest -->
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@ Create/delete tables, insert data with `ice insert -p ns1.table1 file://example.

## Installation

Pre-built binaries\* (+ links to Docker images for [ice](https://hub.docker.com/r/altinity/ice) and [ice-rest-catalog](https://hub.docker.com/r/altinity/ice-rest-catalog)) are available from [GitHub Releases](https://github.com/Altinity/ice/releases) page.
> \* currently require `java` 21+ to run (available [here](https://adoptium.net/installation/)).
Pre-built binaries (+ links to Docker images for [ice](https://hub.docker.com/r/altinity/ice) and [ice-rest-catalog](https://hub.docker.com/r/altinity/ice-rest-catalog)) are available from [GitHub Releases](https://github.com/Altinity/ice/releases) page.

**Two types of binaries are available:**

1. **Java-based binaries** - Require Java 21+ to run (available [here](https://adoptium.net/installation/))
2. **Native binaries** - Standalone executables with no Java dependency
- `ice-native-amd64` - Dynamic binary for x86_64 Linux (requires glibc)
- `ice-native-arm64` - Dynamic binary for ARM64 Linux (requires glibc)

## Usage

See [examples/](examples/).

## Development

### Standard Build (Java-based)

Install [sdkman](https://sdkman.io/install), then

```shell
Expand All @@ -35,6 +43,25 @@ sdk env
./mvnw
```

### Native Image Build (Standalone)

Build standalone native binaries with no Java dependency:

```shell
# Install prerequisites
sdk env # or ensure Java 21+ and GraalVM are available

# Build ice binary (both amd64 and arm64)
mvn -Pnative -pl ice clean package -Dmaven.test.skip=true

# The output binary is at ice/target/ice

# Docker builds
docker build -f ice/Dockerfile.native -t ice-native:amd64 .

docker build -f ice/Dockerfile.native -t ice-native:arm64 .
```

## License

Copyright (c) 2025, Altinity Inc and/or its affiliates. All rights reserved.
Expand Down
4 changes: 4 additions & 0 deletions ice-rest-catalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<jetcd.version>0.8.5</jetcd.version>
<grpc.version>1.76.0</grpc.version>
<testcontainers.version>1.21.4</testcontainers.version>
<ice.native>false</ice.native>
</properties>

<dependencies>
Expand Down Expand Up @@ -594,6 +595,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<ice.native>${ice.native}</ice.native>
</systemPropertyVariables>
<excludes>
<exclude>**/DockerScenarioBasedIT.java</exclude>
<exclude>**/DockerLocalFileIOClickHouseIT.java</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
public class ScenarioBasedIT extends RESTCatalogTestBase {

private static final boolean USE_NATIVE = Boolean.getBoolean("ice.native");

@Override
protected ScenarioTestRunner createScenarioRunner(String scenarioName) throws Exception {
Path scenariosDir = getScenariosDirectory();
Expand All @@ -42,18 +44,24 @@ protected ScenarioTestRunner createScenarioRunner(String scenarioName) throws Ex

// Try to find ice-jar in the build
String projectRoot = Paths.get("").toAbsolutePath().getParent().toString();
String iceJar = projectRoot + "/ice/target/ice-jar";
String iceJar =
USE_NATIVE ? projectRoot + "/ice/target/ice" : projectRoot + "/ice/target/ice-jar";
File iceJarFile = new File(iceJar);

if (iceJarFile.exists() && iceJarFile.canExecute()) {
// Use pre-built ice-jar if available
templateVars.put("ICE_CLI", iceJar);
logger.info("Using ice-jar from: {}", iceJar);
String override = System.getenv("ICE_CLI_OVERRIDE");
if (override != null) {
templateVars.put("ICE_CLI", override);
} else {
// Fall back to using local-ice wrapper script
String localIce = projectRoot + "/.bin/local-ice";
templateVars.put("ICE_CLI", localIce);
logger.info("Using local-ice script from: {}", localIce);
if (iceJarFile.exists() && iceJarFile.canExecute()) {
// Use pre-built ice-jar if available
templateVars.put("ICE_CLI", iceJar);
logger.info("Using ice-jar from: {}", iceJar);
} else {
// Fall back to using local-ice wrapper script
String localIce = projectRoot + "/.bin/local-ice";
templateVars.put("ICE_CLI", localIce);
logger.info("Using local-ice script from: {}", localIce);
}
}

return new ScenarioTestRunner(scenariosDir, templateVars);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ echo "OK list-namespaces listed ${NAMESPACE_NAME}"
{{ICE_CLI}} --config {{CLI_CONFIG}} describe
echo "OK Listed namespaces"

# Check configuration
{{ICE_CLI}} --config {{CLI_CONFIG}} check
echo "OK checked configuration"

# Explicit create-table (staged create + commit); regression for RESTCatalogAdapter UPDATE_TABLE path
{{ICE_CLI}} --config {{CLI_CONFIG}} create-table ${TABLE_CREATE_VIA_CLI} --schema-from-parquet "file://${INPUT_PATH}"
echo "OK create-table ${TABLE_CREATE_VIA_CLI}"
Expand Down
Binary file not shown.
Loading
Loading