[ 
https://issues.apache.org/jira/browse/GEODE-10550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18114689#comment-18114689
 ] 

ASF subversion and git services commented on GEODE-10550:
---------------------------------------------------------

Commit 944c4bb9a9445f04d40add88693df9024f28d7c5 in geode's branch 
refs/heads/support/1.15 from Sai Boorlagadda
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=944c4bb9a9 ]

GEODE-10550: Enable GitHub Actions workflows for support/1.15 branch (#7980)

* GEODE-10550: Enable GitHub Actions workflows for support/1.15 branch

Add GitHub Actions workflow files to support/1.15 branch to enable
automated CI/CD checks for pull requests targeting this branch.

This change adds two workflow files:
- .github/workflows/codeql.yml: CodeQL security scanning
- .github/workflows/gradle.yml: Build, test, and code quality checks

The workflows will run on:
- Push events to support/1.15 branch
- Pull requests targeting support/1.15 branch
- Scheduled weekly security scans (CodeQL only)

This ensures that dependency updates and security fixes submitted
to the support/1.15 branch are properly validated before merge.

* Fix Java version to JDK 8 for support/1.15 branch

The support/1.15 branch uses Gradle 6.8.3 and is configured for Java 8.
Updated all workflow jobs to use JDK 8 instead of JDK 17 to match the
branch requirements.

Changes:
- Updated all jobs to use java-version: '8'
- Changed JAVA_HOME references from JAVA_HOME_17_X64 to JAVA_HOME_8_X64
- Updated testJava*Home parameters to use testJava8Home
- Set JAVA_BUILD_VERSION and JAVA_TEST_VERSION to 8

* Fix race condition in WanCopyRegionFunctionServiceTest

The test severalExecuteWithDifferentRegionOrSenderAreAllowed was failing
intermittently with 'expected: 5 but was: 2/3' due to a race condition.

Root Cause:
The test creates 5 CompletableFuture tasks using supplyAsync(), which
executes asynchronously. There was no guarantee that all tasks would
call service.execute() and be added to the executions map before the
final assertion checked the count.

The race occurred because:
1. CompletableFuture.supplyAsync() schedules tasks asynchronously
2. Multiple tasks could be scheduled but not yet executed
3. The assertion would run before all tasks had called service.execute()

Solution:
Instead of starting all tasks and then waiting, we now start each task
sequentially and wait for it to be registered in the executions map
before starting the next one. This ensures:
- Each execution is fully registered before the next one starts
- No race condition between task scheduling and execution registration
- The final count is guaranteed to be 5

This approach is more deterministic and eliminates the race condition
while still testing that multiple executions with different regions
are allowed to run concurrently.

* Fix OplogEntryIdSetTest to avoid threshold-based overflow

The test addMethodOverflowsWhenInternalAddThrowsIllegalArgumentException
was failing with 'Expected size: 2 but was: 100' because the
DRF_HASHMAP_OVERFLOW_THRESHOLD was set to 10 by another test
(OplogEntryIdSetDrfHashSetThresholdTest).

Root Cause:
DRF_HASHMAP_OVERFLOW_THRESHOLD is a static final field initialized when
DiskStoreImpl class is loaded. If OplogEntryIdSetDrfHashSetThresholdTest
runs first and sets the system property to 10, then DiskStoreImpl loads
with threshold=10 instead of the default 805306368.

With threshold=10 and testEntries=1000:
- The test adds 999 int entries and 999 long entries
- Every 10 entries triggers shouldOverflow() to return true
- This creates ~100 hash sets (999/10) instead of the expected 2

Solution:
Reduced testEntries from 1000 to 5 to ensure we stay well below any
possible threshold value (even if set to 10 by other tests). This
ensures the test only creates overflow hash sets via the mocked
IllegalArgumentException mechanism, not via the threshold mechanism.

The test still validates the same behavior:
- IllegalArgumentException during add() triggers overflow
- New hash sets are created to handle the overflow
- All entries (including those that caused the exception) are stored
- All entries can be retrieved successfully

* Revert OplogEntryIdSetTest change - restore testEntries to 1000

Reverting the change that reduced testEntries from 1000 to 5.
The test should use a meaningful number of entries to properly
validate the overflow behavior.

> Enable GitHub Actions workflows for support/1.15 branch
> -------------------------------------------------------
>
>                 Key: GEODE-10550
>                 URL: https://issues.apache.org/jira/browse/GEODE-10550
>             Project: Geode
>          Issue Type: Task
>          Components: build
>            Reporter: Sai Boorlagadda
>            Assignee: Sai Boorlagadda
>            Priority: Major
>             Fix For: 1.15.3
>
>
> Summary
>    The new support/1.15 branch requires GitHub Actions workflows to run 
> automated tests and security checks for pull requests targeting this branch. 
> Currently, the existing workflows (.github/workflows/codeql.yml and 
> .github/workflows/gradle.yml) only trigger on the develop branch.
>    Background
>    A new support branch support/1.15 has been created for maintaining the 
> 1.15 release line. PRs are being created to bump dependencies and fix 
> security vulnerabilities, but there are no automated CI/CD checks running on 
> these PRs, which creates risk of introducing regressions or missing issues.
>    Scope
>    Update existing GitHub Actions workflow files to include the support/1.15 
> branch in their trigger conditions:
>      • .github/workflows/codeql.yml - CodeQL security scanning
>      • .github/workflows/gradle.yml - Build, test, and code quality checks
>    Expected Outcome
>    When PRs are created against the support/1.15 branch, the following 
> automated checks will run:
>      • Build verification with code quality checks (spotlessCheck, rat, 
> checkPom, pmdMain)
>      • Java API compatibility checks (japicmp)
>      • Unit tests
>      • Integration tests
>      • Acceptance tests
>      • Distributed tests (WAN, CQ, Lucene, Management, Assembly modules)
>      • CodeQL security scanning for multiple languages
>      • Test report artifacts generated on failures



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to