-
Notifications
You must be signed in to change notification settings - Fork 62
This merge brings the full 1.1-dev integration stream into the 1.1 line so ONgDB 1.1 can ship enterprise capabilities on top of the community core with public, reproducible CI and audited release controls. #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e6e8642
889a504
0a99767
4edbee8
137ad28
0d518cf
20ea4e1
cf828d9
a2bcc0e
2ee207b
e827358
f857095
704bdf8
893c1dc
4179f5c
5af6cc2
61a93e0
9d98b49
ffdefc4
4ab8778
37369a5
9e2eb06
b721814
c436c55
9ce12bf
d3573a3
07039fe
8a52325
102435a
73e1bdb
ae3e4cf
1e2f8a8
71418d5
d10eaf8
fc094e9
ef02b48
78caa78
1b5e911
da53977
e64b2f0
2e248dd
8a8d24b
bea6d05
700fc28
49f60a2
9c0b983
f59a915
ebca79b
c6783b5
36741bf
99ba55c
972eb13
a22df83
edd8a2d
c1e087a
6373a7e
93b11e9
958b18d
daffa87
f9c4672
e07dd9f
ea59d27
32fe2cd
4f64fa5
9e50219
b31f816
e767a91
1400f52
708f298
d51564e
d11b8d8
50861d1
fe58043
2c9e5a3
fbe0b07
2052cf3
3499e67
11995e3
c199a94
0e3cf32
723df04
0b87d86
2d2a6eb
1ad0d47
52cf8a0
1ec6710
032e67b
2b4b7da
7ccadec
3891e94
c0fa39d
a210a6d
b3a0788
00647a5
e17c9c1
dac43e2
65f5779
191ff15
d737cb9
7419d44
fef6a0f
cd10a69
02c566a
e041e61
1ef8f82
b2715ff
fe68ab3
49bb534
ac6429b
6a67518
22c673a
7f19efe
604818d
b75ccaf
c4db053
ef78bcc
9e6cf32
344d84d
7bf0cdd
2567b71
2c320f6
670a156
1925aa0
8f6b442
d7892e1
eebc9be
dd8a095
82c2e0e
474d1e3
6e692be
5e9a884
84a6f2f
505afd1
9c5a3d0
57173b9
5884edb
65d727e
5ae933a
6763967
4bc6a45
05009aa
78bcfa8
46f2979
e5e9e8b
47dbac8
a991105
96c44e3
dcac089
ed7fb11
3c9102f
9f8763d
9b531c9
ccc37e2
ca173e5
d8baf47
7f0938b
ab0c6de
38c0e2a
ec18a12
4bbf8c5
02534e9
4e540ba
d904778
a20081f
dd59419
bfd44fc
bc57e9e
0734338
a6bb71d
e54ccb6
3a98c7d
1ecb35f
2adc22d
03f745f
63f4420
344a257
8282181
91fa0ed
d4a26a4
24892f4
d7d473f
14ff937
dd676a9
3791fcb
0038b23
bd244b4
91b26e1
63b0504
781cb7d
df5fa18
243b8c7
21ba2f2
d9c1b55
1f3661f
853e585
587d954
77d8e66
94d506b
2cf4609
d9e60a9
3d3d97c
a5eacc1
8763376
fadece1
6b30d2a
adc9c34
fbe7feb
4bfc863
34aa64e
31dc01c
c5273e9
9ffe33d
d6e6ec3
8942b83
f156bc6
74445fd
5f32485
647c475
6e7a102
18557a3
491f84e
f4e7bad
debfc32
12f2049
163a48a
f05abb6
51e5cd5
e6930eb
bc3aa3e
88c5e04
90c485b
59591ad
939b913
24c992f
baf4574
189ab18
f01009d
9d6b15c
2689bb5
8653e4d
aee72a1
42879a2
9157d50
e0f5b99
2e5e7e8
7d6a2a9
1f28a5d
864ade9
d296273
8178ede
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # ONgDB branch model and CI gates | ||
|
|
||
| Public repository: [`graphfoundation/ongdb`](https://github.com/graphfoundation/ongdb). | ||
|
|
||
| | Ref | Purpose | Required CI | Produces release? | | ||
| |-----|---------|-------------|-------------------| | ||
| | `*-dev` (e.g. `1.1-dev`) | Integration | **`dev-quality-gate`** (module-aware) | **No** | | ||
| | Release lines `1.0` / `1.1` / `2.0` | Audited ship lines | **`full-reactor`** + nightly | Tags only | | ||
| | Tags `1.1.*` | Immutable release pointer | `release.yml` + Environment `release` | Yes | | ||
|
|
||
| Details: ongdb-dev [CI-BRANCH-STRATEGY.md](https://github.com/graphfoundation/ongdb-dev) (docs) / product scripts under `.github/scripts/`. | ||
|
|
||
| ## Flow | ||
|
|
||
| 1. Optional: push WIP to private remote `dev` (`graphfoundation/ongdb-dev`). | ||
| 2. PR into **`1.1-dev`** → `dev-quality-gate` (changed modules + `-am`/`-amd`, or full if blast radius is large). | ||
| 3. Audit PR **`1.1-dev` → `1.1`** → must pass **`full-reactor`**. | ||
| 4. Tag `1.1.x` / `1.1.0-rc01` from `1.1` → approve Environment **`release`**. | ||
|
|
||
| **Invariant:** GitHub Release assets come only from a tag on protected `1.1` after Environment approval. Nightly snapshots are not releases. | ||
|
|
||
| ## Repository settings | ||
|
|
||
| ```bash | ||
| .github/scripts/apply-github-settings.sh | ||
| ``` | ||
|
|
||
| That script sets: | ||
|
|
||
| - Release branches `1.0`, `1.1`, `2.0` → require `full-reactor` | ||
| - Dev branches `1.0-dev`, `1.1-dev`, `2.0-dev` → require `dev-quality-gate` | ||
| - Environment `release` with required reviewer | ||
|
|
||
| **Nightly cron:** loaded from the repo **default** branch; builds matrix `1.0`, `1.1`, `2.0`. | ||
|
|
||
| ## Tag discipline | ||
|
|
||
| ```bash | ||
| git fetch origin 1.1 | ||
| git checkout 1.1 && git pull --ff-only origin 1.1 | ||
| # versions:set to match tag, then: | ||
| git tag -a 1.1.0-rc01 -m "ONgDB 1.1.0-rc01" | ||
| git push origin 1.1.0-rc01 | ||
| ``` | ||
|
|
||
| `release.yml` fails if the tagged commit is not an ancestor of `origin/1.1`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Release-sensitive paths require review from maintainers on PRs into protected | ||
| # release lines (e.g. 1.1). Update the owner list when the maintainer team changes. | ||
| # Docs: .github/BRANCHING.md | ||
|
|
||
| * @bradnussbaum | ||
|
|
||
| /.github/ @bradnussbaum | ||
| /enterprise/ @bradnussbaum | ||
| /packaging/ @bradnussbaum |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| #!/usr/bin/env bash | ||
| # Apply branch protection for release vs dev lines on graphfoundation/ongdb. | ||
| # Requires: gh auth with admin on the repo. | ||
| set -euo pipefail | ||
|
|
||
| REPO="${REPO:-graphfoundation/ongdb}" | ||
| REVIEWER_LOGIN="${RELEASE_REVIEWER:-$(gh api user --jq .login)}" | ||
| REVIEWER_ID="$(gh api "users/${REVIEWER_LOGIN}" --jq .id)" | ||
|
|
||
| echo "Applying settings to ${REPO}" | ||
| gh api user --jq .login >/dev/null | ||
|
|
||
| protect_release() { | ||
| local branch="$1" | ||
| echo "Release protection: ${branch} (require full-reactor)" | ||
| gh api -X PUT "repos/${REPO}/branches/${branch}/protection" --input - <<EOF | ||
| { | ||
| "required_status_checks": { | ||
| "strict": true, | ||
| "contexts": ["full-reactor"] | ||
| }, | ||
| "enforce_admins": true, | ||
| "required_pull_request_reviews": { | ||
| "required_approving_review_count": 1, | ||
| "dismiss_stale_reviews": true, | ||
| "require_code_owner_reviews": true | ||
| }, | ||
| "restrictions": null, | ||
| "allow_force_pushes": false, | ||
| "allow_deletions": false, | ||
| "required_conversation_resolution": true | ||
| } | ||
| EOF | ||
| } | ||
|
|
||
| protect_dev() { | ||
| local branch="$1" | ||
| echo "Dev protection: ${branch} (require dev-quality-gate)" | ||
| gh api -X PUT "repos/${REPO}/branches/${branch}/protection" --input - <<EOF | ||
| { | ||
| "required_status_checks": { | ||
| "strict": true, | ||
| "contexts": ["dev-quality-gate"] | ||
| }, | ||
| "enforce_admins": false, | ||
| "required_pull_request_reviews": null, | ||
| "restrictions": null, | ||
| "allow_force_pushes": false, | ||
| "allow_deletions": false | ||
| } | ||
| EOF | ||
| } | ||
|
|
||
| for b in 1.0 1.1 2.0; do | ||
| protect_release "$b" || echo "WARN: could not protect ${b} (branch missing?)" | ||
| done | ||
|
|
||
| for b in 1.0-dev 1.1-dev 2.0-dev; do | ||
| protect_dev "$b" || echo "WARN: could not protect ${b} (branch missing?)" | ||
| done | ||
|
|
||
| gh api -X PUT "repos/${REPO}/environments/release" --input - <<EOF | ||
| { | ||
| "wait_timer": 0, | ||
| "prevent_self_review": false, | ||
| "reviewers": [ | ||
| {"type": "User", "id": ${REVIEWER_ID}} | ||
| ], | ||
| "deployment_branch_policy": null | ||
| } | ||
| EOF | ||
| echo "Environment 'release' ensured with reviewer @${REVIEWER_LOGIN}." | ||
| echo | ||
| echo "Manual: Org Billing → Actions spend budget (larger runners \$0)." | ||
| echo "Ensure nightly.yml + full-reactor-public.yml exist on each release line (or default branch)." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| #!/usr/bin/env bash | ||
| # Map git changes to Maven module paths for -pl / -am / -amd. | ||
| # Usage: changed-maven-modules.sh <base-ref> | ||
| # Writes to GITHUB_OUTPUT (if set) and stdout: | ||
| # mode=skip|affected|full | ||
| # modules=path1,path2 (only when mode=affected) | ||
| set -euo pipefail | ||
|
|
||
| BASE_REF="${1:?Usage: $0 <base-ref>}" | ||
|
|
||
| if ! git rev-parse --verify "$BASE_REF" >/dev/null 2>&1; then | ||
| echo "Base ref not found: $BASE_REF — defaulting to full reactor" >&2 | ||
| MODE=full | ||
| MODULES= | ||
| else | ||
| mapfile -t CHANGED < <(git diff --name-only "$BASE_REF"...HEAD | sed '/^$/d' || true) | ||
|
|
||
| if [[ ${#CHANGED[@]} -eq 0 ]]; then | ||
| MODE=skip | ||
| MODULES= | ||
| else | ||
| declare -A MOD_SET=() | ||
| FORCE_FULL=0 | ||
| ONLY_DOCS=1 | ||
|
|
||
| for f in "${CHANGED[@]}"; do | ||
| case "$f" in | ||
| *.md|*.adoc|*.txt|LICENSE*|NOTICE*|COPYRIGHT*|.gitignore) | ||
| continue | ||
| ;; | ||
| .github/workflows/*|.github/scripts/*|pom.xml|build-resources/*) | ||
| FORCE_FULL=1 | ||
| ONLY_DOCS=0 | ||
| ;; | ||
| *) | ||
| ONLY_DOCS=0 | ||
| ;; | ||
| esac | ||
|
|
||
| # Walk up to nearest directory containing pom.xml (module root) | ||
| dir="$(dirname "$f")" | ||
| while [[ "$dir" != "." && "$dir" != "/" ]]; do | ||
| if [[ -f "${dir}/pom.xml" ]]; then | ||
| # Root pom → full reactor | ||
| if [[ "$dir" == "." ]]; then | ||
| FORCE_FULL=1 | ||
| else | ||
| MOD_SET["$dir"]=1 | ||
| fi | ||
| break | ||
| fi | ||
| parent="$(dirname "$dir")" | ||
| [[ "$parent" == "$dir" ]] && break | ||
| dir="$parent" | ||
| done | ||
| if [[ -f pom.xml && ( "$f" == pom.xml || "$dir" == "." ) ]]; then | ||
| if [[ "$f" == pom.xml ]]; then | ||
| FORCE_FULL=1 | ||
| fi | ||
| fi | ||
| done | ||
|
|
||
| if [[ "$ONLY_DOCS" -eq 1 ]]; then | ||
| MODE=skip | ||
| MODULES= | ||
| elif [[ "$FORCE_FULL" -eq 1 ]]; then | ||
| MODE=full | ||
| MODULES= | ||
| else | ||
| MODULES="$(printf '%s\n' "${!MOD_SET[@]}" | sort | paste -sd, -)" | ||
| if [[ -z "$MODULES" ]]; then | ||
| MODE=full | ||
| else | ||
| # Cap: too many modules → full reactor is simpler/faster than huge -pl lists | ||
| COUNT="$(awk -F',' '{print NF}' <<<"$MODULES")" | ||
| if [[ "$COUNT" -gt 25 ]]; then | ||
| MODE=full | ||
| MODULES= | ||
| else | ||
| MODE=affected | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
| echo "mode=${MODE}" | ||
| echo "modules=${MODULES}" | ||
| if [[ -n "${GITHUB_OUTPUT:-}" ]]; then | ||
| echo "mode=${MODE}" >> "$GITHUB_OUTPUT" | ||
| echo "modules=${MODULES}" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #!/usr/bin/env bash | ||
| # Smoke-test an ONgDB standalone unix tarball: extract, start, wait for HTTP, stop. | ||
| set -euo pipefail | ||
|
|
||
| TARBALL="${1:?Usage: tarball-smoke.sh <ongdb-*-unix.tar.gz>}" | ||
| if [[ ! -f "$TARBALL" ]]; then | ||
| echo "Tarball not found: $TARBALL" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| WORKDIR="$(mktemp -d)" | ||
| cleanup() { | ||
| if [[ -n "${ONGDB_HOME:-}" && -x "${ONGDB_HOME}/bin/ongdb" ]]; then | ||
| "${ONGDB_HOME}/bin/ongdb" stop || true | ||
| fi | ||
| rm -rf "$WORKDIR" | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| tar -xzf "$TARBALL" -C "$WORKDIR" | ||
| ONGDB_HOME="$(find "$WORKDIR" -mindepth 1 -maxdepth 1 -type d | head -n 1)" | ||
| if [[ -z "$ONGDB_HOME" || ! -x "${ONGDB_HOME}/bin/ongdb" ]]; then | ||
| echo "Could not locate bin/ongdb under extracted tarball" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Starting ONgDB from ${ONGDB_HOME}" | ||
| "${ONGDB_HOME}/bin/ongdb" start | ||
|
|
||
| HTTP_PORT=7474 | ||
| ATTEMPTS=0 | ||
| RETRIES=90 | ||
| STATUS=0 | ||
| until [[ "$STATUS" == "200" ]]; do | ||
| ATTEMPTS=$((ATTEMPTS + 1)) | ||
| STATUS="$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 1 --max-time 3 \ | ||
| "http://127.0.0.1:${HTTP_PORT}" || echo 0)" | ||
| if [[ "$ATTEMPTS" -gt "$RETRIES" ]]; then | ||
| echo "ONgDB did not become ready on :${HTTP_PORT} within ${RETRIES}s (last status=${STATUS})" >&2 | ||
| "${ONGDB_HOME}/bin/ongdb" status || true | ||
| exit 1 | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| echo "ONgDB HTTP ready (status ${STATUS}) after ${ATTEMPTS}s" | ||
| "${ONGDB_HOME}/bin/ongdb" stop | ||
| echo "Tarball smoke OK: $(basename "$TARBALL")" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # Full-reactor CI — required on release lines (1.0, 1.1, 2.0). | ||
| # Also runs on pushes to those branches. Dev lines use pr-dev.yml instead. | ||
| # See ongdb-dev/ongdb-11/CI-BRANCH-STRATEGY.md | ||
|
|
||
| name: Public full reactor | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '1.0' | ||
| - '1.1' | ||
| - '2.0' | ||
| pull_request: | ||
| branches: | ||
| - '1.0' | ||
| - '1.1' | ||
| - '2.0' | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch: | ||
| description: Optional branch to build (defaults to event branch) | ||
| required: false | ||
| type: string | ||
|
|
||
| concurrency: | ||
| group: full-reactor-${{ github.repository }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| MAVEN_OPTS: -Xmx4g | ||
| JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 | ||
|
|
||
| jobs: | ||
| full-reactor: | ||
| if: github.repository == 'graphfoundation/ongdb' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 480 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Resolve checkout ref | ||
| id: target | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ inputs.branch }}" ]]; then | ||
| ref="${{ inputs.branch }}" | ||
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
| ref="${{ github.head_ref }}" | ||
| else | ||
| ref="${GITHUB_REF_NAME}" | ||
| fi | ||
| echo "ref=${ref}" >> "$GITHUB_OUTPUT" | ||
| echo "Selected ref: ${ref}" | ||
|
|
||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ steps.target.outputs.ref }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fork PR checkout uses head refMedium Severity For Reviewed by Cursor Bugbot for commit 1f28a5d. Configure here. |
||
|
|
||
| - name: Raise open file limit | ||
| run: ulimit -n 40000 && ulimit -n | ||
|
|
||
| - name: Resolve Java version for branch | ||
| id: java | ||
| run: | | ||
| set -euo pipefail | ||
| java_version="8" | ||
| case "${{ steps.target.outputs.ref }}" in | ||
| 2.*) | ||
| java_version="11" | ||
| ;; | ||
| esac | ||
| echo "version=${java_version}" >> "$GITHUB_OUTPUT" | ||
| echo "Using Java ${java_version}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong Java on PR buildsHigh Severity For pull requests, the workflow determines the Java version based on the PR's source branch ( Reviewed by Cursor Bugbot for commit d296273. Configure here. |
||
|
|
||
| - name: Set up JDK | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| java-version: ${{ steps.java.outputs.version }} | ||
| distribution: temurin | ||
| cache: maven | ||
|
|
||
| - name: Full reactor clean install | ||
| run: | | ||
| set -euo pipefail | ||
| mvn -B -Drevapi.skip=true clean install | tee full-reactor-build.log | ||
|
|
||
| - name: Upload full-reactor artifacts and logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: full-reactor-${{ steps.target.outputs.ref }}-${{ github.run_id }} | ||
| path: | | ||
| full-reactor-build.log | ||
| **/target/surefire-reports/** | ||
| **/target/failsafe-reports/** | ||
| packaging/standalone/target/ongdb-community-*-unix.tar.gz | ||
| packaging/standalone/target/ongdb-enterprise-*-unix.tar.gz | ||
| packaging/standalone/target/ongdb-community-*-windows.zip | ||
| packaging/standalone/target/ongdb-enterprise-*-windows.zip | ||
| if-no-files-found: ignore | ||
| retention-days: 30 | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Txt changes skip Maven gate
Medium Severity
The dev gate treats every
*.txtpath (including moduleLICENSES.txt/NOTICE.txt) as non-build documentation. If a PR changes only those files,mode=skipandpr-dev.ymlcompletes without running Maven, even when licensing or packaging checks would fail a full build.Reviewed by Cursor Bugbot for commit d296273. Configure here.