imbajin commented on code in PR #3326:
URL: https://github.com/apache/hugegraph/pull/3326#discussion_r4324662611
##########
.github/workflows/check-dependencies.yml:
##########
@@ -3,66 +3,147 @@ name: "3rd-party"
on:
workflow_call:
+ inputs:
+ submit-baseline:
+ type: boolean
+ default: false
+ check-inventory:
+ type: boolean
+ default: true
+ outputs:
+ artifact_id:
+ value: ${{ jobs.dependency-check.outputs.artifact_id }}
+ inventory_artifact_id:
+ value: ${{ jobs.dependency-check.outputs.inventory_artifact_id }}
permissions:
contents: read
jobs:
dependency-check:
+ name: dependency-check
runs-on: ubuntu-24.04
+ # Preserve the existing inventory job budget; baseline-only builds keep
their 60-minute limit.
+ timeout-minutes: ${{ inputs.check-inventory && 360 || 60 }}
+ outputs:
+ artifact_id: ${{ steps.snapshot.outputs.artifact-id }}
+ inventory_artifact_id: ${{ steps.inventory.outputs.artifact-id }}
env:
USE_STAGE: 'false' # Whether to include the stage repository.
SCRIPT_DEPENDENCY: install-dist/scripts/dependency
PYTHONDONTWRITEBYTECODE: '1' # Keep generated Python caches out of
source style checks.
+ INPUT_TOKEN: ''
+ GITHUB_TOKEN: ''
+ GH_TOKEN: ''
steps:
- name: Checkout source
- uses: actions/checkout@v7
+ id: checkout
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #
v7.0.1
+ with:
+ ref: ${{ github.sha }}
+ persist-credentials: false
- name: Set up project JDK
- uses: actions/setup-java@v6
+ uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 #
v6.0.1
with:
java-version-file: .github/workflows/.java-version
distribution: 'temurin'
+ cache: maven
- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
- cp $HOME/.m2/settings.xml /tmp/settings.xml
- mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
+ cp "$HOME/.m2/settings.xml" /tmp/settings.xml
+ mv -vf .github/configs/settings.xml "$HOME/.m2/settings.xml"
- name: Test shared foundation checks
+ if: inputs.check-inventory
run: python3 -m unittest discover -s
install-dist/scripts/shared-foundation -p 'test_*.py'
- name: Test dependency inventory producer and checker
run: python3 -m unittest discover -s install-dist/scripts/dependency
-p 'test_*.py'
+ - name: Verify baseline checkout and current master
+ if: inputs.submit-baseline
+ env:
+ EXPECTED_SHA: ${{ github.sha }}
+ run: |
+ test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
+ test "$(git ls-remote origin refs/heads/master | cut -f1)" =
"$EXPECTED_SHA"
Review Comment:
Confirmed and fixed with a smaller trigger change instead of introducing
freshness outputs and per-step gating. Baseline production now runs only for
trusted master pushes and the explicit manual `dependencies` preset. Manual
`mainline` and `full` runs retain their full test selections, reactor build and
inventory checks, but never enter the baseline freshness checks or start its
isolated writer.
This removes one writer runner from each of those manual runs and prevents
master advancement from skipping or failing their inventory checks. Strict
freshness failures remain for master pushes and explicit baseline requests. The
existing selection regression covers both manual presets; CI policy tests,
actionlint, Java 17 formatting and clean compilation pass.
--
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]