Skip to content

Activate Spring Boot Starter integration tests in CI - #2884

Merged
kthoms merged 13 commits into
mainfrom
feature/2874-activate-sb-int-tests
May 12, 2026
Merged

kthoms merged 13 commits into
mainfrom
feature/2874-activate-sb-int-tests

Conversation

@kthoms

@kthoms kthoms commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

closes #2874

@kthoms kthoms self-assigned this May 5, 2026
Copilot AI review requested due to automatic review settings May 5, 2026 01:31
@kthoms kthoms added the scope:spring-boot Changes to the Spring Boot starter. label May 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Integration Build workflow to optionally run Spring Boot Starter integration tests in CI (primarily for PRs labeled scope:spring-boot) and wires that new testsuite into the shared .devenv integration-test runner script.

Changes:

  • Add needs_spring_boot_starter_tests detection/output in the PR configuration job and introduce a dedicated spring-boot-starter-integration-tests CI job.
  • Extend .devenv/scripts/build/build-and-run-integration-tests.sh to accept --testsuite=spring-boot-starter and run the corresponding Maven profile.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/integration-build.yml Adds PR-label detection for Spring Boot scope and a new CI job to execute Spring Boot Starter integration tests.
.devenv/scripts/build/build-and-run-integration-tests.sh Adds a spring-boot-starter testsuite mode with dedicated build/test commands.

Comment thread .github/workflows/integration-build.yml Resolved
Copilot finished work on behalf of kthoms May 5, 2026 06:11
@kthoms kthoms added the enhancement New feature or request label May 5, 2026
@kthoms kthoms added this to the 2.2.0-M1 milestone May 5, 2026
kthoms added a commit that referenced this pull request May 6, 2026
Adds the org.graalvm.js:js-scriptengine dependency required for JavaScript
execution via JSR-223 in the webapp runtime integration tests. Without this
dependency, javascript tasks and listeners fail with 'scriptEngine is null'.

Related to #2884

Co-authored-by: Copilot <[email protected]>
@kthoms
kthoms force-pushed the feature/2874-activate-sb-int-tests branch 2 times, most recently from 6048412 to 54a3028 Compare May 6, 2026 17:59
kthoms and others added 10 commits May 11, 2026 05:48
The antrun execution in distro/webjar/pom.xml moves securityFilterRules.json
from WEB-INF/ to the correct classpath location in the webjar. This step was
incorrectly skipped when building with -Dskip.frontend.build=true, causing
the Spring Boot Starter integration test app to fail at startup with:

  Could not read security filter config file '/securityFilterRules.json':
  no such resource in servlet context.

The file restructuring (moving securityFilterRules.json, deleting WEB-INF,
etc.) is not frontend-specific and must always run to produce a valid webjar.

Co-authored-by: Copilot <[email protected]>
…ions

When skip.frontend.build=true, the plugin/ directory is not present in the
unpacked WAR (it is only populated by the webpack frontend build). The
previous fix (removing the skip entirely) caused the antrun to fail because
it tried to move the missing plugin/ dir.

Split into two antrun executions:
- restructure-webjar-static: always runs - moves securityFilterRules.json
  and deletes WEB-INF/ (these files are always present, not frontend-specific)
- restructure-webjar-frontend: skipped when skip.frontend.build=true - moves
  plugin/ and copies operaton-welcome/ (only present after frontend build)

Co-authored-by: Copilot <[email protected]>
Without running the full webpack frontend build (skip.frontend.build=true),
the webjar contains no app HTML/JS/CSS files. Integration tests running in CI
therefore receive 500 errors when accessing app pages, causing test failures in:
- RequestTrailingSlashIT
- ChangedAppPathIT#shouldCheckPresenceOfResources
- SessionCookiePathEnforcementIT$Disabled

Add minimal stub files to src/test/resources so Spring Boot's classpath
resource resolution finds them during integration tests, resulting in proper
200 responses and letting all filter mechanics work as expected.

Co-authored-by: Copilot <[email protected]>
…gration test script

spring-boot-starter has no handler in run_tests() case statement, so passing
--testsuite=spring-boot-starter would pass validation but execute incorrectly.
A dedicated script (build-and-run-spring-boot-starter.sh) exists for this purpose.

Co-authored-by: Copilot <[email protected]>
…ponse output

SessionCookieFilter was only applying SameSite attributes when response output
was written (writer/outputStream accessed). However, in requests where no
response output is generated (e.g., some test scenarios), the cookies were
sent without the SameSite attribute.

Fixed by calling appendSameSiteIfMissing() after the filter chain completes,
ensuring all session cookies get the SameSite attribute regardless of whether
response output was written. This also handles the case where the proxy is
called from a non-HTTP context gracefully.

Fixes SessionCookiePathEnforcementIT#shouldNotOverrideCookiePathWhenEnforcementDisabled test.

Co-authored-by: Copilot <[email protected]>
@kthoms
kthoms force-pushed the feature/2874-activate-sb-int-tests branch from 01585f2 to 461c788 Compare May 11, 2026 03:48
@github-actions github-actions Bot added feature lang:java Pull requests that update Java code scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI database Features and issues related to the persistence layer and removed feature labels May 12, 2026
@kthoms kthoms removed scope:build Changes affecting the build, e.g. Maven configuration, shell scripts. scope:db_schema Issues and changes affecting the database schema. scope:juel Changes to the JUEL implementation scope:connect Issues & changes related to the connect API and connectors labels May 12, 2026
@github-actions github-actions Bot added lang:java Pull requests that update Java code scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI database Features and issues related to the persistence layer api:rest Changes affecting the REST API scope:model-api Changes to the BPMN, CMMN, DMN, XML model APIs. scope:ci Changes to the CI, e.g. GitHub workflows scope:external-task-client-java Changes to the Java external task client. scope:ldap Changes to the LDAP integration. scope:quarkus Changes to the Quarkus extension. scope:spin Changes to the Spin library. scope:webapp Changes affecting the legacy webapps. scope:build Changes affecting the build, e.g. Maven configuration, shell scripts. scope:db_schema Issues and changes affecting the database schema. scope:juel Changes to the JUEL implementation scope:connect Issues & changes related to the connect API and connectors feature labels May 12, 2026
@kthoms
kthoms merged commit faafcfd into main May 12, 2026
14 checks passed
@kthoms
kthoms deleted the feature/2874-activate-sb-int-tests branch May 12, 2026 22:50
@sonarqubecloud

Copy link
Copy Markdown

@kthoms kthoms removed lang:java Pull requests that update Java code scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI database Features and issues related to the persistence layer api:rest Changes affecting the REST API scope:model-api Changes to the BPMN, CMMN, DMN, XML model APIs. labels May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:ci Changes to the CI, e.g. GitHub workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activate Spring Boot Starter Integration Tests

3 participants