Skip to content

Commit 7e97883

Browse files
Merge branch 'flowvault-release/26.8.1' into flowvault-release/26.8.1.1
2 parents 0abbbb4 + 53bcb86 commit 7e97883

45 files changed

Lines changed: 5897 additions & 3592 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@
108108
"deserialised",
109109
"unmodelled",
110110
"recordss",
111-
"rarr"
111+
"rarr",
112+
"servname",
113+
"nodename"
112114
],
113115
"languageSettings": [
114116
{

.github/workflows/beta-release.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/contract-tests.yml

Lines changed: 69 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,24 @@ on:
55
branches:
66
- main
77
- release/*
8+
- flowvault-release/*
89

910
jobs:
1011
contract-tests:
11-
name: Contract Tests
12+
# One job per module so a break in one is reported against that module by name,
13+
# and both still run even when the other fails.
14+
name: Contract Tests (${{ matrix.module }})
1215
runs-on: ubuntu-latest
1316

17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- module: skyvault
22+
artifact: skyflow-java
23+
- module: flowvault
24+
artifact: skyflow-flowvault-java
25+
1426
permissions:
1527
contents: read
1628
pull-requests: write
@@ -29,29 +41,31 @@ jobs:
2941
cache: 'maven'
3042

3143
- name: Verify API surface snapshot
32-
run: mvn -B install -pl common,skyvault -am -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true
44+
run: mvn -B install -pl common,${{ matrix.module }} -am -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true
3345

3446
- name: Show API surface diff
3547
if: failure()
3648
run: |
37-
echo "### API surface changes detected ###"
38-
echo "See skyvault/target/japicmp/default-cli.diff for the full comparison against skyvault/api-report/skyflow-java.baseline.jar."
39-
echo "If this change is intentional, run scripts/contract-snapshot-update.sh and commit the updated baseline jar."
49+
echo "### API surface changes detected in ${{ matrix.module }} ###"
50+
echo "Compared against ${{ matrix.module }}/api-report/${{ matrix.artifact }}.baseline.jar."
51+
echo "If this change is intentional, run:"
52+
echo " scripts/contract-snapshot-update.sh ${{ matrix.module }}"
53+
echo "and commit the updated baseline jar."
4054
echo ""
41-
cat skyvault/target/japicmp/default-cli.diff || true
55+
cat ${{ matrix.module }}/target/japicmp/default-cli.diff || true
4256
4357
- name: Upload API surface diff on failure
4458
if: failure()
4559
uses: actions/upload-artifact@v4
4660
with:
47-
name: api-surface-diff
48-
path: skyvault/target/japicmp/**
61+
name: api-surface-diff-${{ matrix.module }}
62+
path: ${{ matrix.module }}/target/japicmp/**
4963
retention-days: 7
5064

5165
# The step above only shows a diff when the CURRENT build differs from the
5266
# committed baseline - once someone runs contract-snapshot-update.sh and
5367
# commits the refreshed baseline jar, that check goes green and shows nothing.
54-
# A reviewer looking at a green PR that touches api-report/skyflow-java.baseline.jar
68+
# A reviewer looking at a green PR that touches api-report/*.baseline.jar
5569
# (a binary file) would otherwise have no way to see WHAT was just approved as
5670
# the new contract. These steps explicitly diff the OLD committed baseline
5771
# (from the PR's base branch) against the NEW committed baseline (from this PR)
@@ -61,40 +75,74 @@ jobs:
6175
if: always() && github.event.pull_request
6276
run: |
6377
git fetch origin "${{ github.event.pull_request.base.ref }}" --depth=1
64-
if git diff --name-only "origin/${{ github.event.pull_request.base.ref }}" HEAD -- skyvault/api-report/skyflow-java.baseline.jar | grep -q .; then
78+
BASELINE="${{ matrix.module }}/api-report/${{ matrix.artifact }}.baseline.jar"
79+
if ! git diff --name-only "origin/${{ github.event.pull_request.base.ref }}" HEAD -- "$BASELINE" | grep -q .; then
80+
echo "changed=false" >> "$GITHUB_OUTPUT"
81+
elif git cat-file -e "origin/${{ github.event.pull_request.base.ref }}:$BASELINE" 2>/dev/null; then
6582
echo "changed=true" >> "$GITHUB_OUTPUT"
6683
else
67-
echo "changed=false" >> "$GITHUB_OUTPUT"
84+
# Added by this PR rather than modified: the module is getting its
85+
# first baseline. git diff reports an addition as a change, but there
86+
# is no old snapshot to `git show`, so a plain "true" here would send
87+
# the next step into `git show <base>:<path>` and exit 128.
88+
echo "changed=new" >> "$GITHUB_OUTPUT"
6889
fi
6990
7091
- name: Diff old vs new contract baseline
71-
if: always() && steps.baseline-diff-check.outputs.changed == 'true'
92+
if: always() && (steps.baseline-diff-check.outputs.changed == 'true' || steps.baseline-diff-check.outputs.changed == 'new')
7293
run: |
94+
BASELINE="${{ matrix.module }}/api-report/${{ matrix.artifact }}.baseline.jar"
95+
96+
if [ "${{ steps.baseline-diff-check.outputs.changed }}" = "new" ]; then
97+
{
98+
echo "\`$BASELINE\` is **new in this PR** - \`${{ matrix.module }}\` had no committed baseline before, so there is nothing to diff against."
99+
echo ""
100+
echo "This snapshot becomes the approved contract: every later PR is compared against it, and any incompatible change fails the \`Contract Tests (${{ matrix.module }})\` job until someone regenerates it deliberately. Review it as the starting point, not as a change."
101+
} > /tmp/contract-baseline-diff.md
102+
cat /tmp/contract-baseline-diff.md
103+
exit 0
104+
fi
105+
73106
curl -sL -o /tmp/japicmp-cli.jar "https://repo.maven.apache.org/maven2/com/github/siom79/japicmp/japicmp/0.26.0/japicmp-0.26.0-jar-with-dependencies.jar"
74-
mvn -q -B dependency:build-classpath -pl skyvault -Dmdep.outputFile=/tmp/skyvault-classpath.txt -Dmaven.javadoc.skip=true -Dgpg.skip=true
75-
git show "origin/${{ github.event.pull_request.base.ref }}:skyvault/api-report/skyflow-java.baseline.jar" > /tmp/old-baseline.jar
107+
mvn -q -B dependency:build-classpath -pl ${{ matrix.module }} -Dmdep.outputFile=/tmp/module-classpath.txt -Dmaven.javadoc.skip=true -Dgpg.skip=true
108+
git show "origin/${{ github.event.pull_request.base.ref }}:$BASELINE" > /tmp/old-baseline.jar
76109
110+
# Same allowlist the poms gate on, so the comment shows the contract and
111+
# nothing else. Keep these in sync with the <includes> in the module poms.
77112
java -jar /tmp/japicmp-cli.jar \
78113
-o /tmp/old-baseline.jar \
79-
-n skyvault/api-report/skyflow-java.baseline.jar \
114+
-n "$BASELINE" \
80115
-a protected \
81-
-e "com.skyflow.generated.*;com.skyflow.utils.*" \
82-
--old-classpath "$(cat /tmp/skyvault-classpath.txt)" \
83-
--new-classpath "$(cat /tmp/skyvault-classpath.txt)" \
116+
-i "com.skyflow.Skyflow;com.skyflow.config;com.skyflow.enums;com.skyflow.errors;com.skyflow.serviceaccount.util;com.skyflow.vault.audit;com.skyflow.vault.bin;com.skyflow.vault.connection;com.skyflow.vault.controller;com.skyflow.vault.data;com.skyflow.vault.detect;com.skyflow.vault.tokens" \
117+
--old-classpath "$(cat /tmp/module-classpath.txt)" \
118+
--new-classpath "$(cat /tmp/module-classpath.txt)" \
84119
-m \
120+
--ignore-missing-classes \
85121
--markdown > /tmp/contract-baseline-diff.md || true
86122
87123
cat /tmp/contract-baseline-diff.md
88124
89125
- name: Comment contract baseline change on PR
90-
if: always() && steps.baseline-diff-check.outputs.changed == 'true'
126+
if: always() && (steps.baseline-diff-check.outputs.changed == 'true' || steps.baseline-diff-check.outputs.changed == 'new')
91127
uses: actions/github-script@v7
128+
env:
129+
BASELINE_STATE: ${{ steps.baseline-diff-check.outputs.changed }}
92130
with:
93131
script: |
94132
const fs = require('fs');
133+
const module = '${{ matrix.module }}';
134+
const artifact = '${{ matrix.artifact }}';
95135
const summary = fs.readFileSync('/tmp/contract-baseline-diff.md', 'utf8');
96-
const marker = '<!-- contract-baseline-diff -->';
97-
const body = `${marker}\n## Contract baseline change detected\n\nThis PR updates \`skyvault/api-report/skyflow-java.baseline.jar\` (the approved public API contract). Here is exactly what it changes, comparing the baseline on \`${{ github.event.pull_request.base.ref }}\` against the baseline committed in this PR:\n\n${summary}`;
136+
// per-module marker so the two matrix jobs update their own comment
137+
const marker = `<!-- contract-baseline-diff:${module} -->`;
138+
const isNew = process.env.BASELINE_STATE === 'new';
139+
const heading = isNew
140+
? `## Contract baseline added (\`${module}\`)`
141+
: `## Contract baseline change detected (\`${module}\`)`;
142+
const preamble = isNew
143+
? `This PR adds \`${module}/api-report/${artifact}.baseline.jar\`, the approved public API contract for this module.`
144+
: `This PR updates \`${module}/api-report/${artifact}.baseline.jar\` (the approved public API contract). Here is exactly what it changes, comparing the baseline on \`${{ github.event.pull_request.base.ref }}\` against the baseline committed in this PR:`;
145+
const body = `${marker}\n${heading}\n\n${preamble}\n\n${summary}`;
98146
const { data: comments } = await github.rest.issues.listComments({
99147
owner: context.repo.owner,
100148
repo: context.repo.repo,

.github/workflows/internal-release.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,45 @@
11
name: Publish module to the JFROG Artifactory
22
on:
33
push:
4+
# '**' not '*.*': Actions glob '*' does not match '/', so '*.*' let slash
5+
# tags (flowvault/v1.0.0) through and fired this branch-only workflow.
46
tags-ignore:
5-
- '*.*'
7+
- '**'
68
paths-ignore:
79
- "*.md"
810
branches:
9-
- release/*
1011
- flowvault-release/*
12+
- skyvault-release/*
13+
# Legacy: predates the per-module naming, still maps to skyvault.
14+
- release/*
1115

1216
jobs:
1317
resolve-module:
1418
runs-on: ubuntu-latest
19+
# Skip our own bump commit, or this loops: bump -> push -> release -> bump.
20+
# PAT-authenticated pushes DO trigger workflows; GITHUB_TOKEN pushes do not.
21+
# build-and-deploy needs this job, so skipping here skips the run.
22+
if: ${{ !contains(github.event.head_commit.message, '[AUTOMATED]') }}
1523
outputs:
1624
module: ${{ steps.set-module.outputs.module }}
1725
steps:
26+
# Explicit match, no catch-all: defaulting once published the wrong module.
1827
- name: Resolve module from branch name
1928
id: set-module
29+
env:
30+
BRANCH: ${{ github.ref_name }}
2031
run: |
21-
if [[ "${{ github.ref_name }}" == flowvault-release/* ]]; then
22-
echo "module=flowvault" >> "$GITHUB_OUTPUT"
23-
else
24-
echo "module=skyvault" >> "$GITHUB_OUTPUT"
25-
fi
32+
case "$BRANCH" in
33+
flowvault-release/*) MODULE="flowvault" ;;
34+
skyvault-release/*) MODULE="skyvault" ;;
35+
release/*) MODULE="skyvault" ;;
36+
*)
37+
echo "::error::Branch '$BRANCH' does not map to a module."
38+
exit 1
39+
;;
40+
esac
41+
echo "Branch '$BRANCH' -> module '$MODULE'"
42+
echo "module=$MODULE" >> "$GITHUB_OUTPUT"
2643
2744
build-and-deploy:
2845
needs: resolve-module
@@ -41,3 +58,5 @@ jobs:
4158
skyflow-credentials: ${{ secrets.SKYFLOW_CREDENTIALS }}
4259
test-expired-token: ${{ secrets.TEST_EXPIRED_TOKEN }}
4360
test-reusable-token: ${{ secrets.TEST_REUSABLE_TOKEN }}
61+
pat-actions: ${{ secrets.PAT_ACTIONS }}
62+
test-credentials-file-string: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }}

.github/workflows/pr-flowvault.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: PR CI Checks (flowvault)
2+
3+
# flowvault is a folder under main, alongside skyvault - not a branch.
4+
# This workflow fires for PRs targeting main or a flowvault-release/* branch
5+
# that actually touch flowvault or its common dependency, and only builds/tests
6+
# those two modules. skyvault is covered by pr.yml, not here.
7+
8+
on:
9+
pull_request:
10+
branches: [ "main", "flowvault-release/**" ]
11+
paths:
12+
- "flowvault/**"
13+
- "common/**"
14+
- "pom.xml"
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-java@v4
24+
with:
25+
distribution: "temurin"
26+
java-version: "11"
27+
cache: "maven"
28+
29+
# package (not verify/install) deliberately stops short of any japicmp
30+
# contract gate bound to a module's `verify` phase - that's a separate
31+
# check. This job only proves flowvault (and common) compile and package.
32+
- name: Build flowvault
33+
run: |
34+
mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
35+
clean package -pl flowvault -am -DskipTests -Dmaven.javadoc.skip=true -Dgpg.skip=true
36+
37+
test:
38+
name: Unit Tests
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- uses: actions/setup-java@v4
44+
with:
45+
distribution: "temurin"
46+
java-version: "11"
47+
cache: "maven"
48+
49+
- name: create-json
50+
id: create-json
51+
uses: jsdaniell/create-json@1.1.2
52+
with:
53+
name: "credentials.json"
54+
json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }}
55+
56+
- name: create env
57+
id: create-env
58+
run: |
59+
for dir in common flowvault; do
60+
if [ -f "$dir/pom.xml" ]; then
61+
cp credentials.json "$dir/credentials.json"
62+
{
63+
echo "SKYFLOW_CREDENTIALS=${{ secrets.SKYFLOW_CREDENTIALS }}"
64+
echo "TEST_EXPIRED_TOKEN=${{ secrets.TEST_EXPIRED_TOKEN }}"
65+
echo "TEST_REUSABLE_TOKEN=${{ secrets.TEST_REUSABLE_TOKEN }}"
66+
} >> "$dir/.env"
67+
fi
68+
done
69+
70+
# jacoco:report is already bound to the `test` phase in the root pom
71+
# (prepare-agent + report executions), so `mvn test` alone regenerates
72+
# coverage - no need to invoke jacoco:report again on the command line.
73+
- name: Run flowvault unit tests
74+
run: |
75+
mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
76+
clean test -pl flowvault -am -Dmaven.javadoc.skip=true -Dgpg.skip=true
77+
78+
- name: Codecov
79+
uses: codecov/codecov-action@v5
80+
with:
81+
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
82+
files: flowvault/target/site/jacoco/jacoco.xml
83+
flags: unittests-flowvault
84+
name: codecov-skyflow-java-flowvault
85+
fail_ci_if_error: true
86+
verbose: true

0 commit comments

Comments
 (0)