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


##########
.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:
   Fixed in the current update. A `push` with an all-zero `before` and a valid 
nonzero `after` now emits an explicit notice and skips only the before/after 
RocksDB comparison, since a newly created ref has no previous revision. Normal 
push and PR comparisons still run; malformed revisions and an all-zero PR base 
still fail. The regression executes the actual Bash guard and checks that all 
downstream comparison steps follow its result. No additional job or runner is 
introduced.



-- 
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