Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
52035da
chore(server): bump REST API version
imbajin Aug 16, 2026
88a762a
fix(server): package current reactor artifacts
imbajin Aug 16, 2026
3d9d954
fix(pd): validate raft peer addresses
imbajin Aug 17, 2026
ed1310c
feat(server): support GraphSpace-wide observer
imbajin Aug 17, 2026
0752ec2
fix(server): enforce Gremlin mutations
imbajin Aug 17, 2026
ddfec94
fix(server): inspect traversal mutation steps
imbajin Aug 17, 2026
3d23131
fix(server): proxy copied traversal strategies
imbajin Aug 17, 2026
eae9401
fix(server): isolate GraphSpace membership
imbajin Aug 17, 2026
e2d7fff
fix(server): prepare audit limiter after login
imbajin Aug 17, 2026
7a57568
fix(server): scope metadata callback admin
imbajin Aug 17, 2026
006a2b3
fix(server): scope space manager user access
imbajin Aug 17, 2026
2f844ed
fix(server): honor custom admin mutations
imbajin Aug 17, 2026
ca0478a
fix(server): allow admin template management
imbajin Aug 17, 2026
d8699ae
refactor(style): set line width to 120
imbajin Aug 18, 2026
28641f5
fix(server): preserve anonymous template ownership
imbajin Aug 18, 2026
8c69441
fix(server): guard merge traversal writes
imbajin Aug 18, 2026
17615dc
fix(server): scope merge step detection
imbajin Aug 18, 2026
8d03d9c
fix(server): verify merge traversal guards
imbajin Aug 18, 2026
2ed446b
fix(server): isolate merge test fixtures
imbajin Aug 18, 2026
b94347b
fix(server): bind merge fixtures to tinkerpop
imbajin Aug 18, 2026
f38b4ad
fix(server): align merge fixture API
imbajin Aug 18, 2026
6f78df5
chore(server): remove speculative merge guards
imbajin Aug 18, 2026
7083242
chore(ci): upgrade dependency review
imbajin Aug 18, 2026
3fd62c2
fix(auth): preserve space observer graph checks
Aug 19, 2026
9083478
fix(auth): scope role responses by graphspace
Aug 19, 2026
db02dc7
fix(auth): reject unscoped lambda mutations
Aug 19, 2026
3d25a7e
fix(auth): clear grpc listener contexts
Aug 19, 2026
3e81d0e
fix(auth): keep strategy lists immutable
Aug 19, 2026
6968a7d
ci(docker): build hbase image changes
Aug 19, 2026
e2a89e5
fix(auth): preserve observer role on cleanup failure
Aug 19, 2026
5a7a172
fix(auth): isolate metadata listener contexts
Aug 19, 2026
4a0a7af
test(auth): register user api regressions
Aug 19, 2026
8e1943d
fix(auth): honor space observers in manager checks
Aug 19, 2026
78343d8
test(auth): cover partial observer cleanup
Aug 19, 2026
e689a6b
fix(auth): clean persisted observer grants
Aug 19, 2026
b7e386b
fix(auth): classify custom comparator callbacks
Aug 19, 2026
0fe4851
fix(auth): prevent traversal strategy removal
Aug 19, 2026
3125ce3
ci(docker): smoke test hbase runtime
Aug 19, 2026
b337003
fix(auth): proxy persisted observer lookup
Aug 19, 2026
be4d9fd
fix(auth): keep role graph lookup rpc compatible
Aug 19, 2026
786f502
fix(auth): scope persisted observer lookup
Aug 19, 2026
eb98790
ci(docker): set hbase runtime hostname
Aug 19, 2026
6e45502
fix(auth): guard unscoped traversal callbacks
Aug 19, 2026
47f6316
test(auth): isolate proxy callback regressions
Aug 19, 2026
f2e96c5
fix(auth): preserve trusted graph predicates
Aug 19, 2026
cfeff36
fix(auth): preserve space manager observer cleanup
Aug 19, 2026
abb7e7b
fix(auth): isolate traversal source strategies
Aug 19, 2026
b9799a0
fix(auth): reject disguised predicate callbacks
Aug 19, 2026
d361f3c
fix(auth): inspect where predicate callbacks
Aug 19, 2026
ef3472b
fix(auth): allow safe traversal requirements
Aug 19, 2026
d3d6d69
fix(auth): preserve negated graph predicates
Aug 19, 2026
95a3c4d
fix(auth): allow safe traversal options
Aug 19, 2026
71945d5
fix(hstore): clear schema metadata with graph
Aug 20, 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
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ root = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
max_line_length = 100
max_line_length = 120
ij_wrap_on_typing = true
ij_visual_guides = 100
ij_visual_guides = 120


[*.{java,xml,py}]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v5
# Refer: https://github.com/actions/dependency-review-action
with:
# TODO: reset critical to low before releasing
Expand Down
47 changes: 43 additions & 4 deletions .github/workflows/docker-build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ on:
- 'release-*'
pull_request:
paths:
- '**/Dockerfile*'
- '.github/workflows/docker-build-ci.yml'
- '.dockerignore'
- 'hugegraph-server/hugegraph-dist/docker/**'
- 'hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh'
- '.mvn/**'
- 'pom.xml'
- 'hugegraph-commons/**'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Important: Removing the old **/Dockerfile* filter leaves the repository's docker/hbase/** tree outside every pull_request.paths entry, although it still contains a Dockerfile, entrypoint, and HBase configuration. Changes to that image will no longer trigger Docker Build CI and can merge without any image validation. Please retain docker/hbase/** in the trigger or add a dedicated HBase build job with checks appropriate to that image.

- 'hugegraph-cluster-test/**'
- 'hugegraph-pd/**'
- 'hugegraph-store/**'
- 'hugegraph-struct/**'
- 'hugegraph-server/**'
- 'install-dist/**'

jobs:
docker-build:
Expand All @@ -47,7 +54,8 @@ jobs:

- name: Build ${{ matrix.dockerfile }}
run: |
IMAGE_ID=$(docker build -q -f ${{ matrix.dockerfile }} .)
IMAGE_ID=$(docker build -q --build-arg SOURCE_REVISION="$GITHUB_SHA" \
-f ${{ matrix.dockerfile }} .)
echo "Built: $IMAGE_ID"
echo "IMAGE_ID=$IMAGE_ID" >> "$GITHUB_ENV"
HC=$(docker inspect --format='{{json .Config.Healthcheck}}' "$IMAGE_ID")
Expand Down Expand Up @@ -78,3 +86,34 @@ jobs:
echo "ERROR: no usable socket-table tool (ss/netstat) in ${{ matrix.dockerfile }}"
exit 1
}

- name: Server image API versions match source
if: ${{ startsWith(matrix.dockerfile, 'hugegraph-server/') }}
run: |
CHECK_DIR=$(mktemp -d)
trap 'rm -rf "$CHECK_DIR"' EXIT
docker run --rm --entrypoint bash \
-v "$CHECK_DIR:/check" "$IMAGE_ID" -c \
'cp /hugegraph-server/lib/hugegraph-api-*.jar \
/hugegraph-server/lib/hugegraph-common-*.jar /check/'

API_JAR=$(find "$CHECK_DIR" -name 'hugegraph-api-*.jar' -print -quit)
COMMON_JAR=$(find "$CHECK_DIR" -name 'hugegraph-common-*.jar' -print -quit)
EXPECTED_MANIFEST=$(sed -n \
's|.*<Implementation-Version>\([^<]*\)</Implementation-Version>.*|\1|p' \
hugegraph-server/hugegraph-api/pom.xml)
ACTUAL_MANIFEST=$(unzip -p "$API_JAR" META-INF/MANIFEST.MF |
sed -n 's/^Implementation-Version: *//p' | tr -d '\r')
EXPECTED_PROPERTY=$(sed -n 's/^ApiVersion=//p' \
hugegraph-commons/hugegraph-common/src/main/resources/version.properties)
ACTUAL_PROPERTY=$(unzip -p "$COMMON_JAR" version.properties |
sed -n 's/^ApiVersion=//p' | tr -d '\r')

[[ "$ACTUAL_MANIFEST" == "$EXPECTED_MANIFEST" ]] || {
echo "ERROR: API manifest is $ACTUAL_MANIFEST; expected $EXPECTED_MANIFEST"
exit 1
}
[[ "$ACTUAL_PROPERTY" == "$EXPECTED_PROPERTY" ]] || {
echo "ERROR: API property is $ACTUAL_PROPERTY; expected $EXPECTED_PROPERTY"
exit 1
}
78 changes: 78 additions & 0 deletions .github/workflows/hbase-docker-build-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: "HBase Docker Build CI"

on:
push:
branches:
- master
- 'release-*'
paths:
- '.github/workflows/hbase-docker-build-ci.yml'
- 'docker/hbase/**'
pull_request:
paths:
- '.github/workflows/hbase-docker-build-ci.yml'
- 'docker/hbase/**'

jobs:
docker-build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate HBase entrypoint and config
run: |
bash -n docker/hbase/entrypoint.sh
python3 -c 'import xml.etree.ElementTree as ET; ET.parse("docker/hbase/hbase-site.xml")'

- name: Build HBase image
run: |
IMAGE_ID=$(docker build -q docker/hbase)
echo "Built: $IMAGE_ID"
ENTRYPOINT=$(docker inspect --format='{{json .Config.Entrypoint}}' "$IMAGE_ID")
echo "Entrypoint: $ENTRYPOINT"
[[ "$ENTRYPOINT" == '["/entrypoint.sh"]' ]] || {
echo "ERROR: unexpected HBase entrypoint: $ENTRYPOINT"
exit 1
}

CONTAINER_ID=$(docker run -d --hostname hbase "$IMAGE_ID")
cleanup() {
docker logs "$CONTAINER_ID" || true
docker rm -f "$CONTAINER_ID" || true
}
trap cleanup EXIT

for attempt in $(seq 1 240); do
if docker logs "$CONTAINER_ID" 2>&1 | grep -Fq "HBase is ready."; then
docker exec "$CONTAINER_ID" bash -lc \
'echo "status '\''simple'\''" | "$HBASE_HOME/bin/hbase" shell -n' \
| grep -E -q \
'([1-9][0-9]*[[:space:]]+live[[:space:]]+servers|[1-9][0-9]*[[:space:]]+servers|servers:[[:space:]]*[1-9])'
exit 0
fi
if [[ "$(docker inspect -f '{{.State.Running}}' "$CONTAINER_ID")" != "true" ]]; then
echo "ERROR: HBase container exited before readiness"
exit 1
fi
sleep 2
done
echo "ERROR: HBase container did not become ready within 480 seconds"
exit 1
2 changes: 1 addition & 1 deletion .serena/memories/code_style_and_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- `.licenserc.yaml` + apache-rat-plugin + skywalking-eyes — License header validation

## Core Rules
- **Line length**: 100 chars (120 for XML)
- **Line length**: 120 chars
- **Indent**: 4 spaces, continuation 8 spaces
- **Charset**: UTF-8, LF line endings, final newline
- **Imports**: Sorted `$*` → `java` → `javax` → `org` → `com` → `*`, no star imports (threshold 100)
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Before writing new tests, check existing suites under `hugegraph-server/hugegrap

## Style & Pre-commit

- Line 100, 4-space indent, LF, UTF-8, **no star imports**
- Line 120, 4-space indent, LF, UTF-8, **no star imports**
- Commit format: `feat|fix|refactor(module): msg`
- Run before pushing:
```bash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ For detailed architecture and development guidance, see [AGENTS.md](AGENTS.md).
- Try modifying a test and see what breaks

5. **Code Standards**
- Line length: 100 characters
- Line length: 120 characters
- Indentation: 4 spaces
- No star imports
- Commit format: `feat|fix|refactor(module): description`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# hugegraph-common follows the project version defined by ${revision} in the root pom.xml,
# and VersionInBash needs to be updated in this file.
Version=${revision}
ApiVersion=0.71
ApiVersion=0.72
ApiCheckBeginVersion=1.0
ApiCheckEndVersion=2.0
VersionInBash=1.7.0
2 changes: 1 addition & 1 deletion hugegraph-pd/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ HugeGraph PD follows Apache HugeGraph code style.

**Key Style Rules**:
- **Indentation**: 4 spaces (no tabs)
- **Line length**: 100 characters (Java), 120 characters (comments)
- **Line length**: 120 characters
- **Braces**: K&R style (opening brace on same line)
- **Imports**: No wildcard imports (`import java.util.*`)

Expand Down
5 changes: 3 additions & 2 deletions hugegraph-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ WORKDIR /pkg
COPY . .

ARG MAVEN_ARGS
ARG SOURCE_REVISION=local

RUN --mount=type=cache,target=/root/.m2 \
mvn package $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \
RUN --mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked \
mvn install $MAVEN_ARGS -e -B -ntp -Dmaven.test.skip=true -Dmaven.javadoc.skip=true \
&& rm ./hugegraph-server/*.tar.gz ./hugegraph-pd/*.tar.gz ./hugegraph-store/*.tar.gz

# 2nd stage: runtime env
Expand Down
5 changes: 3 additions & 2 deletions hugegraph-server/Dockerfile-hstore
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ WORKDIR /pkg
COPY . .

ARG MAVEN_ARGS
ARG SOURCE_REVISION=local

RUN --mount=type=cache,target=/root/.m2 \
mvn package $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true \
RUN --mount=type=cache,id=hugegraph-maven-${SOURCE_REVISION},target=/root/.m2,sharing=locked \
mvn install $MAVEN_ARGS -e -B -ntp -DskipTests -Dmaven.javadoc.skip=true \
&& rm ./hugegraph-server/*.tar.gz ./hugegraph-pd/*.tar.gz ./hugegraph-store/*.tar.gz

# 2nd stage: runtime env
Expand Down
4 changes: 2 additions & 2 deletions hugegraph-server/hugegraph-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@
</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<!-- TODO: update it -->
<Implementation-Version>0.71.0.0</Implementation-Version>
<!-- Bump when the public REST API contract changes -->
<Implementation-Version>0.72.0.0</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,20 +287,28 @@ public String checkDefaultRole(@Context GraphManager manager,
defaultRole = null; // unreachable, satisfies compiler
}
validGraphSpace(manager, graphSpace);
boolean hasGraph = defaultRole.equals(HugeDefaultRole.OBSERVER);
E.checkArgument(!hasGraph || StringUtils.isNotEmpty(graph),
"Must set a graph for observer");
boolean hasGraph = defaultRole.equals(HugeDefaultRole.OBSERVER) && StringUtils.isNotEmpty(graph);
if (hasGraph) {
validGraph(manager, graphSpace, graph);
}

boolean result;
if (hasGraph) {
result = authManager.isDefaultRole(graphSpace, graph, user,
defaultRole);
result = authManager.isDefaultRole(graphSpace, graph, user, defaultRole);
if (!result) {
result = authManager.isDefaultRole(graphSpace, user,
defaultRole);
}
} else {
result = authManager.isDefaultRole(graphSpace, user,
defaultRole);
result = authManager.isDefaultRole(graphSpace, user, defaultRole);
if (!result && defaultRole.equals(HugeDefaultRole.OBSERVER)) {
for (String currentGraph : manager.graphs(graphSpace)) {
if (authManager.isDefaultRole(graphSpace, currentGraph, user, defaultRole)) {
result = true;
break;
}
}
}
}
return manager.serializer().writeMap(ImmutableMap.of("check", result));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.hugegraph.api.API;
import org.apache.hugegraph.api.filter.StatusFilter.Status;
import org.apache.hugegraph.auth.AuthManager;
import org.apache.hugegraph.auth.HugeGraphAuthProxy;
import org.apache.hugegraph.auth.HugeUser;
import org.apache.hugegraph.auth.RolePermission;
import org.apache.hugegraph.backend.id.Id;
import org.apache.hugegraph.backend.id.IdGenerator;
import org.apache.hugegraph.core.GraphManager;
Expand Down Expand Up @@ -153,8 +156,14 @@ public String role(@Context GraphManager manager,
@PathParam("id") String id) {
LOG.debug("GraphSpace [{}] get user role: {}", graphSpace, id);

HugeUser user = manager.authManager().getUser(IdGenerator.of(id));
return manager.authManager().rolePermission(user).toJson();
AuthManager authManager = manager.authManager();
HugeUser user = authManager.getUser(IdGenerator.of(id));
RolePermission role = authManager.rolePermission(user);
String operator = HugeGraphAuthProxy.username();
if (authManager.isAdminManager(operator)) {
return role.toJson();
}
return role.toJson(graphSpace);
}

@DELETE
Expand Down
Loading