Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a2af7f4
add nx with dte
xiongemi Jun 16, 2025
b543566
chore(repo): add docker test
lourw Jul 2, 2025
2d3361f
chore(repo): use local setup
lourw Jul 4, 2025
a01dbf4
chore(repo): add sleep
lourw Jul 4, 2025
99f3a83
chore(repo): change java install
lourw Jul 4, 2025
6e175d4
chore(repo): fix agent steps
lourw Jul 4, 2025
70a5ccd
chore(repo): connect to gcs tester
lourw Jul 4, 2025
83b9368
chore(repo): use larger agent
lourw Jul 4, 2025
5442ce7
chore(repo): remove sleep
lourw Jul 7, 2025
b282109
Apply suggestions from code review
lourw Jul 9, 2025
8abc9ab
Update .github/workflows/build-pull-request.yml
lourw Jul 9, 2025
f17b988
chore(repo): fix formatting
lourw Jul 10, 2025
362db58
Update nx.json
lourw Jul 10, 2025
4def986
set dockerTest to be parallelism 1
xiongemi Jul 10, 2025
7123b0c
set excludeDependsOn false for dockerTest
xiongemi Jul 11, 2025
327f2a2
chore(repo): use temp dir
lourw Jul 15, 2025
257707b
Update nx.json
lourw Jul 15, 2025
0f8e3ee
change plugin version to 0.0.1-alpha.7
xiongemi Jul 29, 2025
f85e2b7
upgrade nx to 21.3
xiongemi Jul 18, 2025
6eb118f
add nx show projects
xiongemi Jul 19, 2025
d840657
move start ci in build
xiongemi Jul 19, 2025
ea3951c
add target to detect error target
xiongemi Jul 19, 2025
eced976
add postinall to patch error
xiongemi Jul 20, 2025
ca80260
fix postinstall script
xiongemi Jul 20, 2025
51cae5c
remove log with all projects
xiongemi Jul 20, 2025
fa1cf5c
change to try catch instead
xiongemi Jul 20, 2025
1cd57e7
change nx version to 0.0.0-pr-32003-86be0dc
xiongemi Jul 22, 2025
bcabe8b
change test to atomized = false and log nxProjectGraph
xiongemi Jul 22, 2025
23a1605
change java version to 17
xiongemi Jul 22, 2025
6137149
fix: change SampleAntApplicationIT to work in ci
xiongemi Jul 22, 2025
a0776c0
add findJavaExecutable
xiongemi Jul 22, 2025
cbabb07
use java in the path
xiongemi Jul 23, 2025
97462d3
processBuilder.inheritIO
xiongemi Jul 24, 2025
96cf556
add if isJavaExecutableAvailable
xiongemi Jul 24, 2025
220be56
add debug log
xiongemi Jul 24, 2025
aed42fb
make lib dir
xiongemi Jul 24, 2025
7cb213d
list jar
xiongemi Jul 24, 2025
702332f
exclude dependsOn to false
xiongemi Jul 24, 2025
762c926
fix syntax error add only EnabledIf
xiongemi Jul 24, 2025
13b35f8
remove show projects and change build-ci
xiongemi Jul 24, 2025
d9198e8
format
xiongemi Jul 24, 2025
0a18d7e
Fixed the checkstyle violations
xiongemi Jul 25, 2025
0562531
add log to see where it throw split error
xiongemi Jul 30, 2025
5a39786
add warn to duplicate strategy
xiongemi Jul 30, 2025
c87b409
bust cache
xiongemi Jul 31, 2025
cdf2c51
replace batch runner
xiongemi Aug 1, 2025
a0c04a0
add post install step
xiongemi Aug 1, 2025
e046926
add batch runner jar files
xiongemi Aug 1, 2025
8214826
log split error
xiongemi Aug 1, 2025
9aad95a
add comprehensive split and replace batch runner
xiongemi Aug 1, 2025
9332a93
use pr version instead of replace batch runner jar
xiongemi Aug 3, 2025
eadfc33
update comprehensive-nx-split-fix.js
xiongemi Aug 4, 2025
5f5395e
bust cache and remove postinstall
xiongemi Aug 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"permissions": {
"allow": [
"Bash(npx nx show:*)",
"Bash(find:*)",
"Bash(npx nx reset:*)",
"Bash(npx nx list:*)",
"Bash(npx nx run:*)",
"Bash(rm:*)",
"Bash(npx nx:*)",
"Bash(sed:*)",
"Bash(./gradlew:*)",
"Bash(chmod:*)",
"Bash(ls:*)",
"Bash(/Users/emily/code/tmp/spring-boot/remove_lock.sh)",
"Bash(rg:*)",
"Bash(grep:*)",
"Bash(jq:*)",
"Bash(node:*)",
"Bash(npm install)",
"Bash(node:*)"
],
"deny": []
}
}
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NX_BATCH_MODE=true
NX_VERBOSE_LOGGING=true
NX_CLOUD_VERBOSE_LOGGING=true
NX_TUI=false
CI=true
36 changes: 26 additions & 10 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ runs:
java-early-access: ${{ inputs.java-early-access }}
java-toolchain: ${{ inputs.java-toolchain }}
java-version: ${{ inputs.java-version }}

# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution
- name: start ci run
shell: bash
run: NX_CLOUD_FORCE_USE_EXECUTE_TASKS_V3=false NX_CLOUD_DEREFERENCE_SYMLINKS=true NX_CLOUD_RETRIEVAL_CONCURRENCY=50 NX_CLOUD_NO_TIMEOUTS=true NX_VERBOSE_LOGGING=true NX_CLOUD_VERBOSE_LOGGING=true NX_PERF_LOGGING=true npx nx-cloud start-ci-run --require-explicit-completion --distribute-on="../../.nx/workflows/distribution-config.yaml"

- name: Build
id: build
if: ${{ inputs.publish == 'false' }}
Expand All @@ -68,17 +77,24 @@ runs:
COMMERCIAL_REPO_PASSWORD: ${{ inputs.commercial-repository-password }}
COMMERCIAL_REPO_USERNAME: ${{ inputs.commercial-repository-username }}
COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }}
run: ./gradlew build
- name: Publish
id: publish
if: ${{ inputs.publish == 'true' }}
run: |
echo "🔍 Running with debug logging to identify problematic targets..."
node debug-nx-targets.js "NX_BATCH_MODE=true NX_CLOUD_DEREFERENCE_SYMLINKS=true NX_VERBOSE_LOGGING=true NX_PERF_LOGGING=true NX_CLOUD_NO_TIMEOUTS=true NX_CLOUD_VERBOSE_LOGGING=true npx nx run-many -t build-ci --parallel=32 --batch --outputStyle=stream"
# - name: Publish
# id: publish
# if: ${{ inputs.publish == 'true' }}
# shell: bash
# env:
# COMMERCIAL_RELEASE_REPO_URL: ${{ inputs.commercial-release-repository-url }}
# COMMERCIAL_REPO_PASSWORD: ${{ inputs.commercial-repository-password }}
# COMMERCIAL_REPO_USERNAME: ${{ inputs.commercial-repository-username }}
# COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }}
# run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository ${{ !startsWith(github.event.head_commit.message, 'Next development version') && 'build' || '' }} publishAllPublicationsToDeploymentRepository

- name: Stop nx cloud agents
if: always()
shell: bash
env:
COMMERCIAL_RELEASE_REPO_URL: ${{ inputs.commercial-release-repository-url }}
COMMERCIAL_REPO_PASSWORD: ${{ inputs.commercial-repository-password }}
COMMERCIAL_REPO_USERNAME: ${{ inputs.commercial-repository-username }}
COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }}
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository ${{ !startsWith(github.event.head_commit.message, 'Next development version') && 'build' || '' }} publishAllPublicationsToDeploymentRepository
run: npx nx-cloud complete-ci-run
- name: Read Version From gradle.properties
id: read-version
shell: bash
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ permissions:
jobs:
build:
name: Build Pull Request
if: ${{ github.repository == 'spring-projects/spring-boot' }}
runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }}
steps:
- name: Check Out Code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
check-latest: true
cache: npm
- run: npm install

- name: Build
id: build
uses: ./.github/actions/build

- name: Print JVM Thread Dumps When Cancelled
if: cancelled()
uses: ./.github/actions/print-jvm-thread-dumps
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ secrets.yml
.sts4-cache
.git-hooks/
node_modules

.nx/installation
.nx/cache
.nx/workspace-data

.specstory/**
.cursorindexingignore
.claude
!batch-runner.jar
!batch-runner-all.jar
116 changes: 116 additions & 0 deletions .nx/nxw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
"use strict";
// This file should be committed to your repository! It wraps Nx and ensures
// that your local installation matches nx.json.
// See: https://nx.dev/recipes/installation/install-non-javascript for more info.




Object.defineProperty(exports, "__esModule", { value: true });
const fs = require('fs');
const path = require('path');
const cp = require('child_process');
const installationPath = path.join(__dirname, 'installation', 'package.json');
function matchesCurrentNxInstall(currentInstallation, nxJsonInstallation) {
if (!currentInstallation.devDependencies ||
!Object.keys(currentInstallation.devDependencies).length) {
return false;
}
try {
if (currentInstallation.devDependencies['nx'] !==
nxJsonInstallation.version ||
require(path.join(path.dirname(installationPath), 'node_modules', 'nx', 'package.json')).version !== nxJsonInstallation.version) {
return false;
}
for (const [plugin, desiredVersion] of Object.entries(nxJsonInstallation.plugins || {})) {
if (currentInstallation.devDependencies[plugin] !== desiredVersion) {
return false;
}
}
return true;
}
catch {
return false;
}
}
function ensureDir(p) {
if (!fs.existsSync(p)) {
fs.mkdirSync(p, { recursive: true });
}
}
function getCurrentInstallation() {
try {
return require(installationPath);
}
catch {
return {
name: 'nx-installation',
version: '0.0.0',
devDependencies: {},
};
}
}
function performInstallation(currentInstallation, nxJson) {
fs.writeFileSync(installationPath, JSON.stringify({
name: 'nx-installation',
devDependencies: {
nx: nxJson.installation.version,
...nxJson.installation.plugins,
},
}));
try {
cp.execSync('npm i', {
cwd: path.dirname(installationPath),
stdio: 'inherit',
windowsHide: false,
});
}
catch (e) {
// revert possible changes to the current installation
fs.writeFileSync(installationPath, JSON.stringify(currentInstallation));
// rethrow
throw e;
}
}
function ensureUpToDateInstallation() {
const nxJsonPath = path.join(__dirname, '..', 'nx.json');
let nxJson;
try {
nxJson = require(nxJsonPath);
if (!nxJson.installation) {
console.error('[NX]: The "installation" entry in the "nx.json" file is required when running the nx wrapper. See https://nx.dev/recipes/installation/install-non-javascript');
process.exit(1);
}
}
catch {
console.error('[NX]: The "nx.json" file is required when running the nx wrapper. See https://nx.dev/recipes/installation/install-non-javascript');
process.exit(1);
}
try {
ensureDir(path.join(__dirname, 'installation'));
const currentInstallation = getCurrentInstallation();
if (!matchesCurrentNxInstall(currentInstallation, nxJson.installation)) {
performInstallation(currentInstallation, nxJson);
}
}
catch (e) {
const messageLines = [
'[NX]: Nx wrapper failed to synchronize installation.',
];
if (e instanceof Error) {
messageLines.push('');
messageLines.push(e.message);
messageLines.push(e.stack);
}
else {
messageLines.push(e.toString());
}
console.error(messageLines.join('\n'));
process.exit(1);
}
}
if (!process.env.NX_WRAPPER_SKIP_INSTALL) {
ensureUpToDateInstallation();
}

require('./installation/node_modules/nx/bin/nx');
37 changes: 37 additions & 0 deletions .nx/workflows/agents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
launch-templates:
linux-extra-large-plus-jvm:
env:
NX_CLOUD_FORCE_USE_EXECUTE_TASKS_V3: "false"
DOCKER_HOST: ""
SERVICES_HOST: ""
LANG: C.UTF-8
resource-class: 'docker_linux_amd64/extra_large'
image: 'ubuntu22.04-node20.19-v3'
init-steps:
- name: Make tmp directory in agent workflow dir
script: mkdir /home/workflows/tmp

- name: java version
script: java -version

- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v3.6/workflow-steps/checkout/main.yaml'

- name: Setup Java 17
script: |
sudo apt update
sudo apt install -y openjdk-21-jdk openssh-server neovim lynx fzf
java -version
- name: Setup gradle
script: ./gradlew wrapper && ./gradlew --stop && ./gradlew clean

- name: Restore Node Modules Cache
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
inputs:
key: 'package-lock.json|yarn.lock|pnpm-lock.yaml'
paths: 'node_modules'
base-branch: 'main'
- name: Install Node Modules
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
- name: Run postinstall
script: npm run postinstall
20 changes: 20 additions & 0 deletions .nx/workflows/distribution-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
distribute-on:
default: 5 linux-extra-large-plus-jvm

assignment-rules:
- targets:
- 'ciIntTest*'
run-on:
- agent: linux-extra-large-plus-jvm
parallelism: 1

- targets:
- 'dockerTest'
run-on:
- agent: linux-extra-large-plus-jvm
parallelism: 1

- projects:
- "*"
run-on:
- agent: linux-extra-large-plus-jvm
Binary file added batch-runner-all.jar
Binary file not shown.
Binary file added batch-runner.jar
Binary file not shown.
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id "dev.nx.gradle.project-graph" version "0.0.1-alpha.7"
id "base"
id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276
}
Expand All @@ -9,18 +10,27 @@ defaultTasks 'build'

allprojects {
group = "org.springframework.boot"
apply {
plugin("dev.nx.gradle.project-graph")
}
}

subprojects {
apply plugin: "org.springframework.boot.conventions"

repositories {
mavenLocal()
mavenCentral()
spring.mavenRepositories()
}

tasks.withType(Test).configureEach {
if (it.name == 'dockerTest') {
environment("_JAVA_OPTIONS", "-Djava.io.tmpdir=/home/workflows/tmp")
}
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, "minutes"
}
}

}
Loading
Loading