KRYSTALM7 opened a new pull request, #137: URL: https://github.com/apache/fineract-loan-origination/pull/137
## Summary Fixes the `Sync LOS OpenAPI Spec` workflow which has been failing on every run (6/6 runs) since it was introduced. The root cause was in the **Start LOS backend** step, the backend never became reachable before the fetch step ran. ## Root Cause The original `Start LOS backend` step had two compounding problems: 1. **No failure signal on timeout** — the health-check loop ran all 30 iterations and then exited with code `0`, letting the workflow continue as if the backend was up. The `curl` in the next step then hit nothing and failed with `curl: (7) Failed to connect to localhost port 8082`. 2. **60 seconds was not enough** — `./mvnw spring-boot:run` compiles the entire project and then starts the server in a single step. On a cold GitHub Actions runner this consistently takes longer than the 30 × 2s = 60s the loop allowed. ## Changes | Step | Before | After | |---|---|---| | Build | Compiled + started in one `spring-boot:run` call | Separate `mvnw -DskipTests package -q` build step | | Start | `spring-boot:run &` with 60s poll | `java -jar` the built jar with 180s poll | | Timeout handling | Loop exits `0` silently | `exit 1` on timeout | | Process crash detection | None | `kill -0` check on each iteration | Splitting the build from the start means: - The jar starts faster (no compile phase on boot) - Build failures surface as a distinct step, not a startup timeout - The 180s window is now realistic for a cold runner ## Testing Triggered the workflow manually via `workflow_dispatch` after this change, backend came up in ~95s and the spec was fetched successfully. -- 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]
