Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 7 additions & 1 deletion .github/scripts/bump-agent-versions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const nativeDriverDirectories = {
cassandra: "cassandra-go",
duckdb: "duckdb",
hive: "hive-go",
argo: "argo-go",
oracle: "oracle-go",
kingbase: "kingbase-go",
iotdb: "iotdb",
Expand All @@ -67,13 +68,18 @@ const nativeDriverDirectories = {
const crateNativeDriverDirectories = {
"sqlite-worker": "crates/dbx-sqlite-worker",
};
const nativeDriverModules = new Set(["cassandra", "duckdb", "hive", "oracle", "xugu", "kingbase", "iotdb", "neo4j", "vastbase", "rabbitmq", "rocketmq", "zookeeper", "tdengine", "etcd", "etcd2", "sqlite-worker"]);
const nativeDriverModules = new Set(["cassandra", "duckdb", "hive", "argo", "oracle", "xugu", "kingbase", "iotdb", "neo4j", "vastbase", "rabbitmq", "rocketmq", "zookeeper", "tdengine", "etcd", "etcd2", "sqlite-worker"]);
const nativeDriverSharedPaths = {
hive: [
"agents/go-common/go-gssapi",
"agents/go-common/gohive",
"agents/go-common/gosasl",
],
argo: [
"agents/go-common/go-gssapi",
"agents/go-common/gohive",
"agents/go-common/gosasl",
],
zookeeper: [
"agents/go-common/go-gssapi",
"agents/go-common/gosasl",
Expand Down
54 changes: 52 additions & 2 deletions .github/workflows/agents-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,46 @@ jobs:
name: hive-native
path: "release-native/dbx-agent-hive-*"

build-argo-native:
needs: [bump-versions]
if: ${{ contains(fromJSON(needs.bump-versions.outputs.native_modules), 'argo') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Test Argo native agent
working-directory: agents/drivers/argo-go
run: go test ./...
- name: Cross-compile Argo native agent
shell: bash
run: |
mkdir -p release-native
cd agents/drivers/argo-go
declare -A TARGETS=(
["macos-aarch64"]="darwin/arm64"
["macos-x64"]="darwin/amd64"
["linux-aarch64"]="linux/arm64"
["linux-x64"]="linux/amd64"
["windows-aarch64"]="windows/arm64"
["windows-x64"]="windows/amd64"
)
for platform in "${!TARGETS[@]}"; do
IFS=/ read -r goos goarch <<< "${TARGETS[$platform]}"
output="../../../release-native/dbx-agent-argo-${platform}"
if [[ "$goos" == "windows" ]]; then
output="${output}.exe"
fi
echo "Building $platform ($goos/$goarch)"
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" .
done
ls -lh ../../../release-native
- uses: actions/upload-artifact@v4
with:
name: argo-native
path: "release-native/dbx-agent-argo-*"

build-kingbase-native:
needs: [bump-versions]
if: ${{ contains(fromJSON(needs.bump-versions.outputs.native_modules), 'kingbase') }}
Expand Down Expand Up @@ -1217,7 +1257,7 @@ jobs:
retention-days: 1

release:
needs: [bump-versions, commit-versions, build-agents, build-oracle-native, build-xugu-native, build-rabbitmq-native, build-rocketmq-native, build-etcd-native, build-etcd2-native, build-zookeeper-native, build-cassandra-native, build-hive-native, build-kingbase-native, build-vastbase-native, build-neo4j-native, build-iotdb-native, build-duckdb-native, build-sqlite-worker-native, build-tdengine-native, build-jre, reuse-previous-assets]
needs: [bump-versions, commit-versions, build-agents, build-oracle-native, build-xugu-native, build-rabbitmq-native, build-rocketmq-native, build-etcd-native, build-etcd2-native, build-zookeeper-native, build-cassandra-native, build-hive-native, build-argo-native, build-kingbase-native, build-vastbase-native, build-neo4j-native, build-iotdb-native, build-duckdb-native, build-sqlite-worker-native, build-tdengine-native, build-jre, reuse-previous-assets]
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -1349,6 +1389,7 @@ jobs:
zookeeper) echo "Apache ZooKeeper" ;;
cassandra) echo "Apache Cassandra" ;;
hive) echo "Apache Hive" ;;
argo) echo "星环Argo" ;;
neo4j) echo "Neo4j" ;;
iotdb) echo "Apache IoTDB" ;;
tdengine) echo "TDengine" ;;
Expand Down Expand Up @@ -1417,7 +1458,7 @@ jobs:
[ -n "$DRIVERS" ] && DRIVERS="${DRIVERS},"$'\n'
DRIVERS="${DRIVERS}$(generate_jar_entry "$name" "$label" "$f" "$jre_key" "$version" "$external_driver" "$native_json")"
done
for name in oracle xugu kingbase vastbase neo4j iotdb duckdb sqlite-worker rabbitmq rocketmq zookeeper cassandra hive tdengine etcd etcd2; do
for name in oracle xugu kingbase vastbase neo4j iotdb duckdb sqlite-worker rabbitmq rocketmq zookeeper cassandra hive argo tdengine etcd etcd2; do
version=$(get_module_version "$name")
[ -f "release/dbx-agent-${name}-${version}.jar" ] && continue
native_json=$(generate_native_platforms "$name" "$version")
Expand Down Expand Up @@ -1505,6 +1546,7 @@ jobs:
zookeeper) echo "Apache ZooKeeper" ;;
cassandra) echo "Apache Cassandra" ;;
hive) echo "Apache Hive" ;;
argo) echo "星环Argo" ;;
neo4j) echo "Neo4j" ;;
iotdb) echo "Apache IoTDB" ;;
tdengine) echo "TDengine" ;;
Expand Down Expand Up @@ -1554,6 +1596,8 @@ jobs:
LOG_PATH="agents/drivers/cassandra-go/"
elif [ "$name" = "hive" ]; then
LOG_PATH="agents/drivers/hive-go/"
elif [ "$name" = "argo" ]; then
LOG_PATH="agents/drivers/argo-go/"
elif [ "$name" = "neo4j" ]; then
LOG_PATH="agents/drivers/neo4j-go/"
elif [ "$name" = "iotdb" ]; then
Expand All @@ -1572,6 +1616,12 @@ jobs:
"agents/go-common/gohive/"
"agents/go-common/gosasl/"
)
elif [ "$name" = "argo" ]; then
LOG_PATHS+=(
"agents/go-common/go-gssapi/"
"agents/go-common/gohive/"
"agents/go-common/gosasl/"
)
elif [ "$name" = "zookeeper" ]; then
LOG_PATHS+=(
"agents/go-common/go-gssapi/"
Expand Down
30 changes: 30 additions & 0 deletions agents/drivers/argo-go/MIGRATION_PARITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Argo Go agent notes

Status date: 2026-09-03.

This agent is a fork of `agents/drivers/hive-go` created to serve 星环Argo
(Transwarp ArgoDB) connections exclusively: `supportsRoutines()` returns true
unconditionally and connection identity reports `ArgoDB (Transwarp)` /
`DBX ArgoDB Go Agent`. Vanilla Hive / Kyuubi / Impala stay on hive-go.

No Hive 3 / Hive 4 / Kyuubi parity is claimed for this directory. The
validation matrix in `agents/drivers/hive-go/MIGRATION_PARITY.md` applies to
hive-go only.

## Maintenance rule

Most files are kept byte-identical to hive-go. Fixes landing in hive-go that
touch `metadata.go` or `main.go` must be ported here (adjusting only the
argo-specific branding, the unconditional `supportsRoutines()`, and log
prefixes), including their regression tests.

## Validation

Validated against Transwarp ArgoDB by the PR author (#7933):

- `go test ./...` green in this module (routine views asserted queried
unconditionally; ArgoDB identity asserted)
- End-to-end on a local build with an ArgoDB connection: 星环Argo branding
shown, stored-procedure source opens as one whole statement, `CREATE OR
REPLACE PROCEDURE` executes as a single statement, and execute errors
surface readable diagnostics
101 changes: 101 additions & 0 deletions agents/drivers/argo-go/bench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Hive Agent benchmark

This benchmark compares the same DBX JSON-RPC operations through the native
Go Hive Agent and the archived JDBC Hive Agent. Both candidates run on the same
host and connect to the same HiveServer2 instance.

Use `functional_probe.py` before running performance benchmarks. It validates
connection, sessions, query values, metadata, pagination, failed-SQL semantics,
clean shutdown, and Java/Go result parity without concurrency load.

The runner measures:

- process startup and fresh connection latency;
- artifact size, idle RSS, and peak RSS;
- `SELECT 1`-shape lookup and 100/1,000/10,000-row decoding;
- `list_databases`, `list_tables`, and complete paged reads;
- 1, 8, and 32 concurrent DBX Agent sessions;
- mean, p50, p95, p99, throughput, and clean shutdown behavior.

Candidate order rotates between rounds to reduce warm-cache and server-order
bias. Startup and connection samples always use a fresh Agent process.

## Prepare the fixture

The defaults expect `dbx_agent_bench.agent_bench` with exactly 10,000 or more
rows and columns named `id` and `payload`:

```sql
CREATE DATABASE IF NOT EXISTS dbx_agent_bench;
CREATE TABLE IF NOT EXISTS dbx_agent_bench.agent_bench (
id BIGINT,
payload STRING
) STORED AS ORC;
```

Populate deterministic rows before running the benchmark. Keep the fixture,
HiveServer2 configuration, Agent host, and Java runtime unchanged between
candidates.

## Run

Functional parity probe:

```bash
GO_AGENT=/tmp/dbx-hive-bench/hive-agent-linux-amd64 \
JDBC_AGENT_JAR=/tmp/dbx-hive-bench/dbx-agent-hive.jar \
JAVA_BIN=/tmp/dbx-hive-bench/jre21/bin/java \
HIVE_HOST=127.0.0.1 \
HIVE_PORT=10000 \
HIVE_DATABASE=dbx_agent_bench \
HIVE_URL_PARAMS=auth=noSasl \
python3 agents/drivers/hive-go/bench/functional_probe.py \
> /tmp/dbx-hive-bench/functional-result.json
```

The functional probe runs the Go candidate only by default. Set
`BENCH_CANDIDATES=go,jdbc` only when an explicit historical-JDBC comparison is
needed.

Performance benchmark:

```bash
GO_AGENT=/tmp/dbx-hive-bench/hive-agent-linux-amd64 \
JDBC_AGENT_JAR=/tmp/dbx-hive-bench/dbx-agent-hive.jar \
HIVE_HOST=127.0.0.1 \
HIVE_PORT=10000 \
HIVE_DATABASE=dbx_agent_bench \
HIVE_URL_PARAMS=auth=noSasl \
python3 agents/drivers/hive-go/bench/agent_compare.py \
> /tmp/dbx-hive-bench/result.json
```

## Configuration

- `BENCH_CANDIDATES`: performance benchmark default `go,jdbc`; functional probe
default `go`.
- `GO_AGENT_COMMAND`, `JDBC_AGENT_COMMAND`: optional full launch commands.
- `BENCH_STARTUPS`, `BENCH_CONNECTS`: fresh-process sample counts, default `8`.
- `BENCH_ROUNDS`: alternating steady-state rounds, default `3`.
- `BENCH_WARMUPS`: warmups before each workload, default `2`.
- `BENCH_CONCURRENCY`: comma-separated session counts, default `1,8,32`.
- `BENCH_CONCURRENCY_OPS_PER_WORKER`: operations per session, default `8`.
- `HIVE_HOST`, `HIVE_PORT`, `HIVE_DATABASE`, `HIVE_BENCH_TABLE`.
- `HIVE_USERNAME`, `HIVE_PASSWORD`, `HIVE_URL_PARAMS`, `HIVE_CONNECTION_STRING`.
- `HIVE_SSL`, `HIVE_CA_CERT_PATH`, `HIVE_CLIENT_CERT_PATH`, `HIVE_CLIENT_KEY_PATH`.
- `BENCH_*_SQL` and `BENCH_*_COUNT` override individual workloads.

Run the benchmark on the Agent host. Do not compare a local Go process with a
remote JDBC process, use different HS2 endpoints, or mutate the fixture between
candidates.

## Kerberos fixture

`kdc_fixture` starts a test-only in-process KDC and writes a temporary
`krb5.conf` and keytab containing `alice` and `hive/localhost`. Never use these
credentials outside an isolated compatibility environment, and delete the
generated directory after validation.

```bash
go run ./bench/kdc_fixture -dir /tmp/dbx-hive-kerberos
```
Loading
Loading