imbajin commented on code in PR #3326:
URL: https://github.com/apache/hugegraph/pull/3326#discussion_r4306458763


##########
.github/actions/rocksdb-compatibility/action.yml:
##########
@@ -0,0 +1,73 @@
+#
+# 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: RocksDB version compatibility
+description: Compare exact before/after RocksDB versions on an existing 
distributed CI runner
+runs:
+  using: composite
+  steps:
+    - name: Require exact comparison revisions
+      shell: bash
+      env:
+        BEFORE_SHA: ${{ github.event.pull_request.base.sha || 
github.event.before || github.sha }}
+        AFTER_SHA: ${{ github.event.pull_request.head.sha || 
github.event.after || github.sha }}
+      run: |
+        for revision in "$BEFORE_SHA" "$AFTER_SHA"; do
+          if [[ ! "$revision" =~ ^[0-9a-f]{40}$ || "$revision" =~ ^0+$ ]]; then

Review Comment:
   ⚠️ Important. Blocking: no. Summary: On the first push that creates a 
matching `release-*`, `test-*` or `tinkerpop-*` branch, `github.event.before` 
is the all-zero SHA. The coordinator's diff fails and falls back to mainline 
checks, so this action runs but this guard rejects the before SHA before 
comparison. Please handle the created-ref case by comparing from the new 
commit's parent or skip the comparison with an explicit notice; add a 
regression for the zero `before` value. Evidence: the exact-head 
`server-ci.yml` push filter includes these branches, and 
`ci-policy.py:create_plan()` diffs against `event.before` then falls back to 
mainline if that diff fails. GitHub documents `before` as the pre-push SHA, and 
Git documents the all-zero old OID for a newly created ref: 
https://docs.github.com/en/webhooks/webhook-events-and-payloads#push and 
https://git-scm.com/docs/githooks/2.46.0.html#_pre_receive.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to