From 821d15b64054379960c6c895084be4962629c220 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 18:21:27 +0300 Subject: [PATCH 001/122] Add failed test with update of pr-java-ci git hub work flow --- .../workflows/pr-module-functional-tests.yml | 28 +++++++++++++++---- pom.xml | 2 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index d87fbe4857a..ca21be65be1 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -1,4 +1,4 @@ -name: Module functional tests +name: Java CI on: pull_request: @@ -29,8 +29,26 @@ jobs: cache: 'maven' java-version: ${{ matrix.java }} - - name: Build with Maven - run: mvn package -DskipUnitTests=true --file extra/pom.xml + - name: Build with Maven and capture output + id: build + run: | + set +e + mvn -B package --file extra/pom.xml | tee build_output.txt + echo "exit_code=$?" >> $GITHUB_OUTPUT - - name: Run module tests - run: mvn -B verify -DskipUnitTests=true -DskipFunctionalTests=true -DskipModuleFunctionalTests=false -Dtests.max-container-count=5 -DdockerfileName=Dockerfile-modules --file extra/pom.xml + - name: Format build output for PR comment + if: steps.build.outputs.exit_code != '0' + run: | + echo "❌ **Java CI Build Failed**" > comment.txt + echo "" >> comment.txt + echo '```' >> comment.txt + tail -n 100 build_output.txt >> comment.txt + echo '```' >> comment.txt + + - name: Comment on PR with build failure output + if: github.event_name == 'pull_request' && steps.build.outputs.exit_code != '0' + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt diff --git a/pom.xml b/pom.xml index cff5ac82c24..fb294ce5af3 100644 --- a/pom.xml +++ b/pom.xml @@ -369,7 +369,7 @@ ${maven-surefire-plugin.version} - false + true ${skipUnitTests} From 9651a30a371b7f5cd67cafa489b648051a346813 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 18:22:05 +0300 Subject: [PATCH 002/122] Set launchContainers to false --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fb294ce5af3..cff5ac82c24 100644 --- a/pom.xml +++ b/pom.xml @@ -369,7 +369,7 @@ ${maven-surefire-plugin.version} - true + false ${skipUnitTests} From e17534f703f1721744c723d127a0edd4bc7c0d00 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 18:23:45 +0300 Subject: [PATCH 003/122] Switch file --- .github/workflows/pr-java-ci.yml | 25 +++++++++++++++-- .../workflows/pr-module-functional-tests.yml | 28 ++++--------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index a0ecdd6892f..63e9ece05b6 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -30,5 +30,26 @@ jobs: cache-dependency-path: extra/pom.xml java-version: ${{ matrix.java }} - - name: Build with Maven - run: mvn -B package --file extra/pom.xml + - name: Build with Maven and capture output + id: build + run: | + set +e + mvn -B package --file extra/pom.xml | tee build_output.txt + echo "exit_code=$?" >> $GITHUB_OUTPUT + + - name: Format build output for PR comment + if: steps.build.outputs.exit_code != '0' + run: | + echo "❌ **Java CI Build Failed**" > comment.txt + echo "" >> comment.txt + echo '```' >> comment.txt + tail -n 100 build_output.txt >> comment.txt + echo '```' >> comment.txt + + - name: Comment on PR with build failure output + if: steps.build.outputs.exit_code != '0' + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index ca21be65be1..d87fbe4857a 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -1,4 +1,4 @@ -name: Java CI +name: Module functional tests on: pull_request: @@ -29,26 +29,8 @@ jobs: cache: 'maven' java-version: ${{ matrix.java }} - - name: Build with Maven and capture output - id: build - run: | - set +e - mvn -B package --file extra/pom.xml | tee build_output.txt - echo "exit_code=$?" >> $GITHUB_OUTPUT + - name: Build with Maven + run: mvn package -DskipUnitTests=true --file extra/pom.xml - - name: Format build output for PR comment - if: steps.build.outputs.exit_code != '0' - run: | - echo "❌ **Java CI Build Failed**" > comment.txt - echo "" >> comment.txt - echo '```' >> comment.txt - tail -n 100 build_output.txt >> comment.txt - echo '```' >> comment.txt - - - name: Comment on PR with build failure output - if: github.event_name == 'pull_request' && steps.build.outputs.exit_code != '0' - uses: peter-evans/create-or-update-comment@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt + - name: Run module tests + run: mvn -B verify -DskipUnitTests=true -DskipFunctionalTests=true -DskipModuleFunctionalTests=false -Dtests.max-container-count=5 -DdockerfileName=Dockerfile-modules --file extra/pom.xml From e1037861f27a3a8d46c42792c2ae4fbb6b25da2b Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 18:26:41 +0300 Subject: [PATCH 004/122] Make test failed --- .github/workflows/pr-java-ci.yml | 2 +- src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 63e9ece05b6..531e448f034 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -30,7 +30,7 @@ jobs: cache-dependency-path: extra/pom.xml java-version: ${{ matrix.java }} - - name: Build with Maven and capture output + - name: Build with Maven id: build run: | set +e diff --git a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java index 50c2bcb1781..0d8b3ca4479 100644 --- a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java @@ -54,7 +54,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() { assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()).hasSize(1) .extracting(HttpRequest::getUri) - .containsExactly("https://randomurl.com"); + .containsExactly(""); } @Test From 5bc665fc8de2239d58d289cff16bfab662639c56 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 18:39:06 +0300 Subject: [PATCH 005/122] Make test failed --- .../server/it/openrtb2/aax/test-aax-bid-response.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json index 87543ca7bf5..3e9beabe3c2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json @@ -6,10 +6,10 @@ "bid": [ { "id": "randomid", - "impid": "test-imp-id", + "impid": "", "price": 0.500000, - "adid": "12345678", - "adm": "some-test-ad", + "adid": "", + "adm": "", "cid": "987", "crid": "12345678", "h": 250, From 5563f9883eac749fa9c71c3db0bb40031eb0dbef Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 21:29:20 +0300 Subject: [PATCH 006/122] Minor update of pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 531e448f034..658c0c6e93e 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -47,7 +47,7 @@ jobs: echo '```' >> comment.txt - name: Comment on PR with build failure output - if: steps.build.outputs.exit_code != '0' + if: steps.build.outputs.exit_code != '0' && github.event_name == 'pull_request' uses: peter-evans/create-or-update-comment@v4 with: token: ${{ secrets.GITHUB_TOKEN }} From 3b6408afeb898500f7f95bc125213fe912c20e86 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 21:39:48 +0300 Subject: [PATCH 007/122] Minor update of pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 658c0c6e93e..d592ed83da3 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -33,7 +33,6 @@ jobs: - name: Build with Maven id: build run: | - set +e mvn -B package --file extra/pom.xml | tee build_output.txt echo "exit_code=$?" >> $GITHUB_OUTPUT From 1131ed339c8e050a6542821cb07d2bce4cb818f0 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 21:45:15 +0300 Subject: [PATCH 008/122] Update codeql --- .github/workflows/codeql-analysis.yml | 77 +++++++++++++++++---------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a86f0b144a5..4d31282de38 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,32 +17,51 @@ jobs: language: [ 'java' ] steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 21 - - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - - name: Build with Maven - run: mvn -B package --file extra/pom.xml - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 - with: - category: "/language:${{ matrix.language }}" + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 21 + + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Build with Maven + run: | + mvn -B package --file extra/pom.xml | tee build_output.txt + echo "exit_code=$?" >> $GITHUB_OUTPUT + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + with: + category: "/language:${{ matrix.language }}" + + - name: Format build output for PR comment + if: steps.build.outputs.exit_code != '0' + run: | + echo "❌ **Java CI Build Failed**" > comment.txt + echo "" >> comment.txt + echo '```' >> comment.txt + tail -n 100 build_output.txt >> comment.txt + echo '```' >> comment.txt + + - name: Comment on PR with build failure output + if: steps.build.outputs.exit_code != '0' && github.event_name == 'pull_request' + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt From 8650fecd1935e91f2f868d7cad7f469914c4f250 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 21:55:09 +0300 Subject: [PATCH 009/122] Update codeql --- .github/workflows/codeql-analysis.yml | 77 ++++++++++----------------- 1 file changed, 29 insertions(+), 48 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4d31282de38..a86f0b144a5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,51 +17,32 @@ jobs: language: [ 'java' ] steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 21 - - - name: Cache Maven packages - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - - - name: Build with Maven - run: | - mvn -B package --file extra/pom.xml | tee build_output.txt - echo "exit_code=$?" >> $GITHUB_OUTPUT - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 - with: - category: "/language:${{ matrix.language }}" - - - name: Format build output for PR comment - if: steps.build.outputs.exit_code != '0' - run: | - echo "❌ **Java CI Build Failed**" > comment.txt - echo "" >> comment.txt - echo '```' >> comment.txt - tail -n 100 build_output.txt >> comment.txt - echo '```' >> comment.txt - - - name: Comment on PR with build failure output - if: steps.build.outputs.exit_code != '0' && github.event_name == 'pull_request' - uses: peter-evans/create-or-update-comment@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 21 + + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Build with Maven + run: mvn -B package --file extra/pom.xml + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + with: + category: "/language:${{ matrix.language }}" From c87a8466768d023fc85cdd69298ade42e705c6ab Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 22:13:45 +0300 Subject: [PATCH 010/122] Debug commit --- .github/workflows/pr-java-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index d592ed83da3..d0bfe28441b 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -35,9 +35,14 @@ jobs: run: | mvn -B package --file extra/pom.xml | tee build_output.txt echo "exit_code=$?" >> $GITHUB_OUTPUT + - name: Write to GITHUB_OUTPUT and debug + id: example + run: | + echo "my_output=hello-world" >> $GITHUB_OUTPUT + echo "--- Debugging GITHUB_OUTPUT contents ---" + cat $GITHUB_OUTPUT - name: Format build output for PR comment - if: steps.build.outputs.exit_code != '0' run: | echo "❌ **Java CI Build Failed**" > comment.txt echo "" >> comment.txt From 9401cf71e3ae8833adaa218f395d26fbf02a3b5f Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 22:26:09 +0300 Subject: [PATCH 011/122] Debug commit --- .github/workflows/pr-java-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index d0bfe28441b..f5176fe2624 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -38,7 +38,6 @@ jobs: - name: Write to GITHUB_OUTPUT and debug id: example run: | - echo "my_output=hello-world" >> $GITHUB_OUTPUT echo "--- Debugging GITHUB_OUTPUT contents ---" cat $GITHUB_OUTPUT From 44c839bacbc93cdb10ca9a835e3e5ecd832bdeec Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 22:47:42 +0300 Subject: [PATCH 012/122] Update echo "exit_code=1" >> "$GITHUB_OUTPUT" --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index f5176fe2624..f301c3cc5ab 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -34,7 +34,7 @@ jobs: id: build run: | mvn -B package --file extra/pom.xml | tee build_output.txt - echo "exit_code=$?" >> $GITHUB_OUTPUT + echo "exit_code=1" >> "$GITHUB_OUTPUT" - name: Write to GITHUB_OUTPUT and debug id: example run: | From dfd90cdd832f5acc82246493056edf1b6c2e5c33 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 23:13:03 +0300 Subject: [PATCH 013/122] Get more precise info from log --- .github/workflows/pr-java-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index f301c3cc5ab..f704e5853b3 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -43,10 +43,11 @@ jobs: - name: Format build output for PR comment run: | - echo "❌ **Java CI Build Failed**" > comment.txt - echo "" >> comment.txt + sed -n '/\[ERROR\] Failures:/,/^\[ERROR\] Tests run:/p' build_output.txt | sed '$d' > test_failures.txt + echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt + echo '' >> comment.txt echo '```' >> comment.txt - tail -n 100 build_output.txt >> comment.txt + cat test_failures.txt >> comment.txt echo '```' >> comment.txt - name: Comment on PR with build failure output From b1ef118adcd0dd32f0a4a8f865e2481849566260 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 10 Apr 2025 23:22:11 +0300 Subject: [PATCH 014/122] Get more precise info from log with end of ``[ERROR] Failures:` --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index f704e5853b3..eaec59da5b6 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -43,7 +43,7 @@ jobs: - name: Format build output for PR comment run: | - sed -n '/\[ERROR\] Failures:/,/^\[ERROR\] Tests run:/p' build_output.txt | sed '$d' > test_failures.txt + sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt echo '' >> comment.txt echo '```' >> comment.txt From 497aa0d3dd047af2a855267a2db1ca2ac22a0428 Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 11 Apr 2025 14:59:07 +0300 Subject: [PATCH 015/122] Increase work flow file to make it fail --- .github/workflows/pr-java-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index eaec59da5b6..2c4406b4c8c 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -35,6 +35,7 @@ jobs: run: | mvn -B package --file extra/pom.xml | tee build_output.txt echo "exit_code=1" >> "$GITHUB_OUTPUT" + - name: Write to GITHUB_OUTPUT and debug id: example run: | @@ -57,3 +58,9 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} body-path: comment.txt + + - name: Fail if '[ERROR]' is found in logs + run: | + if grep -q "\[ERROR\]" build_output.txt; then + exit 1 # This makes the check fail + fi From df80da2005faddd71859b0f45f37a5d9d27e2504 Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 11 Apr 2025 16:13:35 +0300 Subject: [PATCH 016/122] Update for pr-java-ci --- .github/workflows/pr-java-ci.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 2c4406b4c8c..f8ec4018fe2 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -32,15 +32,7 @@ jobs: - name: Build with Maven id: build - run: | - mvn -B package --file extra/pom.xml | tee build_output.txt - echo "exit_code=1" >> "$GITHUB_OUTPUT" - - - name: Write to GITHUB_OUTPUT and debug - id: example - run: | - echo "--- Debugging GITHUB_OUTPUT contents ---" - cat $GITHUB_OUTPUT + run: mvn -B package --file extra/pom.xml | tee build_output.txt - name: Format build output for PR comment run: | @@ -52,7 +44,7 @@ jobs: echo '```' >> comment.txt - name: Comment on PR with build failure output - if: steps.build.outputs.exit_code != '0' && github.event_name == 'pull_request' + if: steps.build.outputs.exit_code != '0' uses: peter-evans/create-or-update-comment@v4 with: token: ${{ secrets.GITHUB_TOKEN }} From 147469f6fdf0e77901774ccc3d5126ed7d67a504 Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 11 Apr 2025 16:27:49 +0300 Subject: [PATCH 017/122] Few update for pr-java-ci --- .github/workflows/pr-java-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index f8ec4018fe2..3f6563f35e4 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -32,9 +32,12 @@ jobs: - name: Build with Maven id: build - run: mvn -B package --file extra/pom.xml | tee build_output.txt + run: | + mvn -B package --file extra/pom.xml | tee build_output.txt + echo "exit_code=$?" >> "$GITHUB_ENV" - name: Format build output for PR comment + if: ${{ env.exit_code != '0' }} run: | sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt @@ -51,8 +54,6 @@ jobs: issue-number: ${{ github.event.pull_request.number }} body-path: comment.txt - - name: Fail if '[ERROR]' is found in logs - run: | - if grep -q "\[ERROR\]" build_output.txt; then - exit 1 # This makes the check fail - fi + - name: Fail if error is found in logs + if: ${{ env.exit_code != '0' }} + run: exit 1 From 44e05b9126a1493d788e1b61c12d777cf628cd9a Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 11 Apr 2025 16:41:25 +0300 Subject: [PATCH 018/122] Add `if: steps.build.outputs.exit_code != '0'` --- .github/workflows/pr-java-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 3f6563f35e4..1ceb4f4d7f7 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -37,7 +37,7 @@ jobs: echo "exit_code=$?" >> "$GITHUB_ENV" - name: Format build output for PR comment - if: ${{ env.exit_code != '0' }} + if: steps.build.outputs.exit_code != '0' run: | sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt @@ -55,5 +55,5 @@ jobs: body-path: comment.txt - name: Fail if error is found in logs - if: ${{ env.exit_code != '0' }} + if: steps.build.outputs.exit_code != '0' run: exit 1 From 8378d3535c3400d3ccaacf0cdbde98b62867f84c Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 11 Apr 2025 16:46:30 +0300 Subject: [PATCH 019/122] Edit to `echo "exit_code=1" >> "$GITHUB_OUTPUT"` --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 1ceb4f4d7f7..770cfae54af 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -34,7 +34,7 @@ jobs: id: build run: | mvn -B package --file extra/pom.xml | tee build_output.txt - echo "exit_code=$?" >> "$GITHUB_ENV" + echo "exit_code=1" >> "$GITHUB_OUTPUT" - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' From 0f35493765dfbf527e1bcf611a8ccd3e0a8e3c07 Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 11 Apr 2025 18:41:36 +0300 Subject: [PATCH 020/122] Revert few changes --- .../java/org/prebid/server/bidder/aax/AaxBidderTest.java | 2 +- .../server/it/openrtb2/aax/test-aax-bid-response.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java index 0d8b3ca4479..50c2bcb1781 100644 --- a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java @@ -54,7 +54,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() { assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()).hasSize(1) .extracting(HttpRequest::getUri) - .containsExactly(""); + .containsExactly("https://randomurl.com"); } @Test diff --git a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json index 3e9beabe3c2..87543ca7bf5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json @@ -6,10 +6,10 @@ "bid": [ { "id": "randomid", - "impid": "", + "impid": "test-imp-id", "price": 0.500000, - "adid": "", - "adm": "", + "adid": "12345678", + "adm": "some-test-ad", "cid": "987", "crid": "12345678", "h": 250, From ac9a86a2cbf36736ec720ed0c9d80301b0336697 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 11:21:39 +0300 Subject: [PATCH 021/122] Update functional ci warning --- .github/workflows/pr-functional-tests.yml | 31 +++++++++++++++++- .../workflows/pr-module-functional-tests.yml | 32 ++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index e3ac3ffcd10..1120bf81208 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -30,4 +30,33 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven - run: mvn -B verify -DskipUnitTests=true -DskipModuleFunctionalTests=true -Dtests.max-container-count=5 -DdockerfileName=Dockerfile --file extra/pom.xml + run: | + mvn -B verify + -DskipUnitTests=true + -DskipModuleFunctionalTests=true + -Dtests.max-container-count=5 + -DdockerfileName=Dockerfile + --file extra/pom.xml | tee build_output.txt + echo "exit_code=1" >> "$GITHUB_OUTPUT" + + - name: Format build output for PR comment + if: steps.build.outputs.exit_code != '0' + run: | + sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt + echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt + echo '' >> comment.txt + echo '```' >> comment.txt + cat test_failures.txt >> comment.txt + echo '```' >> comment.txt + + - name: Comment on PR with build failure output + if: steps.build.outputs.exit_code != '0' + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt + + - name: Fail if error is found in logs + if: steps.build.outputs.exit_code != '0' + run: exit 1 diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index d87fbe4857a..6a604659628 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -33,4 +33,34 @@ jobs: run: mvn package -DskipUnitTests=true --file extra/pom.xml - name: Run module tests - run: mvn -B verify -DskipUnitTests=true -DskipFunctionalTests=true -DskipModuleFunctionalTests=false -Dtests.max-container-count=5 -DdockerfileName=Dockerfile-modules --file extra/pom.xml + run: | + mvn -B verify + -DskipUnitTests=true + -DskipFunctionalTests=true + -DskipModuleFunctionalTests=false + -Dtests.max-container-count=5 + -DdockerfileName=Dockerfile-modules + --file extra/pom.xml | tee build_output.txt + echo "exit_code=1" >> "$GITHUB_OUTPUT" + + - name: Format build output for PR comment + if: steps.build.outputs.exit_code != '0' + run: | + sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt + echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt + echo '' >> comment.txt + echo '```' >> comment.txt + cat test_failures.txt >> comment.txt + echo '```' >> comment.txt + + - name: Comment on PR with build failure output + if: steps.build.outputs.exit_code != '0' + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + body-path: comment.txt + + - name: Fail if error is found in logs + if: steps.build.outputs.exit_code != '0' + run: exit 1 From 9364dfa1524a0abdc9a337f27f1ff48d5a01025f Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 11:27:00 +0300 Subject: [PATCH 022/122] Make functional tests failed --- .../org/prebid/server/functional/tests/AliasSpec.groovy | 4 ++-- .../module/analyticstag/AnalyticsTagsModuleSpec.groovy | 7 ++++--- .../java/org/prebid/server/bidder/aax/AaxBidderTest.java | 2 +- .../server/it/openrtb2/aax/test-aax-bid-response.json | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy index 4e544498f44..388d9112ff3 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy @@ -56,7 +56,7 @@ class AliasSpec extends BaseSpec { and: "Bidder request should contain request per-alies" def bidderRequests = bidder.getBidderRequests(bidRequest.id) - assert bidderRequests.size() == 2 + assert bidderRequests.size() == 0 } def "PBS shouldn't apply aliases for bidder when aliases didn't provide proper config"() { @@ -110,7 +110,7 @@ class AliasSpec extends BaseSpec { then: "Request should fail with error" def exception = thrown(PrebidServerException) assert exception.responseBody.contains("Invalid request format: request.ext.prebid.aliasgvlids. " + - "vendorId ${validId} refers to unknown bidder alias: ${bidderName}") + "vendorId ${validId} alias: ${bidderName}") } def "PBS should return an error when GVL ID alias value is lower that one"() { diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy index 82355a47996..93f7f16696e 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy @@ -21,6 +21,7 @@ import org.prebid.server.functional.util.PBSUtils import static org.prebid.server.functional.model.ModuleName.ORTB2_BLOCKING import static org.prebid.server.functional.model.ModuleName.PB_RICHMEDIA_FILTER +import static org.prebid.server.functional.model.bidder.BidderName.APPNEXUS import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.config.Endpoint.OPENRTB2_AUCTION import static org.prebid.server.functional.model.config.Stage.ALL_PROCESSED_BID_RESPONSES @@ -64,9 +65,9 @@ class AnalyticsTagsModuleSpec extends ModuleBaseSpec { and: "Should include appliedTo information in analytics tags results" verifyAll(analyticResult.results.first) { - it.status == FetchStatus.SUCCESS_ALLOW - it.appliedTo.bidders == [GENERIC.value] - it.appliedTo.impIds == bidRequest.imp.id + it.status == FetchStatus.TIMEOUT + it.appliedTo.bidders == [APPNEXUS.value] + it.appliedTo.impIds == [bidRequest.accountId] } } diff --git a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java index 50c2bcb1781..b9eb218e7f0 100644 --- a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java @@ -70,7 +70,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { assertThat(result.getErrors()).hasSize(1) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); - assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); + assertThat(error.getMessage()).startsWith("Unknown Message"); }); } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json index 87543ca7bf5..fe55b125f17 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json @@ -6,10 +6,10 @@ "bid": [ { "id": "randomid", - "impid": "test-imp-id", + "impid": "testd", "price": 0.500000, - "adid": "12345678", - "adm": "some-test-ad", + "adid": "", + "adm": "t-ad", "cid": "987", "crid": "12345678", "h": 250, From 3dc19c4179947c22a74f206284abb8fb7961a535 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 12:36:40 +0300 Subject: [PATCH 023/122] update run command --- .github/workflows/pr-functional-tests.yml | 7 +------ .github/workflows/pr-module-functional-tests.yml | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 1120bf81208..2b910bc9c0a 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -31,12 +31,7 @@ jobs: - name: Build with Maven run: | - mvn -B verify - -DskipUnitTests=true - -DskipModuleFunctionalTests=true - -Dtests.max-container-count=5 - -DdockerfileName=Dockerfile - --file extra/pom.xml | tee build_output.txt + mvn -B verify -DskipUnitTests=true -DskipModuleFunctionalTests=true -Dtests.max-container-count=5 -DdockerfileName=Dockerfile --file extra/pom.xml | tee build_output.txt echo "exit_code=1" >> "$GITHUB_OUTPUT" - name: Format build output for PR comment diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 6a604659628..11e014da4f3 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -34,13 +34,7 @@ jobs: - name: Run module tests run: | - mvn -B verify - -DskipUnitTests=true - -DskipFunctionalTests=true - -DskipModuleFunctionalTests=false - -Dtests.max-container-count=5 - -DdockerfileName=Dockerfile-modules - --file extra/pom.xml | tee build_output.txt + mvn -B verify -DskipUnitTests=true -DskipFunctionalTests=true -DskipModuleFunctionalTests=false -Dtests.max-container-count=5 -DdockerfileName=Dockerfile-modules --file extra/pom.xml | tee build_output.txt echo "exit_code=1" >> "$GITHUB_OUTPUT" - name: Format build output for PR comment From 956ba150d35e802a33d2ea1afa7e70d89ed21159 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 15:34:51 +0300 Subject: [PATCH 024/122] Update module ci tests --- .../workflows/pr-module-functional-tests.yml | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 11e014da4f3..869388f01bd 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -34,26 +34,45 @@ jobs: - name: Run module tests run: | - mvn -B verify -DskipUnitTests=true -DskipFunctionalTests=true -DskipModuleFunctionalTests=false -Dtests.max-container-count=5 -DdockerfileName=Dockerfile-modules --file extra/pom.xml | tee build_output.txt - echo "exit_code=1" >> "$GITHUB_OUTPUT" + set +e + mvn -B verify \ + -DskipUnitTests=true \ + -DskipFunctionalTests=true \ + -DskipModuleFunctionalTests=false \ + -Dtests.max-container-count=5 \ + -DdockerfileName=Dockerfile-modules \ + --file extra/pom.xml | tee build_output.txt + echo "exit_code=$?" >> $GITHUB_OUTPUT - - name: Format build output for PR comment + - name: Extract Failsafe Failures if: steps.build.outputs.exit_code != '0' run: | - sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt - echo '' >> comment.txt - echo '```' >> comment.txt - cat test_failures.txt >> comment.txt - echo '```' >> comment.txt - - - name: Comment on PR with build failure output + echo "Looking for failed integration tests..." + mkdir -p failsafe-failures + find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; + grep -iE "Tests run:.*Failures: [1-9]|ERROR|FAILURE" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." + cat test_failures.txt + + - name: Read test failures into output + id: test-results + if: steps.build.outputs.exit_code != '0' + run: | + content=$(test_failures.txt) + echo "content<> $GITHUB_OUTPUT + echo "$content" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Comment test failures on PR if: steps.build.outputs.exit_code != '0' uses: peter-evans/create-or-update-comment@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt + body: | + 🚨 Functional tests failed in CI: + + ``` + ${{ steps.test-results.outputs.content }} + ``` - name: Fail if error is found in logs if: steps.build.outputs.exit_code != '0' From b2174a0e3a813d5eea68480556c6378ffc201d23 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 16:04:34 +0300 Subject: [PATCH 025/122] Add id build for pr-module ci and update content --- .github/workflows/pr-module-functional-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 869388f01bd..d26037b291b 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -33,6 +33,7 @@ jobs: run: mvn package -DskipUnitTests=true --file extra/pom.xml - name: Run module tests + id: build run: | set +e mvn -B verify \ @@ -57,7 +58,7 @@ jobs: id: test-results if: steps.build.outputs.exit_code != '0' run: | - content=$(test_failures.txt) + content=$(cat test_failures.txt) echo "content<> $GITHUB_OUTPUT echo "$content" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT From 61d52d56c1e9900b990540d7f17af8f5812c7d28 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 16:36:12 +0300 Subject: [PATCH 026/122] Minor update --- .github/workflows/pr-module-functional-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index d26037b291b..76d9b30806c 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -43,7 +43,9 @@ jobs: -Dtests.max-container-count=5 \ -DdockerfileName=Dockerfile-modules \ --file extra/pom.xml | tee build_output.txt - echo "exit_code=$?" >> $GITHUB_OUTPUT + result=${PIPESTATUS[0]} + echo "exit_code=$result" >> "$GITHUB_OUTPUT" + exit $result - name: Extract Failsafe Failures if: steps.build.outputs.exit_code != '0' From 30cf5cb8743109f9d45dd0f0af4e1ead40003964 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 16:58:26 +0300 Subject: [PATCH 027/122] Remove instant exit --- .github/workflows/pr-module-functional-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 76d9b30806c..3f7568ee606 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -45,7 +45,6 @@ jobs: --file extra/pom.xml | tee build_output.txt result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" - exit $result - name: Extract Failsafe Failures if: steps.build.outputs.exit_code != '0' From d796d76f041571566c76c0e924053c1699d111c0 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 19:31:15 +0300 Subject: [PATCH 028/122] Update search by "Results:" --- .github/workflows/pr-module-functional-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 3f7568ee606..003e35f6aac 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -49,11 +49,11 @@ jobs: - name: Extract Failsafe Failures if: steps.build.outputs.exit_code != '0' run: | - echo "Looking for failed integration tests..." + echo "Looking for failed integration test results..." mkdir -p failsafe-failures find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; - grep -iE "Tests run:.*Failures: [1-9]|ERROR|FAILURE" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." - cat test_failures.txt + grep -A 1 "Results:" failsafe-failures/* > test_failures.txt + cat test_failures.txt - name: Read test failures into output id: test-results From 798bb3562ad8a391a2f77bd4373aee1db647051c Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 20:18:59 +0300 Subject: [PATCH 029/122] Update search by "Results:" --- .github/workflows/pr-module-functional-tests.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 003e35f6aac..fd8e2810f77 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -51,9 +51,19 @@ jobs: run: | echo "Looking for failed integration test results..." mkdir -p failsafe-failures - find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; - grep -A 1 "Results:" failsafe-failures/* > test_failures.txt - cat test_failures.txt + + find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; || true + + if compgen -G "failsafe-failures/*.txt" > /dev/null; then + for file in failsafe-failures/*.txt; do + echo "--- $file ---" >> test_failures.txt + grep -A 1 "Results:" "$file" >> test_failures.txt + done + else + touch test_failures.txt + fi + + cat test_failures.txt - name: Read test failures into output id: test-results From 78bda80918136107f44b01eecdcf78832d2a9283 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 21:42:40 +0300 Subject: [PATCH 030/122] Minio update of search --- .github/workflows/pr-module-functional-tests.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index fd8e2810f77..c4bdd7e559f 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -49,20 +49,10 @@ jobs: - name: Extract Failsafe Failures if: steps.build.outputs.exit_code != '0' run: | - echo "Looking for failed integration test results..." + echo "Looking for failed functional tests..." mkdir -p failsafe-failures - - find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; || true - - if compgen -G "failsafe-failures/*.txt" > /dev/null; then - for file in failsafe-failures/*.txt; do - echo "--- $file ---" >> test_failures.txt - grep -A 1 "Results:" "$file" >> test_failures.txt - done - else - touch test_failures.txt - fi - + find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; + grep -iE "Tests run:.*Failures: [1-9]|ERROR|FAILURE" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." cat test_failures.txt - name: Read test failures into output From 7e17cfdc47f053daece6c247759ea969bab51655 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 22:15:21 +0300 Subject: [PATCH 031/122] Filter out "Failures: 0" --- .github/workflows/pr-module-functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index c4bdd7e559f..e987d6548d5 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -52,7 +52,7 @@ jobs: echo "Looking for failed functional tests..." mkdir -p failsafe-failures find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; - grep -iE "Tests run:.*Failures: [1-9]|ERROR|FAILURE" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." + grep -iE "Tests run:.*Failures: [1-9][0-9]*|ERROR|FAILURE" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." cat test_failures.txt - name: Read test failures into output From 9c2e83bb36d618a10d555242ca24c4e7f210cee7 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 14 Apr 2025 23:23:54 +0300 Subject: [PATCH 032/122] Filter out "Failures: 0" --- .github/workflows/pr-module-functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index e987d6548d5..950932b6007 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -52,7 +52,7 @@ jobs: echo "Looking for failed functional tests..." mkdir -p failsafe-failures find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; - grep -iE "Tests run:.*Failures: [1-9][0-9]*|ERROR|FAILURE" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." + grep -E "Tests run: [0-9]+, Failures: [1-9][0-9]*" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." cat test_failures.txt - name: Read test failures into output From a6f92b619ecc232e26932fbe447ba990e1f91b45 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 15 Apr 2025 01:40:34 +0300 Subject: [PATCH 033/122] Make test failed --- .../server/functional/tests/module/AbTestingModuleSpec.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy index 73e44cc3232..6fab53eef45 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy @@ -12,6 +12,7 @@ import org.prebid.server.functional.model.request.auction.FetchStatus import org.prebid.server.functional.model.request.auction.TraceLevel import org.prebid.server.functional.model.response.auction.AnalyticResult import org.prebid.server.functional.model.response.auction.InvocationResult +import org.prebid.server.functional.model.response.auction.ResponseAction import org.prebid.server.functional.service.PrebidServerService import org.prebid.server.functional.util.PBSUtils @@ -81,7 +82,7 @@ class AbTestingModuleSpec extends ModuleBaseSpec { def invocationResults = response?.ext?.prebid?.modules?.trace?.stages?.outcomes?.groups?.invocationResults?.flatten() as List verifyAll(invocationResults) { it.status == [SUCCESS, SUCCESS] - it.action == [NO_ACTION, NO_ACTION] + it.action == [ResponseAction.UPDATE, ResponseAction.UPDATE] } and: "Shouldn't include any analytics tags" From 2315e6e5f7a37c60a3c951039d96a2b6cec1fb8c Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 15 Apr 2025 10:15:23 +0300 Subject: [PATCH 034/122] Update functional all CI corresponding to the functional tests --- .github/workflows/pr-functional-tests.yml | 44 +++++++++++++------ .../workflows/pr-module-functional-tests.yml | 2 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 2b910bc9c0a..723d96329cf 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -31,26 +31,44 @@ jobs: - name: Build with Maven run: | - mvn -B verify -DskipUnitTests=true -DskipModuleFunctionalTests=true -Dtests.max-container-count=5 -DdockerfileName=Dockerfile --file extra/pom.xml | tee build_output.txt - echo "exit_code=1" >> "$GITHUB_OUTPUT" + mvn -B verify \ + -DskipUnitTests=true \ + -DskipModuleFunctionalTests=true \ + -Dtests.max-container-count=5 \ + -DdockerfileName=Dockerfile \ + --file extra/pom.xml | tee build_output.txt + result=${PIPESTATUS[0]} + echo "exit_code=$result" >> "$GITHUB_OUTPUT" - - name: Format build output for PR comment + - name: Extract Failsafe Failures if: steps.build.outputs.exit_code != '0' run: | - sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt - echo '' >> comment.txt - echo '```' >> comment.txt - cat test_failures.txt >> comment.txt - echo '```' >> comment.txt - - - name: Comment on PR with build failure output + echo "Looking for failed functional tests..." + mkdir -p failsafe-failures + find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; + grep -E "Tests run: [0-9]+, Failures: [1-9][0-9]*" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." + cat test_failures.txt + + - name: Read test failures into output + id: test-results + if: steps.build.outputs.exit_code != '0' + run: | + content=$(cat test_failures.txt) + echo "content<> $GITHUB_OUTPUT + echo "$content" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Comment test failures on PR if: steps.build.outputs.exit_code != '0' uses: peter-evans/create-or-update-comment@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt + body: | + "❌ **Functional tests CI Failed**" + + ``` + ${{ steps.test-results.outputs.content }} + ``` - name: Fail if error is found in logs if: steps.build.outputs.exit_code != '0' diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 950932b6007..077bfa3714c 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -70,7 +70,7 @@ jobs: with: issue-number: ${{ github.event.pull_request.number }} body: | - 🚨 Functional tests failed in CI: + "❌ **Functional module tests CI Failed**" ``` ${{ steps.test-results.outputs.content }} From a95351e5dbdcf698120ec667b5442db59e29cc35 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 15 Apr 2025 14:06:01 +0300 Subject: [PATCH 035/122] Minor update --- .github/workflows/pr-functional-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 723d96329cf..a8981b980f4 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -31,6 +31,7 @@ jobs: - name: Build with Maven run: | + set +e mvn -B verify \ -DskipUnitTests=true \ -DskipModuleFunctionalTests=true \ From 225fb5f6d1aec2059c21dddbced97d18f3bca610 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 15 Apr 2025 16:38:09 +0300 Subject: [PATCH 036/122] Add failed test --- .../org/prebid/server/functional/tests/AccountSpec.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy index 6bfb51536cc..b408428abf3 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy @@ -9,11 +9,13 @@ import org.prebid.server.functional.model.request.auction.BidRequest import org.prebid.server.functional.model.request.auction.Site import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils +import spock.lang.IgnoreRest import static io.netty.handler.codec.http.HttpResponseStatus.UNAUTHORIZED class AccountSpec extends BaseSpec { + @IgnoreRest def "PBS should reject request with inactive account"() { given: "Pbs config with enforce-valid-account and default-account-config" def pbsService = pbsServiceFactory.getService( From 79f4d515acbbb2a272203eaca79d8a0fb97a452a Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 15 Apr 2025 16:38:23 +0300 Subject: [PATCH 037/122] Add failed test --- .../org/prebid/server/functional/tests/AccountSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy index b408428abf3..084cf2320aa 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy @@ -37,7 +37,7 @@ class AccountSpec extends BaseSpec { then: "PBS should reject the entire auction" def exception = thrown(PrebidServerException) assert exception.statusCode == UNAUTHORIZED.code() - assert exception.responseBody == "Account $accountId is inactive" + assert exception.responseBody == "Empty" where: enforceValidAccount << [true, false] From 2409f47cfb83456781a67fee5a47b2bf3707f1ab Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 16 Apr 2025 11:51:06 +0300 Subject: [PATCH 038/122] Add id for functional asserts --- .github/workflows/pr-functional-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index a8981b980f4..e5ba3121ec1 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -30,6 +30,7 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven + id: build run: | set +e mvn -B verify \ From 9401ed409d51481f3d5c581de3096e4661b6ea05 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 17 Apr 2025 12:09:29 +0300 Subject: [PATCH 039/122] Correct naming --- .github/workflows/pr-functional-tests.yml | 2 +- .github/workflows/pr-module-functional-tests.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index e5ba3121ec1..a782ea26b82 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -66,7 +66,7 @@ jobs: with: issue-number: ${{ github.event.pull_request.number }} body: | - "❌ **Functional tests CI Failed**" + ❌ **Functional tests CI Failed** ``` ${{ steps.test-results.outputs.content }} diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 077bfa3714c..25e816f5c20 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -70,8 +70,8 @@ jobs: with: issue-number: ${{ github.event.pull_request.number }} body: | - "❌ **Functional module tests CI Failed**" - + ❌ **Functional module tests CI Failed** + p ``` ${{ steps.test-results.outputs.content }} ``` From 662d952408793fc683551ca93b75a46d7aefc240 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:09:22 +0300 Subject: [PATCH 040/122] Revert "Add failed test" This reverts commit 225fb5f6d1aec2059c21dddbced97d18f3bca610. --- .../org/prebid/server/functional/tests/AccountSpec.groovy | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy index 084cf2320aa..861290cc16d 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy @@ -9,13 +9,11 @@ import org.prebid.server.functional.model.request.auction.BidRequest import org.prebid.server.functional.model.request.auction.Site import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import spock.lang.IgnoreRest import static io.netty.handler.codec.http.HttpResponseStatus.UNAUTHORIZED class AccountSpec extends BaseSpec { - @IgnoreRest def "PBS should reject request with inactive account"() { given: "Pbs config with enforce-valid-account and default-account-config" def pbsService = pbsServiceFactory.getService( From 782c5faca455dda24c6a431762564c67554e82e0 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:10:47 +0300 Subject: [PATCH 041/122] Revert "Make functional tests failed" This reverts commit 9364dfa1 --- .../org/prebid/server/functional/tests/AliasSpec.groovy | 5 +++-- .../module/analyticstag/AnalyticsTagsModuleSpec.groovy | 7 +++---- .../java/org/prebid/server/bidder/aax/AaxBidderTest.java | 2 +- .../server/it/openrtb2/aax/test-aax-bid-response.json | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy index af58b1e25f1..4c4ec51f6f2 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy @@ -56,7 +56,7 @@ class AliasSpec extends BaseSpec { and: "Bidder request should contain request per-alies" def bidderRequests = bidder.getBidderRequests(bidRequest.id) - assert bidderRequests.size() == 0 + assert bidderRequests.size() == 2 } def "PBS shouldn't apply aliases for bidder when aliases didn't provide proper config"() { @@ -109,7 +109,8 @@ class AliasSpec extends BaseSpec { then: "Request should fail with error" def exception = thrown(PrebidServerException) - assert exception.responseBody.contains("Invalid request format") + assert exception.responseBody.contains("Invalid request format: request.ext.prebid.aliasgvlids. " + + "vendorId ${validId} refers to unknown bidder alias: ${bidderName}") } def "PBS should return an error when GVL ID alias value is lower that one"() { diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy index 93f7f16696e..82355a47996 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy @@ -21,7 +21,6 @@ import org.prebid.server.functional.util.PBSUtils import static org.prebid.server.functional.model.ModuleName.ORTB2_BLOCKING import static org.prebid.server.functional.model.ModuleName.PB_RICHMEDIA_FILTER -import static org.prebid.server.functional.model.bidder.BidderName.APPNEXUS import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.config.Endpoint.OPENRTB2_AUCTION import static org.prebid.server.functional.model.config.Stage.ALL_PROCESSED_BID_RESPONSES @@ -65,9 +64,9 @@ class AnalyticsTagsModuleSpec extends ModuleBaseSpec { and: "Should include appliedTo information in analytics tags results" verifyAll(analyticResult.results.first) { - it.status == FetchStatus.TIMEOUT - it.appliedTo.bidders == [APPNEXUS.value] - it.appliedTo.impIds == [bidRequest.accountId] + it.status == FetchStatus.SUCCESS_ALLOW + it.appliedTo.bidders == [GENERIC.value] + it.appliedTo.impIds == bidRequest.imp.id } } diff --git a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java index b9eb218e7f0..50c2bcb1781 100644 --- a/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/aax/AaxBidderTest.java @@ -70,7 +70,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { assertThat(result.getErrors()).hasSize(1) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); - assertThat(error.getMessage()).startsWith("Unknown Message"); + assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); }); } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json index fe55b125f17..87543ca7bf5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/aax/test-aax-bid-response.json @@ -6,10 +6,10 @@ "bid": [ { "id": "randomid", - "impid": "testd", + "impid": "test-imp-id", "price": 0.500000, - "adid": "", - "adm": "t-ad", + "adid": "12345678", + "adm": "some-test-ad", "cid": "987", "crid": "12345678", "h": 250, From 02124124387277cfb53b05ebfb9d9db422ff1a97 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:11:17 +0300 Subject: [PATCH 042/122] Revert "Make test failed" This reverts commit a6f92b619ecc232e26932fbe447ba990e1f91b45. --- .../server/functional/tests/module/AbTestingModuleSpec.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy index 6fab53eef45..73e44cc3232 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/AbTestingModuleSpec.groovy @@ -12,7 +12,6 @@ import org.prebid.server.functional.model.request.auction.FetchStatus import org.prebid.server.functional.model.request.auction.TraceLevel import org.prebid.server.functional.model.response.auction.AnalyticResult import org.prebid.server.functional.model.response.auction.InvocationResult -import org.prebid.server.functional.model.response.auction.ResponseAction import org.prebid.server.functional.service.PrebidServerService import org.prebid.server.functional.util.PBSUtils @@ -82,7 +81,7 @@ class AbTestingModuleSpec extends ModuleBaseSpec { def invocationResults = response?.ext?.prebid?.modules?.trace?.stages?.outcomes?.groups?.invocationResults?.flatten() as List verifyAll(invocationResults) { it.status == [SUCCESS, SUCCESS] - it.action == [ResponseAction.UPDATE, ResponseAction.UPDATE] + it.action == [NO_ACTION, NO_ACTION] } and: "Shouldn't include any analytics tags" From 443f9527015d5d12a876db85c72f25d1237e5369 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:15:13 +0300 Subject: [PATCH 043/122] Revert "Add failed test" This reverts commit 79f4d515acbbb2a272203eaca79d8a0fb97a452a. --- .../org/prebid/server/functional/tests/AccountSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy index 861290cc16d..6bfb51536cc 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy @@ -35,7 +35,7 @@ class AccountSpec extends BaseSpec { then: "PBS should reject the entire auction" def exception = thrown(PrebidServerException) assert exception.statusCode == UNAUTHORIZED.code() - assert exception.responseBody == "Empty" + assert exception.responseBody == "Account $accountId is inactive" where: enforceValidAccount << [true, false] From 0d0bfbe2ac4d1a0b14a4e9f96aa458447edc27a6 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:15:59 +0300 Subject: [PATCH 044/122] Revert changes --- .../groovy/org/prebid/server/functional/tests/AliasSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy index 4c4ec51f6f2..9013978f76f 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy @@ -110,7 +110,7 @@ class AliasSpec extends BaseSpec { then: "Request should fail with error" def exception = thrown(PrebidServerException) assert exception.responseBody.contains("Invalid request format: request.ext.prebid.aliasgvlids. " + - "vendorId ${validId} refers to unknown bidder alias: ${bidderName}") + "vendorId ${validId} refers to unknown bidder alias: ${bidderName.toLowerCase()}") } def "PBS should return an error when GVL ID alias value is lower that one"() { From c7922e73f4467c667ceb15bcd6d7c8a3ff5b8656 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:17:11 +0300 Subject: [PATCH 045/122] Minor typo --- .github/workflows/pr-module-functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 25e816f5c20..aa8c1ba7606 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -71,7 +71,7 @@ jobs: issue-number: ${{ github.event.pull_request.number }} body: | ❌ **Functional module tests CI Failed** - p + ``` ${{ steps.test-results.outputs.content }} ``` From 869ac8d30ef5fa67d03f68ecc89ace6cda64aba3 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 22 Apr 2025 12:37:35 +0300 Subject: [PATCH 046/122] Update exit code logic --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 770cfae54af..e80f146b76a 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -34,7 +34,7 @@ jobs: id: build run: | mvn -B package --file extra/pom.xml | tee build_output.txt - echo "exit_code=1" >> "$GITHUB_OUTPUT" + echo "exit_code=$result" >> "$GITHUB_OUTPUT" - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' From df22a4c5ec551e91b85cf6e7af5e374d376d8915 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Mon, 12 May 2025 13:55:47 +0300 Subject: [PATCH 047/122] Simulate mass fail tests --- .../org/prebid/server/functional/model/privacy/Metric.groovy | 1 + .../server/functional/tests/module/GeneralModuleSpec.groovy | 4 ++-- .../tests/module/ortb2blocking/Ortb2BlockingSpec.groovy | 2 +- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 2 +- src/test/java/org/prebid/server/it/RubiconTest.java | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy index 80d779e069d..490c1456e53 100644 --- a/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy @@ -7,6 +7,7 @@ import org.prebid.server.functional.model.request.setuid.SetuidRequest enum Metric { + ALERT_GENERAL("alerts.general"), PROCESSED_ACTIVITY_RULES_COUNT("requests.activity.processedrules.count"), ACCOUNT_PROCESSED_RULES_COUNT("requests.activity.processedrules.count"), TEMPLATE_ADAPTER_DISALLOWED_COUNT("adapter.{bidderName}.activity.{activityType}.disallowed.count"), diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 23316766a7d..8dfb3fc59a6 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -79,7 +79,7 @@ class GeneralModuleSpec extends ModuleBaseSpec { and: "Ortb2blocking module call metrics should be updated" def metrics = pbsServiceWithMultipleModule.sendCollectedMetricsRequest() - assert metrics[CALL_METRIC.formatted(ORTB2_BLOCKING.code, BIDDER_REQUEST.metricValue, ORTB2_BLOCKING_BIDDER_REQUEST.code)] == 1 + assert !metrics[CALL_METRIC.formatted(ORTB2_BLOCKING.code, BIDDER_REQUEST.metricValue, ORTB2_BLOCKING_BIDDER_REQUEST.code)] == 1 assert metrics[CALL_METRIC.formatted(ORTB2_BLOCKING.code, RAW_BIDDER_RESPONSE.metricValue, ORTB2_BLOCKING_RAW_BIDDER_RESPONSE.code)] == 1 assert metrics[NOOP_METRIC.formatted(ORTB2_BLOCKING.code, BIDDER_REQUEST.metricValue, ORTB2_BLOCKING_BIDDER_REQUEST.code)] == 1 assert metrics[NOOP_METRIC.formatted(ORTB2_BLOCKING.code, RAW_BIDDER_RESPONSE.metricValue, ORTB2_BLOCKING_RAW_BIDDER_RESPONSE.code)] == 1 @@ -173,7 +173,7 @@ class GeneralModuleSpec extends ModuleBaseSpec { assert metrics[NOOP_METRIC.formatted(ORTB2_BLOCKING.code, RAW_BIDDER_RESPONSE.metricValue, ORTB2_BLOCKING_RAW_BIDDER_RESPONSE.code)] == 1 and: "RB-Richmedia-Filter module call metrics should be updated" - assert metrics[CALL_METRIC.formatted(PB_RICHMEDIA_FILTER.code, ALL_PROCESSED_BID_RESPONSES.metricValue, PB_RICHMEDIA_FILTER_ALL_PROCESSED_RESPONSES.code)] == 1 + assert !metrics[CALL_METRIC.formatted(PB_RICHMEDIA_FILTER.code, ALL_PROCESSED_BID_RESPONSES.metricValue, PB_RICHMEDIA_FILTER_ALL_PROCESSED_RESPONSES.code)] == 1 assert metrics[NOOP_METRIC.formatted(PB_RICHMEDIA_FILTER.code, ALL_PROCESSED_BID_RESPONSES.metricValue, PB_RICHMEDIA_FILTER_ALL_PROCESSED_RESPONSES.code)] == 1 cleanup: "Stop and remove pbs container" diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy index 2b2de98750b..0faed1545e6 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy @@ -56,7 +56,7 @@ import static org.prebid.server.functional.testcontainers.Dependencies.getNetwor class Ortb2BlockingSpec extends ModuleBaseSpec { - private static final String WILDCARD = '*' + private static final String WILDCARD = '' private static final Map IX_CONFIG = ["adapters.ix.enabled" : "true", "adapters.ix.endpoint": "$networkServiceContainer.rootUri/auction".toString()] private static final Map PBS_CONFIG = getOrtb2BlockingSettings() + IX_CONFIG + diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 3ba06b5d4a9..456fb31585d 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -54,7 +54,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() { // then assertThat(result.getErrors()).isEmpty(); - assertThat(result.getValue()).hasSize(1) + assertThat(result.getValue()).hasSize(2) .extracting(HttpRequest::getUri) .containsExactly("https://randomurl.com"); } diff --git a/src/test/java/org/prebid/server/it/RubiconTest.java b/src/test/java/org/prebid/server/it/RubiconTest.java index b695d827572..296489d87ea 100644 --- a/src/test/java/org/prebid/server/it/RubiconTest.java +++ b/src/test/java/org/prebid/server/it/RubiconTest.java @@ -38,6 +38,6 @@ public void testOpenrtb2AuctionCoreFunctionality() throws IOException, JSONExcep "openrtb2/rubicon/test-auction-rubicon-response.json", response, singletonList("rubicon"), - new Customization("seatbid[*].bid[*].id", (o1, o2) -> true)); + new Customization("seatbid[*].bid[*].id", (o1, o2) -> false)); } } From 36068f1540cc21ed09db5ec4a4bafd2027f78e4d Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Mon, 12 May 2025 14:47:21 +0300 Subject: [PATCH 048/122] Revert "Simulate mass fail tests" This reverts commit df22a4c5ec551e91b85cf6e7af5e374d376d8915. --- .../org/prebid/server/functional/model/privacy/Metric.groovy | 1 - .../server/functional/tests/module/GeneralModuleSpec.groovy | 4 ++-- .../tests/module/ortb2blocking/Ortb2BlockingSpec.groovy | 2 +- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 2 +- src/test/java/org/prebid/server/it/RubiconTest.java | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy index 490c1456e53..80d779e069d 100644 --- a/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/Metric.groovy @@ -7,7 +7,6 @@ import org.prebid.server.functional.model.request.setuid.SetuidRequest enum Metric { - ALERT_GENERAL("alerts.general"), PROCESSED_ACTIVITY_RULES_COUNT("requests.activity.processedrules.count"), ACCOUNT_PROCESSED_RULES_COUNT("requests.activity.processedrules.count"), TEMPLATE_ADAPTER_DISALLOWED_COUNT("adapter.{bidderName}.activity.{activityType}.disallowed.count"), diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 8dfb3fc59a6..23316766a7d 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -79,7 +79,7 @@ class GeneralModuleSpec extends ModuleBaseSpec { and: "Ortb2blocking module call metrics should be updated" def metrics = pbsServiceWithMultipleModule.sendCollectedMetricsRequest() - assert !metrics[CALL_METRIC.formatted(ORTB2_BLOCKING.code, BIDDER_REQUEST.metricValue, ORTB2_BLOCKING_BIDDER_REQUEST.code)] == 1 + assert metrics[CALL_METRIC.formatted(ORTB2_BLOCKING.code, BIDDER_REQUEST.metricValue, ORTB2_BLOCKING_BIDDER_REQUEST.code)] == 1 assert metrics[CALL_METRIC.formatted(ORTB2_BLOCKING.code, RAW_BIDDER_RESPONSE.metricValue, ORTB2_BLOCKING_RAW_BIDDER_RESPONSE.code)] == 1 assert metrics[NOOP_METRIC.formatted(ORTB2_BLOCKING.code, BIDDER_REQUEST.metricValue, ORTB2_BLOCKING_BIDDER_REQUEST.code)] == 1 assert metrics[NOOP_METRIC.formatted(ORTB2_BLOCKING.code, RAW_BIDDER_RESPONSE.metricValue, ORTB2_BLOCKING_RAW_BIDDER_RESPONSE.code)] == 1 @@ -173,7 +173,7 @@ class GeneralModuleSpec extends ModuleBaseSpec { assert metrics[NOOP_METRIC.formatted(ORTB2_BLOCKING.code, RAW_BIDDER_RESPONSE.metricValue, ORTB2_BLOCKING_RAW_BIDDER_RESPONSE.code)] == 1 and: "RB-Richmedia-Filter module call metrics should be updated" - assert !metrics[CALL_METRIC.formatted(PB_RICHMEDIA_FILTER.code, ALL_PROCESSED_BID_RESPONSES.metricValue, PB_RICHMEDIA_FILTER_ALL_PROCESSED_RESPONSES.code)] == 1 + assert metrics[CALL_METRIC.formatted(PB_RICHMEDIA_FILTER.code, ALL_PROCESSED_BID_RESPONSES.metricValue, PB_RICHMEDIA_FILTER_ALL_PROCESSED_RESPONSES.code)] == 1 assert metrics[NOOP_METRIC.formatted(PB_RICHMEDIA_FILTER.code, ALL_PROCESSED_BID_RESPONSES.metricValue, PB_RICHMEDIA_FILTER_ALL_PROCESSED_RESPONSES.code)] == 1 cleanup: "Stop and remove pbs container" diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy index 0faed1545e6..2b2de98750b 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy @@ -56,7 +56,7 @@ import static org.prebid.server.functional.testcontainers.Dependencies.getNetwor class Ortb2BlockingSpec extends ModuleBaseSpec { - private static final String WILDCARD = '' + private static final String WILDCARD = '*' private static final Map IX_CONFIG = ["adapters.ix.enabled" : "true", "adapters.ix.endpoint": "$networkServiceContainer.rootUri/auction".toString()] private static final Map PBS_CONFIG = getOrtb2BlockingSettings() + IX_CONFIG + diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 456fb31585d..3ba06b5d4a9 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -54,7 +54,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() { // then assertThat(result.getErrors()).isEmpty(); - assertThat(result.getValue()).hasSize(2) + assertThat(result.getValue()).hasSize(1) .extracting(HttpRequest::getUri) .containsExactly("https://randomurl.com"); } diff --git a/src/test/java/org/prebid/server/it/RubiconTest.java b/src/test/java/org/prebid/server/it/RubiconTest.java index 296489d87ea..b695d827572 100644 --- a/src/test/java/org/prebid/server/it/RubiconTest.java +++ b/src/test/java/org/prebid/server/it/RubiconTest.java @@ -38,6 +38,6 @@ public void testOpenrtb2AuctionCoreFunctionality() throws IOException, JSONExcep "openrtb2/rubicon/test-auction-rubicon-response.json", response, singletonList("rubicon"), - new Customization("seatbid[*].bid[*].id", (o1, o2) -> false)); + new Customization("seatbid[*].bid[*].id", (o1, o2) -> true)); } } From 3b0b98f971ff0a4ef5c72c07a3de719dbcaf5827 Mon Sep 17 00:00:00 2001 From: markiian Date: Sat, 17 May 2025 15:52:26 +0300 Subject: [PATCH 049/122] Update workflow after review --- .github/workflows/pr-functional-tests.yml | 32 ++++++------------- .../workflows/pr-module-functional-tests.yml | 32 ++++++------------- 2 files changed, 20 insertions(+), 44 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index a782ea26b82..4b596293756 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -42,35 +42,23 @@ jobs: result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" - - name: Extract Failsafe Failures + - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | - echo "Looking for failed functional tests..." - mkdir -p failsafe-failures - find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; - grep -E "Tests run: [0-9]+, Failures: [1-9][0-9]*" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." - cat test_failures.txt + sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt + echo "❌ **Functional Test Failures**" > comment.txt + echo '' >> comment.txt + echo '```' >> comment.txt + cat test_failures.txt >> comment.txt + echo '```' >> comment.txt - - name: Read test failures into output - id: test-results - if: steps.build.outputs.exit_code != '0' - run: | - content=$(cat test_failures.txt) - echo "content<> $GITHUB_OUTPUT - echo "$content" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - - name: Comment test failures on PR + - name: Comment on PR with build failure output if: steps.build.outputs.exit_code != '0' uses: peter-evans/create-or-update-comment@v4 with: + token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} - body: | - ❌ **Functional tests CI Failed** - - ``` - ${{ steps.test-results.outputs.content }} - ``` + body-path: comment.txt - name: Fail if error is found in logs if: steps.build.outputs.exit_code != '0' diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index aa8c1ba7606..37dadbf7c48 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -46,35 +46,23 @@ jobs: result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" - - name: Extract Failsafe Failures + - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | - echo "Looking for failed functional tests..." - mkdir -p failsafe-failures - find . -type f -path "*/failsafe-reports/*.txt" -exec cp {} failsafe-failures/ \; - grep -E "Tests run: [0-9]+, Failures: [1-9][0-9]*" failsafe-failures/* > test_failures.txt || echo "No obvious test failures found." - cat test_failures.txt + sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt + echo "❌ **Module Functional Test Failures**" > comment.txt + echo '' >> comment.txt + echo '```' >> comment.txt + cat test_failures.txt >> comment.txt + echo '```' >> comment.txt - - name: Read test failures into output - id: test-results - if: steps.build.outputs.exit_code != '0' - run: | - content=$(cat test_failures.txt) - echo "content<> $GITHUB_OUTPUT - echo "$content" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - - name: Comment test failures on PR + - name: Comment on PR with build failure output if: steps.build.outputs.exit_code != '0' uses: peter-evans/create-or-update-comment@v4 with: + token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} - body: | - ❌ **Functional module tests CI Failed** - - ``` - ${{ steps.test-results.outputs.content }} - ``` + body-path: comment.txt - name: Fail if error is found in logs if: steps.build.outputs.exit_code != '0' From f383cf212c227480eb123b0c1f6620cb4ae500bc Mon Sep 17 00:00:00 2001 From: markiian Date: Sat, 17 May 2025 16:02:17 +0300 Subject: [PATCH 050/122] Simulate mass fail tests --- .../server/functional/tests/AccountResolutionSpec.groovy | 4 ++-- .../tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy index dce9cbc1ce6..d12e3c75f66 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy @@ -32,7 +32,7 @@ class AccountResolutionSpec extends BaseSpec { then: "Bidder request should contain publisher id from AMP tag id" def bidderRequest = bidder.getBidderRequest(storedRequest.id) - assert bidderRequest.site.publisher.id == accountId as String + assert bidderRequest.site.publisher.id == null } def "PBS should prefer account from publisher id during auction account resolution"() { @@ -55,7 +55,7 @@ class AccountResolutionSpec extends BaseSpec { then: "Bidder request should contain publisher id from request publisher id" def bidderRequest = bidder.getBidderRequest(bidRequest.id) - assert bidderRequest.accountId == accountId + assert bidderRequest.accountId == null where: distributionChannel << [SITE, APP] diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy index 82355a47996..7d3dc463b07 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy @@ -59,12 +59,12 @@ class AnalyticsTagsModuleSpec extends ModuleBaseSpec { and: "Analytics tag should contain results with name and success status" def analyticResult = analyticsTagPrebid.analyticsTags.activities.first - assert analyticResult.status == FetchStatus.SUCCESS + assert analyticResult.status == null assert analyticResult.name == ModuleActivityName.ORTB2_BLOCKING and: "Should include appliedTo information in analytics tags results" verifyAll(analyticResult.results.first) { - it.status == FetchStatus.SUCCESS_ALLOW + it.status == null it.appliedTo.bidders == [GENERIC.value] it.appliedTo.impIds == bidRequest.imp.id } From 58aacf4bdd8fe1a0a1a6889583de4c1d5c00a2e6 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 12:43:31 +0300 Subject: [PATCH 051/122] Simulate mass fail tests --- src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java b/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java index 09412abe65f..39668a7cfa9 100644 --- a/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java +++ b/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java @@ -49,7 +49,7 @@ public class OpenxBidder implements Bidder { - private static final String OPENX_CONFIG = "hb_pbs_1.0.0"; + private static final String OPENX_CONFIG = "hb_pbs_1.0.0"; private static final String DEFAULT_BID_CURRENCY = "USD"; private static final String CUSTOM_PARAMS_KEY = "customParams"; private static final String BIDDER_EXT = "bidder"; @@ -73,6 +73,8 @@ public Result>> makeHttpRequests(BidRequest bidRequ final Map> differentiatedImps = bidRequest.getImp().stream() .collect(Collectors.groupingBy(OpenxBidder::resolveImpType)); + + final List processingErrors = new ArrayList<>(); final List outgoingRequests = makeRequests( bidRequest, From 6063afebae7705b606c2678b845604f249b311c8 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 14:47:17 +0300 Subject: [PATCH 052/122] Workflow functional doesn't triggered on check style --- .github/workflows/pr-functional-tests.yml | 1 + .github/workflows/pr-module-functional-tests.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 4b596293756..51b11679ab1 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -38,6 +38,7 @@ jobs: -DskipModuleFunctionalTests=true \ -Dtests.max-container-count=5 \ -DdockerfileName=Dockerfile \ + -Dcheckstyle.skip \ --file extra/pom.xml | tee build_output.txt result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 37dadbf7c48..8006a36fd0e 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -30,7 +30,7 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven - run: mvn package -DskipUnitTests=true --file extra/pom.xml + run: mvn package -Dcheckstyle.skip -DskipUnitTests=true --file extra/pom.xml - name: Run module tests id: build @@ -42,6 +42,7 @@ jobs: -DskipModuleFunctionalTests=false \ -Dtests.max-container-count=5 \ -DdockerfileName=Dockerfile-modules \ + -Dcheckstyle.skip \ --file extra/pom.xml | tee build_output.txt result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" From 302055ae39f42af3f0ea80f8d24606a42961c713 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 16:47:55 +0300 Subject: [PATCH 053/122] Handle case when check style failed at pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index e80f146b76a..0c2b8bf9998 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -39,12 +39,23 @@ jobs: - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | - sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - echo "❌ **Java CI Build Failed - Test Failures**" > comment.txt - echo '' >> comment.txt - echo '```' >> comment.txt - cat test_failures.txt >> comment.txt - echo '```' >> comment.txt + if grep -q '\[INFO\] --- checkstyle' build_output.txt; then + { + echo "❌ **Checkstyle Issues Detected**" + echo "" + echo '```' + sed -n '/\[INFO\] --- checkstyle/,/\[INFO\] ---/p' build_output.txt | sed '$d' + echo '```' + } > comment.txt + else + { + echo "❌ **Java CI Test Failures**" + echo "" + echo '```' + sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt + echo '```' + } > comment.txt + fi - name: Comment on PR with build failure output if: steps.build.outputs.exit_code != '0' From 0d87d578ad9da4a81cb79d1dbb1fbd6f63b10106 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 17:07:18 +0300 Subject: [PATCH 054/122] Handle case when check style failed at pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 0c2b8bf9998..d2f71f881e8 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -39,12 +39,12 @@ jobs: - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | - if grep -q '\[INFO\] --- checkstyle' build_output.txt; then + if grep -q '\[INFO\] Starting audit\.\.\.' build_output.txt; then { echo "❌ **Checkstyle Issues Detected**" echo "" echo '```' - sed -n '/\[INFO\] --- checkstyle/,/\[INFO\] ---/p' build_output.txt | sed '$d' + sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt echo '```' } > comment.txt else From 3dfe014f97769d4c990f2e68171e851be2e25c8b Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 17:15:54 +0300 Subject: [PATCH 055/122] Handle case when check style failed at pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index d2f71f881e8..a9267ad0c28 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -44,7 +44,7 @@ jobs: echo "❌ **Checkstyle Issues Detected**" echo "" echo '```' - sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt + sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '1d' echo '```' } > comment.txt else From 3d0c967d0b947868001d210a6481f1eda13d25f6 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 17:19:32 +0300 Subject: [PATCH 056/122] Handle case when check style failed at pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index a9267ad0c28..e21297e01e0 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -44,7 +44,7 @@ jobs: echo "❌ **Checkstyle Issues Detected**" echo "" echo '```' - sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '1d' + sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '0d' echo '```' } > comment.txt else From 410e009a82b6a6d8d8c556ab7744b155b73738b6 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 17:40:02 +0300 Subject: [PATCH 057/122] Handle case when check style failed at pr-java-ci.yml --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index e21297e01e0..7500293801f 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -44,7 +44,7 @@ jobs: echo "❌ **Checkstyle Issues Detected**" echo "" echo '```' - sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '0d' + sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '1d' \| sed '0,/Audit done\./d' echo '```' } > comment.txt else From 7281d65422f01125cf8a991e708f266d1308eb86 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 19 May 2025 21:42:27 +0300 Subject: [PATCH 058/122] Update warning --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 7500293801f..d1f1e791980 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -44,7 +44,7 @@ jobs: echo "❌ **Checkstyle Issues Detected**" echo "" echo '```' - sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '1d' \| sed '0,/Audit done\./d' + sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '0,/Audit done\./d' echo '```' } > comment.txt else From 89f8ec60b53000a4daf52592a4000c9ab7ad2aad Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 20 May 2025 12:07:36 +0300 Subject: [PATCH 059/122] Revert "Simulate mass fail tests" This reverts commit 58aacf4bdd8fe1a0a1a6889583de4c1d5c00a2e6. --- src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java b/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java index 39668a7cfa9..09412abe65f 100644 --- a/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java +++ b/src/main/java/org/prebid/server/bidder/openx/OpenxBidder.java @@ -49,7 +49,7 @@ public class OpenxBidder implements Bidder { - private static final String OPENX_CONFIG = "hb_pbs_1.0.0"; + private static final String OPENX_CONFIG = "hb_pbs_1.0.0"; private static final String DEFAULT_BID_CURRENCY = "USD"; private static final String CUSTOM_PARAMS_KEY = "customParams"; private static final String BIDDER_EXT = "bidder"; @@ -73,8 +73,6 @@ public Result>> makeHttpRequests(BidRequest bidRequ final Map> differentiatedImps = bidRequest.getImp().stream() .collect(Collectors.groupingBy(OpenxBidder::resolveImpType)); - - final List processingErrors = new ArrayList<>(); final List outgoingRequests = makeRequests( bidRequest, From df35687f2a89061918b4bf47a8c426488dfc40ab Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 20 May 2025 12:07:36 +0300 Subject: [PATCH 060/122] Revert "Simulate mass fail tests" This reverts commit f383cf212c227480eb123b0c1f6620cb4ae500bc. --- .../server/functional/tests/AccountResolutionSpec.groovy | 4 ++-- .../tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy index d12e3c75f66..dce9cbc1ce6 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountResolutionSpec.groovy @@ -32,7 +32,7 @@ class AccountResolutionSpec extends BaseSpec { then: "Bidder request should contain publisher id from AMP tag id" def bidderRequest = bidder.getBidderRequest(storedRequest.id) - assert bidderRequest.site.publisher.id == null + assert bidderRequest.site.publisher.id == accountId as String } def "PBS should prefer account from publisher id during auction account resolution"() { @@ -55,7 +55,7 @@ class AccountResolutionSpec extends BaseSpec { then: "Bidder request should contain publisher id from request publisher id" def bidderRequest = bidder.getBidderRequest(bidRequest.id) - assert bidderRequest.accountId == null + assert bidderRequest.accountId == accountId where: distributionChannel << [SITE, APP] diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy index 7d3dc463b07..82355a47996 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/analyticstag/AnalyticsTagsModuleSpec.groovy @@ -59,12 +59,12 @@ class AnalyticsTagsModuleSpec extends ModuleBaseSpec { and: "Analytics tag should contain results with name and success status" def analyticResult = analyticsTagPrebid.analyticsTags.activities.first - assert analyticResult.status == null + assert analyticResult.status == FetchStatus.SUCCESS assert analyticResult.name == ModuleActivityName.ORTB2_BLOCKING and: "Should include appliedTo information in analytics tags results" verifyAll(analyticResult.results.first) { - it.status == null + it.status == FetchStatus.SUCCESS_ALLOW it.appliedTo.bidders == [GENERIC.value] it.appliedTo.impIds == bidRequest.imp.id } From d6263a5f1b07e059c5fe9164f8b1becab72bcfd3 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Fri, 23 May 2025 17:57:07 +0300 Subject: [PATCH 061/122] check --- .../workflows/pr-module-functional-tests.yml | 19 ++++++++++++++----- .../ortb2blocking/Ortb2BlockingSpec.groovy | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 8006a36fd0e..60b9f6c0207 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -51,11 +51,20 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - echo "❌ **Module Functional Test Failures**" > comment.txt - echo '' >> comment.txt - echo '```' >> comment.txt - cat test_failures.txt >> comment.txt - echo '```' >> comment.txt + summary=$(grep 'Tests run:' build_output.txt | tail -1) + cat < comment.txt + ❌ **Module Test Failures** + + ${summary} + +
+ Show failed tests details + + \`\`\` + $(cat test_failures.txt) + \`\`\` +
+ EOF - name: Comment on PR with build failure output if: steps.build.outputs.exit_code != '0' diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy index 2b2de98750b..93cb00bd76e 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy @@ -57,7 +57,7 @@ import static org.prebid.server.functional.testcontainers.Dependencies.getNetwor class Ortb2BlockingSpec extends ModuleBaseSpec { private static final String WILDCARD = '*' - private static final Map IX_CONFIG = ["adapters.ix.enabled" : "true", + private static final Map IX_CONFIG = ["adapters.ix.enabled" : "false", "adapters.ix.endpoint": "$networkServiceContainer.rootUri/auction".toString()] private static final Map PBS_CONFIG = getOrtb2BlockingSettings() + IX_CONFIG + ['adapter-defaults.ortb.multiformat-supported': 'false'] From bd874fa67a4b4b65029f8497152024fd9935fbaa Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 2 Jun 2025 14:33:15 +0300 Subject: [PATCH 062/122] Update workflow job --- .github/workflows/pr-functional-tests.yml | 19 ++++++++++++++----- .github/workflows/pr-java-ci.yml | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 51b11679ab1..a4e79fc856c 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -47,11 +47,20 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - echo "❌ **Functional Test Failures**" > comment.txt - echo '' >> comment.txt - echo '```' >> comment.txt - cat test_failures.txt >> comment.txt - echo '```' >> comment.txt + summary=$(grep 'Tests run:' build_output.txt | tail -1) + cat < comment.txt + ❌ **Functional Test Failures** + + ${summary} + +
+ Show failed tests details + + \`\`\` + $(cat test_failures.txt) + \`\`\` +
+ EOF - name: Comment on PR with build failure output if: steps.build.outputs.exit_code != '0' diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index d1f1e791980..e93525251a3 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -34,6 +34,7 @@ jobs: id: build run: | mvn -B package --file extra/pom.xml | tee build_output.txt + result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" - name: Format build output for PR comment From b2e3fafa2ff5eb947aa7589946d37b9c3a612d8d Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 2 Jun 2025 15:25:57 +0300 Subject: [PATCH 063/122] Revert "Failed test" --- .../tests/module/ortb2blocking/Ortb2BlockingSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy index 93cb00bd76e..2b2de98750b 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/ortb2blocking/Ortb2BlockingSpec.groovy @@ -57,7 +57,7 @@ import static org.prebid.server.functional.testcontainers.Dependencies.getNetwor class Ortb2BlockingSpec extends ModuleBaseSpec { private static final String WILDCARD = '*' - private static final Map IX_CONFIG = ["adapters.ix.enabled" : "false", + private static final Map IX_CONFIG = ["adapters.ix.enabled" : "true", "adapters.ix.endpoint": "$networkServiceContainer.rootUri/auction".toString()] private static final Map PBS_CONFIG = getOrtb2BlockingSettings() + IX_CONFIG + ['adapter-defaults.ortb.multiformat-supported': 'false'] From 07d3369f6f5405d2ee760a032a3ba6e94d84cf04 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:17:33 +0300 Subject: [PATCH 064/122] add author tag --- .github/workflows/pr-functional-tests.yml | 1 + .github/workflows/pr-java-ci.yml | 3 +++ .github/workflows/pr-module-functional-tests.yml | 1 + 3 files changed, 5 insertions(+) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index a4e79fc856c..113e9398692 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -49,6 +49,7 @@ jobs: sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt summary=$(grep 'Tests run:' build_output.txt | tail -1) cat < comment.txt + ${author}, could you please take a look at the functional test failures? ❌ **Functional Test Failures** ${summary} diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index e93525251a3..ca2af84519d 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -40,8 +40,10 @@ jobs: - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | + author="@${{ github.event.pull_request.user.login }}" if grep -q '\[INFO\] Starting audit\.\.\.' build_output.txt; then { + echo "${author}, some Checkstyle issues were found" echo "❌ **Checkstyle Issues Detected**" echo "" echo '```' @@ -50,6 +52,7 @@ jobs: } > comment.txt else { + echo "${author}, some Java test failures occurred" echo "❌ **Java CI Test Failures**" echo "" echo '```' diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 60b9f6c0207..9e00e49ec8d 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -53,6 +53,7 @@ jobs: sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt summary=$(grep 'Tests run:' build_output.txt | tail -1) cat < comment.txt + ${author}, could you please take a look at the functional test failures? ❌ **Module Test Failures** ${summary} From 739385c6e6abf611e9f12098e68dd4837c61e205 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:18:35 +0300 Subject: [PATCH 065/122] invalid test --- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 3ba06b5d4a9..cff221b4f0a 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -35,7 +35,7 @@ public class GenericBidderTest extends VertxTest { - private static final String ENDPOINT_URL = "https://randomurl.com"; + private static final String ENDPOINT_URL = "https://test.com"; private final GenericBidder target = new GenericBidder(ENDPOINT_URL, jacksonMapper); From 21533bb143b6653b4f3d317b9b8632e371628e92 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:31:14 +0300 Subject: [PATCH 066/122] Update message for checkstyle --- .github/workflows/pr-java-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index ca2af84519d..31682595589 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,13 +41,14 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | author="@${{ github.event.pull_request.user.login }}" - if grep -q '\[INFO\] Starting audit\.\.\.' build_output.txt; then + audit_block=$(sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt) + if echo "$audit_block" | grep -q '^Error:'; then { echo "${author}, some Checkstyle issues were found" - echo "❌ **Checkstyle Issues Detected**" + echo "❌ Checkstyle Issues Detected**" echo "" echo '```' - sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt | sed '0,/Audit done\./d' + echo "$audit_block" | grep '^Error:' echo '```' } > comment.txt else From 113003875e3c29dcec1689851300ec5bda63ab97 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:32:46 +0300 Subject: [PATCH 067/122] Screw up the check style --- .../bidder/generic/GenericBidderTest.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index cff221b4f0a..4a69c32ca1d 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -44,6 +44,27 @@ public void creationShouldFailOnInvalidEndpointUrl() { assertThatIllegalArgumentException().isThrownBy(() -> new GenericBidder("invalid_url", jacksonMapper)); } + + + + + + + + + + + + + + + + + + + + + @Test public void makeHttpRequestsShouldCreateExpectedUrl() { // given From f5a192b8a6d640b427782587a1ab08daafc0656c Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:37:32 +0300 Subject: [PATCH 068/122] fix ci file --- .github/workflows/pr-java-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 31682595589..e96c9d57112 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -33,7 +33,7 @@ jobs: - name: Build with Maven id: build run: | - mvn -B package --file extra/pom.xml | tee build_output.txt + mvn -B package --file extra/pom.xml 2>&1 | tee build_output.txt result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" @@ -45,7 +45,7 @@ jobs: if echo "$audit_block" | grep -q '^Error:'; then { echo "${author}, some Checkstyle issues were found" - echo "❌ Checkstyle Issues Detected**" + echo "**❌ Checkstyle Issues Detected**" echo "" echo '```' echo "$audit_block" | grep '^Error:' From c7bde4b73076339723764a591aa840f00abec014 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:50:21 +0300 Subject: [PATCH 069/122] fix ci file --- .github/workflows/pr-java-ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index e96c9d57112..dd2113ddc72 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,14 +41,19 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | author="@${{ github.event.pull_request.user.login }}" - audit_block=$(sed -n '/\[INFO\] Starting audit\.\.\./,/Audit done\./p' build_output.txt) - if echo "$audit_block" | grep -q '^Error:'; then + errors=$(awk ' + /\[INFO\] Starting audit\.\.\./ { in=1; next } + /Audit done\./ { in=0 } + in && /^Error:/ { print } + ' build_output.txt) + + if [ -n "$errors" ]; then { echo "${author}, some Checkstyle issues were found" echo "**❌ Checkstyle Issues Detected**" echo "" echo '```' - echo "$audit_block" | grep '^Error:' + echo "$errors" echo '```' } > comment.txt else From 8cfdb049117d91ac2d074341f579786485956a6d Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:53:03 +0300 Subject: [PATCH 070/122] fix ci file --- .github/workflows/pr-java-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index dd2113ddc72..d3d92f04b45 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -42,9 +42,9 @@ jobs: run: | author="@${{ github.event.pull_request.user.login }}" errors=$(awk ' - /\[INFO\] Starting audit\.\.\./ { in=1; next } - /Audit done\./ { in=0 } - in && /^Error:/ { print } + /\[INFO\] Starting audit/ { in=1; next } + /Audit done/ { in=0 } + in && /^Error:/ { print } ' build_output.txt) if [ -n "$errors" ]; then From 79d1108bd25320f95dd1b729829ccad3e70334e1 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 00:58:05 +0300 Subject: [PATCH 071/122] fix ci file --- .github/workflows/pr-java-ci.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index d3d92f04b45..24a29171e65 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,11 +41,22 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | author="@${{ github.event.pull_request.user.login }}" - errors=$(awk ' - /\[INFO\] Starting audit/ { in=1; next } - /Audit done/ { in=0 } - in && /^Error:/ { print } - ' build_output.txt) + errors="" + in_block=0 + + while IFS= read -r line; do + if [[ "$line" == *"[INFO] Starting audit"* ]]; then + in_block=1 + continue + fi + if [[ "$line" == *"Audit done."* ]]; then + in_block=0 + continue + fi + if [[ $in_block -eq 1 && "$line" == Error:* ]]; then + errors+="$line"$'\n' + fi + done < build_output.txt if [ -n "$errors" ]; then { From 4b5cf2ae79755772a639fe4cdae6ae0c31560bd5 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 01:02:01 +0300 Subject: [PATCH 072/122] fix ci file --- .github/workflows/pr-java-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 24a29171e65..6b1a18af6d7 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -53,8 +53,8 @@ jobs: in_block=0 continue fi - if [[ $in_block -eq 1 && "$line" == Error:* ]]; then - errors+="$line"$'\n' + if [[ $in_block -eq 1 && "${line#"${line%%[![:space:]]*}"}" == Error:* ]]; then + errors+="${line#"${line%%[![:space:]]*}"}"$'\n' fi done < build_output.txt From a0274877e4361701eabc6f8191187ce0122207a7 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 01:05:54 +0300 Subject: [PATCH 073/122] fix ci file --- .github/workflows/pr-java-ci.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 6b1a18af6d7..307f185f53f 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,22 +41,7 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | author="@${{ github.event.pull_request.user.login }}" - errors="" - in_block=0 - - while IFS= read -r line; do - if [[ "$line" == *"[INFO] Starting audit"* ]]; then - in_block=1 - continue - fi - if [[ "$line" == *"Audit done."* ]]; then - in_block=0 - continue - fi - if [[ $in_block -eq 1 && "${line#"${line%%[![:space:]]*}"}" == Error:* ]]; then - errors+="${line#"${line%%[![:space:]]*}"}"$'\n' - fi - done < build_output.txt + errors=$(sed -n '/\[INFO\] Starting audit/,/Audit done/ { /^[[:space:]]*Error:/p }' build_output.txt) if [ -n "$errors" ]; then { From 302afb71aee2075cffc00bee33279401877e4a09 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 01:08:51 +0300 Subject: [PATCH 074/122] fix ci file --- .github/workflows/pr-java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 307f185f53f..a28ee834b6a 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,7 +41,7 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | author="@${{ github.event.pull_request.user.login }}" - errors=$(sed -n '/\[INFO\] Starting audit/,/Audit done/ { /^[[:space:]]*Error:/p }' build_output.txt) + errors=$(sed -n '/Starting audit/,/Audit done/ { /Error:/p }' build_output.txt) if [ -n "$errors" ]; then { From 4f6800c31d5a0d4f99603548a496c3ce9320ee02 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 10:58:23 +0300 Subject: [PATCH 075/122] fix ci file --- .github/workflows/pr-java-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index a28ee834b6a..649169956dc 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,15 +41,16 @@ jobs: if: steps.build.outputs.exit_code != '0' run: | author="@${{ github.event.pull_request.user.login }}" - errors=$(sed -n '/Starting audit/,/Audit done/ { /Error:/p }' build_output.txt) - if [ -n "$errors" ]; then + audit_block=$(sed -n '/Starting audit\.\.\./,/Audit done\./p' build_output.txt) + + if echo "$audit_block" | grep -q '^\[ERROR\]'; then { echo "${author}, some Checkstyle issues were found" echo "**❌ Checkstyle Issues Detected**" echo "" echo '```' - echo "$errors" + echo "$audit_block" | grep '^\[ERROR\]' echo '```' } > comment.txt else From 1830ce43d9af444d6be94507b666404333f3ad74 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 11:12:55 +0300 Subject: [PATCH 076/122] fix ci files --- .github/workflows/pr-functional-tests.yml | 1 + .github/workflows/pr-module-functional-tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 113e9398692..00c5a858f11 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -46,6 +46,7 @@ jobs: - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | + author="@${{ github.event.pull_request.user.login }}" sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt summary=$(grep 'Tests run:' build_output.txt | tail -1) cat < comment.txt diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 9e00e49ec8d..5427529d7e8 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -50,6 +50,7 @@ jobs: - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' run: | + author="@${{ github.event.pull_request.user.login }}" sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt summary=$(grep 'Tests run:' build_output.txt | tail -1) cat < comment.txt From 9a8a0ccb8cf7964c62042681f2085c5c8da4e08e Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 11:13:41 +0300 Subject: [PATCH 077/122] Revert "Screw up the check style" This reverts commit 113003875e3c29dcec1689851300ec5bda63ab97. --- .../bidder/generic/GenericBidderTest.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 4a69c32ca1d..cff221b4f0a 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -44,27 +44,6 @@ public void creationShouldFailOnInvalidEndpointUrl() { assertThatIllegalArgumentException().isThrownBy(() -> new GenericBidder("invalid_url", jacksonMapper)); } - - - - - - - - - - - - - - - - - - - - - @Test public void makeHttpRequestsShouldCreateExpectedUrl() { // given From 314d669ca343f0cc8aa1e3b204683d5ad7b3be4d Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 11:20:31 +0300 Subject: [PATCH 078/122] Revert "invalid test" This reverts commit 739385c6e6abf611e9f12098e68dd4837c61e205. --- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index cff221b4f0a..3ba06b5d4a9 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -35,7 +35,7 @@ public class GenericBidderTest extends VertxTest { - private static final String ENDPOINT_URL = "https://test.com"; + private static final String ENDPOINT_URL = "https://randomurl.com"; private final GenericBidder target = new GenericBidder(ENDPOINT_URL, jacksonMapper); From 3d41b536d15bf2185a2da26c09a4d0da9bdf5141 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 11:29:40 +0300 Subject: [PATCH 079/122] crew up the module tests --- .../server/functional/tests/module/GeneralModuleSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 23316766a7d..64670be7d50 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -31,7 +31,7 @@ import static org.prebid.server.functional.model.response.auction.ResponseAction class GeneralModuleSpec extends ModuleBaseSpec { - private final static String CALL_METRIC = "modules.module.%s.stage.%s.hook.%s.call" + private final static String CALL_METRIC = "modules.test.%s.stage.%s.hook.%s.call" private final static String NOOP_METRIC = "modules.module.%s.stage.%s.hook.%s.success.noop" private final static Map DISABLED_INVOKE_CONFIG = ['settings.modules.require-config-to-invoke': 'false'] From 5a9ae73eda54dfae85bdf4cec8b67ecfdc01e3e3 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 11:49:27 +0300 Subject: [PATCH 080/122] Revert "crew up the module tests" This reverts commit 3d41b536d15bf2185a2da26c09a4d0da9bdf5141. --- .../server/functional/tests/module/GeneralModuleSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 64670be7d50..23316766a7d 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -31,7 +31,7 @@ import static org.prebid.server.functional.model.response.auction.ResponseAction class GeneralModuleSpec extends ModuleBaseSpec { - private final static String CALL_METRIC = "modules.test.%s.stage.%s.hook.%s.call" + private final static String CALL_METRIC = "modules.module.%s.stage.%s.hook.%s.call" private final static String NOOP_METRIC = "modules.module.%s.stage.%s.hook.%s.success.noop" private final static Map DISABLED_INVOKE_CONFIG = ['settings.modules.require-config-to-invoke': 'false'] From 9c8419a4e4ffe015c3ca3840e7470236b58f9c74 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 19:59:03 +0300 Subject: [PATCH 081/122] Testing reports --- .../workflows/pr-module-functional-tests.yml | 32 ++++--------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 5427529d7e8..021c15ab019 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -49,33 +49,13 @@ jobs: - name: Format build output for PR comment if: steps.build.outputs.exit_code != '0' - run: | - author="@${{ github.event.pull_request.user.login }}" - sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - summary=$(grep 'Tests run:' build_output.txt | tail -1) - cat < comment.txt - ${author}, could you please take a look at the functional test failures? - ❌ **Module Test Failures** - - ${summary} - -
- Show failed tests details - - \`\`\` - $(cat test_failures.txt) - \`\`\` -
- EOF - - - name: Comment on PR with build failure output - if: steps.build.outputs.exit_code != '0' - uses: peter-evans/create-or-update-comment@v4 + uses: mikepenz/action-junit-report@v4 with: - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt + report_paths: | + **/target/failsafe-reports/TEST-*.xml + comment: true + updateComment: true - - name: Fail if error is found in logs + - name: Fail if functional tests failed if: steps.build.outputs.exit_code != '0' run: exit 1 From e8ddbab556f676c8b73f59bc5928e99404e27f15 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 19:59:21 +0300 Subject: [PATCH 082/122] Revert "Revert "crew up the module tests"" This reverts commit 5a9ae73eda54dfae85bdf4cec8b67ecfdc01e3e3. --- .../server/functional/tests/module/GeneralModuleSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 23316766a7d..64670be7d50 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -31,7 +31,7 @@ import static org.prebid.server.functional.model.response.auction.ResponseAction class GeneralModuleSpec extends ModuleBaseSpec { - private final static String CALL_METRIC = "modules.module.%s.stage.%s.hook.%s.call" + private final static String CALL_METRIC = "modules.test.%s.stage.%s.hook.%s.call" private final static String NOOP_METRIC = "modules.module.%s.stage.%s.hook.%s.success.noop" private final static Map DISABLED_INVOKE_CONFIG = ['settings.modules.require-config-to-invoke': 'false'] From f857496c8688085e77f3b0faf1a6757ddf08d6b4 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 20:34:18 +0300 Subject: [PATCH 083/122] Add token --- .github/workflows/pr-module-functional-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 021c15ab019..0655450a564 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -55,6 +55,8 @@ jobs: **/target/failsafe-reports/TEST-*.xml comment: true updateComment: true + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} - name: Fail if functional tests failed if: steps.build.outputs.exit_code != '0' From 0059d540921805bdb048640d7c51b3a5103ca8af Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 3 Jun 2025 20:54:38 +0300 Subject: [PATCH 084/122] Additional test --- .../server/functional/tests/module/GeneralModuleSpec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 64670be7d50..2b41d8b05ff 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -74,7 +74,7 @@ class GeneralModuleSpec extends ModuleBaseSpec { verifyAll(response?.ext?.prebid?.modules?.trace?.stages?.outcomes?.groups?.invocationResults?.flatten() as List) { it.status == [SUCCESS, SUCCESS, SUCCESS] it.action == [NO_ACTION, NO_ACTION, NO_ACTION] - it.hookId.moduleCode.sort() == [ORTB2_BLOCKING, ORTB2_BLOCKING, PB_RICHMEDIA_FILTER].code.sort() + it.hookId.moduleCode.sort() != [ORTB2_BLOCKING, ORTB2_BLOCKING, PB_RICHMEDIA_FILTER].code.sort() } and: "Ortb2blocking module call metrics should be updated" From 4c40fd632f889b1aa9ebebaaf95d92bce336fa20 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 1 Jul 2025 19:14:23 +0300 Subject: [PATCH 085/122] Replace mikepenz with dorny report on tests --- .github/workflows/pr-module-functional-tests.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 0655450a564..4b3b9012013 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -48,15 +48,14 @@ jobs: echo "exit_code=$result" >> "$GITHUB_OUTPUT" - name: Format build output for PR comment - if: steps.build.outputs.exit_code != '0' - uses: mikepenz/action-junit-report@v4 + if: always() + uses: dorny/test-reporter@v2 with: - report_paths: | - **/target/failsafe-reports/TEST-*.xml - comment: true - updateComment: true + name: Functional Tests + path: '**/target/failsafe-reports/TEST-*.xml' + reporter: java-junit + fail-on-error: true token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - name: Fail if functional tests failed if: steps.build.outputs.exit_code != '0' From 5fafea741848a8a54377d6a1591b75216ddaff17 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 1 Jul 2025 19:51:47 +0300 Subject: [PATCH 086/122] Update for only failed --- .github/workflows/pr-module-functional-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 4b3b9012013..b42629b2ae2 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -51,12 +51,12 @@ jobs: if: always() uses: dorny/test-reporter@v2 with: - name: Functional Tests + name: 'Module functional tests' path: '**/target/failsafe-reports/TEST-*.xml' reporter: java-junit + use-actions-summary: 'true' + list-suites: 'failed' + list-tests: 'failed' fail-on-error: true + fail-on-empty: true token: ${{ secrets.GITHUB_TOKEN }} - - - name: Fail if functional tests failed - if: steps.build.outputs.exit_code != '0' - run: exit 1 From 0d9d4ef20609a91f79dd05004b760934d2f361a2 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Wed, 2 Jul 2025 11:27:29 +0300 Subject: [PATCH 087/122] Update dorny version --- .github/workflows/pr-module-functional-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index b42629b2ae2..e7591f31677 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -49,7 +49,7 @@ jobs: - name: Format build output for PR comment if: always() - uses: dorny/test-reporter@v2 + uses: dorny/test-reporter@v2.1.0 with: name: 'Module functional tests' path: '**/target/failsafe-reports/TEST-*.xml' From a8bb6e1505715ebd168b3edab4d6a3eaa0456366 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Wed, 2 Jul 2025 12:15:26 +0300 Subject: [PATCH 088/122] rename test reports to remove TEST- prefix --- .github/workflows/pr-module-functional-tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index e7591f31677..967f46c82a5 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -47,12 +47,22 @@ jobs: result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" + - name: Rename test reports to remove TEST- prefix + shell: bash + run: | + shopt -s nullglob + for f in target/failsafe-reports/TEST-*.xml; do + filename=$(basename "$f") + mv "$f" "target/failsafe-reports/${filename#TEST-}" + done + - name: Format build output for PR comment if: always() uses: dorny/test-reporter@v2.1.0 with: name: 'Module functional tests' - path: '**/target/failsafe-reports/TEST-*.xml' + working-directory: 'target/failsafe-reports' + path: '*.xml' reporter: java-junit use-actions-summary: 'true' list-suites: 'failed' From 859ab70705ffcbca4ba848fd055a993b5ba3b41b Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Wed, 2 Jul 2025 13:13:06 +0300 Subject: [PATCH 089/122] Check test reports location --- .github/workflows/pr-module-functional-tests.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 967f46c82a5..b9816fc773e 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -47,22 +47,17 @@ jobs: result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" - - name: Rename test reports to remove TEST- prefix - shell: bash + - name: Check test reports location run: | - shopt -s nullglob - for f in target/failsafe-reports/TEST-*.xml; do - filename=$(basename "$f") - mv "$f" "target/failsafe-reports/${filename#TEST-}" - done + echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" + find $GITHUB_WORKSPACE -name 'TEST-*.xml' - name: Format build output for PR comment if: always() uses: dorny/test-reporter@v2.1.0 with: name: 'Module functional tests' - working-directory: 'target/failsafe-reports' - path: '*.xml' + path: '**/target/failsafe-reports/TEST-*.xml' reporter: java-junit use-actions-summary: 'true' list-suites: 'failed' From 904517dd52bf9138a56bc0c0b4b658881c9f40cb Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Wed, 2 Jul 2025 13:40:37 +0300 Subject: [PATCH 090/122] Check test reports location --- .github/workflows/pr-module-functional-tests.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index b9816fc773e..9491a4dfb96 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -47,17 +47,13 @@ jobs: result=${PIPESTATUS[0]} echo "exit_code=$result" >> "$GITHUB_OUTPUT" - - name: Check test reports location - run: | - echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" - find $GITHUB_WORKSPACE -name 'TEST-*.xml' - - name: Format build output for PR comment if: always() uses: dorny/test-reporter@v2.1.0 with: name: 'Module functional tests' - path: '**/target/failsafe-reports/TEST-*.xml' + working-directory: 'target/failsafe-reports' + path: 'TEST-*.xml' reporter: java-junit use-actions-summary: 'true' list-suites: 'failed' From 2dfec4a7fc638f270b4b9a5c472919a1a24cc7a9 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 18 Sep 2025 14:50:30 +0300 Subject: [PATCH 091/122] Update functional ci/workflow with dorny notification system. --- .github/workflows/pr-functional-tests.yml | 47 +++++-------------- .github/workflows/pr-java-ci.yml | 45 +----------------- .../workflows/pr-module-functional-tests.yml | 7 +-- 3 files changed, 16 insertions(+), 83 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 00c5a858f11..0d62f28212b 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -32,46 +32,25 @@ jobs: - name: Build with Maven id: build run: | - set +e mvn -B verify \ -DskipUnitTests=true \ -DskipModuleFunctionalTests=true \ -Dtests.max-container-count=5 \ -DdockerfileName=Dockerfile \ -Dcheckstyle.skip \ - --file extra/pom.xml | tee build_output.txt - result=${PIPESTATUS[0]} - echo "exit_code=$result" >> "$GITHUB_OUTPUT" + --file extra/pom.xml - - name: Format build output for PR comment - if: steps.build.outputs.exit_code != '0' - run: | - author="@${{ github.event.pull_request.user.login }}" - sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt > test_failures.txt - summary=$(grep 'Tests run:' build_output.txt | tail -1) - cat < comment.txt - ${author}, could you please take a look at the functional test failures? - ❌ **Functional Test Failures** - - ${summary} - -
- Show failed tests details - - \`\`\` - $(cat test_failures.txt) - \`\`\` -
- EOF - - - name: Comment on PR with build failure output - if: steps.build.outputs.exit_code != '0' - uses: peter-evans/create-or-update-comment@v4 + - name: Emitting run result of functional test + if: always() + uses: dorny/test-reporter@v2.1.0 with: + name: 'Functional tests' + working-directory: 'target/failsafe-reports' + path: 'TEST-*.xml' + reporter: java-junit + use-actions-summary: 'true' + list-suites: 'failed' + list-tests: 'failed' + fail-on-error: true + fail-on-empty: true token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt - - - name: Fail if error is found in logs - if: steps.build.outputs.exit_code != '0' - run: exit 1 diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 649169956dc..a0ecdd6892f 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -31,47 +31,4 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven - id: build - run: | - mvn -B package --file extra/pom.xml 2>&1 | tee build_output.txt - result=${PIPESTATUS[0]} - echo "exit_code=$result" >> "$GITHUB_OUTPUT" - - - name: Format build output for PR comment - if: steps.build.outputs.exit_code != '0' - run: | - author="@${{ github.event.pull_request.user.login }}" - - audit_block=$(sed -n '/Starting audit\.\.\./,/Audit done\./p' build_output.txt) - - if echo "$audit_block" | grep -q '^\[ERROR\]'; then - { - echo "${author}, some Checkstyle issues were found" - echo "**❌ Checkstyle Issues Detected**" - echo "" - echo '```' - echo "$audit_block" | grep '^\[ERROR\]' - echo '```' - } > comment.txt - else - { - echo "${author}, some Java test failures occurred" - echo "❌ **Java CI Test Failures**" - echo "" - echo '```' - sed -n '/\[ERROR\] Failures:/,/\[ERROR\] Tests run:/p' build_output.txt - echo '```' - } > comment.txt - fi - - - name: Comment on PR with build failure output - if: steps.build.outputs.exit_code != '0' - uses: peter-evans/create-or-update-comment@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - issue-number: ${{ github.event.pull_request.number }} - body-path: comment.txt - - - name: Fail if error is found in logs - if: steps.build.outputs.exit_code != '0' - run: exit 1 + run: mvn -B package --file extra/pom.xml diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index 9491a4dfb96..a6917acef0e 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -35,7 +35,6 @@ jobs: - name: Run module tests id: build run: | - set +e mvn -B verify \ -DskipUnitTests=true \ -DskipFunctionalTests=true \ @@ -43,11 +42,9 @@ jobs: -Dtests.max-container-count=5 \ -DdockerfileName=Dockerfile-modules \ -Dcheckstyle.skip \ - --file extra/pom.xml | tee build_output.txt - result=${PIPESTATUS[0]} - echo "exit_code=$result" >> "$GITHUB_OUTPUT" + --file extra/pom.xml - - name: Format build output for PR comment + - name: Emitting run result of functional test if: always() uses: dorny/test-reporter@v2.1.0 with: From 0b7038417eb12d4d0bdd12854b00169f2adfd440 Mon Sep 17 00:00:00 2001 From: markiian Date: Thu, 18 Sep 2025 18:06:14 +0300 Subject: [PATCH 092/122] Revert failed test --- .../server/functional/tests/module/GeneralModuleSpec.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy index 2b41d8b05ff..23316766a7d 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/GeneralModuleSpec.groovy @@ -31,7 +31,7 @@ import static org.prebid.server.functional.model.response.auction.ResponseAction class GeneralModuleSpec extends ModuleBaseSpec { - private final static String CALL_METRIC = "modules.test.%s.stage.%s.hook.%s.call" + private final static String CALL_METRIC = "modules.module.%s.stage.%s.hook.%s.call" private final static String NOOP_METRIC = "modules.module.%s.stage.%s.hook.%s.success.noop" private final static Map DISABLED_INVOKE_CONFIG = ['settings.modules.require-config-to-invoke': 'false'] @@ -74,7 +74,7 @@ class GeneralModuleSpec extends ModuleBaseSpec { verifyAll(response?.ext?.prebid?.modules?.trace?.stages?.outcomes?.groups?.invocationResults?.flatten() as List) { it.status == [SUCCESS, SUCCESS, SUCCESS] it.action == [NO_ACTION, NO_ACTION, NO_ACTION] - it.hookId.moduleCode.sort() != [ORTB2_BLOCKING, ORTB2_BLOCKING, PB_RICHMEDIA_FILTER].code.sort() + it.hookId.moduleCode.sort() == [ORTB2_BLOCKING, ORTB2_BLOCKING, PB_RICHMEDIA_FILTER].code.sort() } and: "Ortb2blocking module call metrics should be updated" From 0b4e9347a8e745524ce142c09c3f30d8956f74be Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Fri, 17 Oct 2025 11:57:10 +0300 Subject: [PATCH 093/122] final test --- .../prebid/server/log/CriteriaLogManager.java | 22 +++++++++++++++++++ .../ResponseCorrectionSpec.groovy | 2 +- .../TcfFullTransmitEidsActivitiesSpec.groovy | 8 +++---- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/prebid/server/log/CriteriaLogManager.java b/src/main/java/org/prebid/server/log/CriteriaLogManager.java index 75ca28f5f81..86ccd55cfa8 100644 --- a/src/main/java/org/prebid/server/log/CriteriaLogManager.java +++ b/src/main/java/org/prebid/server/log/CriteriaLogManager.java @@ -11,6 +11,28 @@ public class CriteriaLogManager { + + + + + + + + + + + + + + + + + + + + + + private static final Logger logger = LoggerFactory.getLogger(CriteriaLogManager.class); private final Set criterias = new ConcurrentHashSet<>(); diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy index b4cbdd3fb88..067b096ddd1 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy @@ -32,7 +32,7 @@ import static org.prebid.server.functional.model.response.auction.MediaType.VIDE class ResponseCorrectionSpec extends ModuleBaseSpec { - private final static int OPTIMAL_MAX_LENGTH = 20 + private final static int OPTIMAL_MAX_LENGTH = 0 private static final Map PBS_CONFIG = ["adapter-defaults.modifying-vast-xml-allowed": "false", "adapters.generic.modifying-vast-xml-allowed": "false"] + getResponseCorrectionConfig() diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy index d798bc4c478..8dbe7a75f00 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy @@ -30,10 +30,10 @@ class TcfFullTransmitEidsActivitiesSpec extends PrivacyBaseSpec { def prepareEncodeResponseBodyWithLegIntPurposes = getVendorListContent(false, true, false) def prepareEncodeResponseBodyWithLegIntAndFlexiblePurposes = getVendorListContent(false, true, true) def prepareEncodeResponseBodyWithPurposesAndFlexiblePurposes = getVendorListContent(true, false, true) - privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesOnly), getVendorListPath(PURPOSES_ONLY_GVL_VERSION)) - privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntPurposes), getVendorListPath(LEG_INT_PURPOSES_ONLY_GVL_VERSION)) - privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntAndFlexiblePurposes), getVendorListPath(LEG_INT_AND_FLEXIBLE_PURPOSES_GVL_VERSION)) - privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesAndFlexiblePurposes), getVendorListPath(PURPOSES_AND_LEG_INT_PURPOSES_GVL_VERSION)) +// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesOnly), getVendorListPath(PURPOSES_ONLY_GVL_VERSION)) +// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntPurposes), getVendorListPath(LEG_INT_PURPOSES_ONLY_GVL_VERSION)) +// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntAndFlexiblePurposes), getVendorListPath(LEG_INT_AND_FLEXIBLE_PURPOSES_GVL_VERSION)) +// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesAndFlexiblePurposes), getVendorListPath(PURPOSES_AND_LEG_INT_PURPOSES_GVL_VERSION)) privacyPbsContainerWithMultipleGvl.start() privacyPbsServiceWithMultipleGvl = new PrebidServerService(privacyPbsContainerWithMultipleGvl) } From 84107a148c6abe7a3bbd96f266cab34c7ce7c9ac Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 12:53:51 +0200 Subject: [PATCH 094/122] Add check style notification --- .github/workflows/check-style.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/check-style.yml diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml new file mode 100644 index 00000000000..1ffcd27365e --- /dev/null +++ b/.github/workflows/check-style.yml @@ -0,0 +1,17 @@ +name: check-style.yml +on: pull_request + +jobs: + checkstyle_job: + runs-on: ubuntu-latest + name: Checkstyle job + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run check style + uses: nikitasavinov/checkstyle-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: 'github-pr-check' + tool_name: 'testtool' + checkstyle_config: checkstyle.xml From d16d51f43deb615147b26b5295258621eea70457 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 13:19:26 +0200 Subject: [PATCH 095/122] Add filter_mode: diff_context --- .github/workflows/check-style.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 1ffcd27365e..176b75cd390 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -15,3 +15,4 @@ jobs: reporter: 'github-pr-check' tool_name: 'testtool' checkstyle_config: checkstyle.xml + filter_mode: diff_context From 513765ddca8f4e83fad981dd4c29b5d7b547a4cb Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 13:35:28 +0200 Subject: [PATCH 096/122] add checkstyle_version: 10.17.0 --- .github/workflows/check-style.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 176b75cd390..a2a96265ef3 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -16,3 +16,4 @@ jobs: tool_name: 'testtool' checkstyle_config: checkstyle.xml filter_mode: diff_context + checkstyle_version: 10.17.0 From 1ec1b84bf7af6fb780005d84a426d140b7ca6b39 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 16:36:36 +0200 Subject: [PATCH 097/122] add fail_on_error: true --- .github/workflows/check-style.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index a2a96265ef3..ba78615770b 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -17,3 +17,4 @@ jobs: checkstyle_config: checkstyle.xml filter_mode: diff_context checkstyle_version: 10.17.0 + fail_on_error: true From 5e0f0be6ee0a9bf3b6e33af66aa257061f678d80 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 16:53:46 +0200 Subject: [PATCH 098/122] add fail_on_error: true --- .github/workflows/check-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index ba78615770b..83ac9369e49 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -17,4 +17,4 @@ jobs: checkstyle_config: checkstyle.xml filter_mode: diff_context checkstyle_version: 10.17.0 - fail_on_error: true + fail_on_error: 'true' From c802f9880cecfc8833d50fdbd64c3b67de3b6ed4 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 17:00:03 +0200 Subject: [PATCH 099/122] Update level: 'error' fail_on_error: true --- .github/workflows/check-style.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 83ac9369e49..c088b5ed44d 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -17,4 +17,5 @@ jobs: checkstyle_config: checkstyle.xml filter_mode: diff_context checkstyle_version: 10.17.0 - fail_on_error: 'true' + level: 'error' + fail_on_error: true From ec271bc34aece38aef18211740036678b2670a72 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 17:34:21 +0200 Subject: [PATCH 100/122] add reporter: 'github-pr-review' --- .github/workflows/check-style.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index c088b5ed44d..d83328def93 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -1,21 +1,22 @@ -name: check-style.yml -on: pull_request +name: check-style +on: [pull_request] jobs: checkstyle_job: runs-on: ubuntu-latest name: Checkstyle job steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Run check style + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Checkstyle (produce XML) + id: checkstyle uses: nikitasavinov/checkstyle-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - reporter: 'github-pr-check' - tool_name: 'testtool' + reporter: 'github-pr-review' + tool_name: 'checkstyle' checkstyle_config: checkstyle.xml - filter_mode: diff_context checkstyle_version: 10.17.0 level: 'error' - fail_on_error: true + fail_on_error: false From 7d868a39d948434c0e3e034cf6f1a0b66460032e Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 17:51:26 +0200 Subject: [PATCH 101/122] Change to fail_on_error: true --- .github/workflows/check-style.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index d83328def93..6729e004563 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -9,7 +9,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Run Checkstyle (produce XML) + - name: Run Checkstyle id: checkstyle uses: nikitasavinov/checkstyle-action@master with: @@ -19,4 +19,4 @@ jobs: checkstyle_config: checkstyle.xml checkstyle_version: 10.17.0 level: 'error' - fail_on_error: false + fail_on_error: true From 1c02741c5456907bac7508e10d33daf12f88ca67 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 19:30:41 +0200 Subject: [PATCH 102/122] Update uses: dbelyaev/action-checkstyle@v3 --- .github/workflows/check-style.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 6729e004563..f956df1ae4f 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -1,22 +1,16 @@ -name: check-style +name: reviewdog on: [pull_request] jobs: - checkstyle_job: + checkstyle: + name: runner / checkstyle runs-on: ubuntu-latest - name: Checkstyle job steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Run Checkstyle - id: checkstyle - uses: nikitasavinov/checkstyle-action@master + - uses: actions/checkout@v5 + - uses: dbelyaev/action-checkstyle@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - reporter: 'github-pr-review' - tool_name: 'checkstyle' + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + level: error + checkstyle_version: "9.0" checkstyle_config: checkstyle.xml - checkstyle_version: 10.17.0 - level: 'error' - fail_on_error: true From c422c058fb57b4798f7c19c2aaac3e370b68fd36 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 19:33:00 +0200 Subject: [PATCH 103/122] Check style versioning --- .github/workflows/check-style.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index f956df1ae4f..fcb12ae70ea 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -12,5 +12,4 @@ jobs: github_token: ${{ secrets.github_token }} reporter: github-pr-review level: error - checkstyle_version: "9.0" checkstyle_config: checkstyle.xml From 7b884c8ba1367336a239aee4c9964cdb9e8f2f94 Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 21:33:49 +0200 Subject: [PATCH 104/122] Check style fail_level: error --- .github/workflows/check-style.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index fcb12ae70ea..f8344bde6a5 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -13,3 +13,4 @@ jobs: reporter: github-pr-review level: error checkstyle_config: checkstyle.xml + fail_level: error From c79c6758b3946009502c333c7a3b56d44042389d Mon Sep 17 00:00:00 2001 From: markiian Date: Mon, 27 Oct 2025 21:37:28 +0200 Subject: [PATCH 105/122] Check style fail_level: error --- .github/workflows/check-style.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index f8344bde6a5..894ae4ee2d5 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -10,7 +10,7 @@ jobs: - uses: dbelyaev/action-checkstyle@v3 with: github_token: ${{ secrets.github_token }} - reporter: github-pr-review + reporter: github-pr-check level: error checkstyle_config: checkstyle.xml fail_level: error From 5e98cefb164123852605713d7e261c9d406022cf Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 28 Oct 2025 12:30:33 +0200 Subject: [PATCH 106/122] Update filter mode and reporter --- .github/workflows/check-style.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 894ae4ee2d5..f5e16bf3123 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -10,7 +10,8 @@ jobs: - uses: dbelyaev/action-checkstyle@v3 with: github_token: ${{ secrets.github_token }} - reporter: github-pr-check + reporter: github-pr-review level: error checkstyle_config: checkstyle.xml fail_level: error + filter_mode: diff_context From ad13049e2896dd4998b82ef81413b713fbe92b84 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 28 Oct 2025 12:42:59 +0200 Subject: [PATCH 107/122] Add more check style issue --- .../java/org/prebid/server/bidder/GenericBidder.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/org/prebid/server/bidder/GenericBidder.java b/src/main/java/org/prebid/server/bidder/GenericBidder.java index a708de0ca1b..698c89ed295 100644 --- a/src/main/java/org/prebid/server/bidder/GenericBidder.java +++ b/src/main/java/org/prebid/server/bidder/GenericBidder.java @@ -12,9 +12,13 @@ import org.prebid.server.bidder.model.Result; import org.prebid.server.json.DecodeException; import org.prebid.server.json.JacksonMapper; +import org.prebid.server.json.JsonMerger; import org.prebid.server.util.BidderUtil; import org.prebid.server.util.HttpUtil; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.UUID; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -35,6 +39,11 @@ public GenericBidder(String endpointUrl, JacksonMapper mapper) { @Override public final Result>> makeHttpRequests(BidRequest bidRequest) { + + final List errorsWithLOOOOOOOOOOOOOONGESTnaminggggggggggggggggggggggggggggggggggggggggggg = new ArrayList<>(); + + + return Result.withValue(BidderUtil.defaultRequest(bidRequest, endpointUrl, mapper)); } From 77010b6cfd63cc6e127fda12a34d9e26e0ff4853 Mon Sep 17 00:00:00 2001 From: markiian Date: Tue, 28 Oct 2025 14:22:55 +0200 Subject: [PATCH 108/122] Revert check styl issue --- .github/workflows/check-style.yml | 5 +++-- .../prebid/server/bidder/GenericBidder.java | 9 -------- .../prebid/server/log/CriteriaLogManager.java | 22 ------------------- .../ResponseCorrectionSpec.groovy | 2 +- .../TcfFullTransmitEidsActivitiesSpec.groovy | 8 +++---- 5 files changed, 8 insertions(+), 38 deletions(-) diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index f5e16bf3123..05f9e88ace8 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -1,9 +1,10 @@ -name: reviewdog +name: Check style + on: [pull_request] jobs: checkstyle: - name: runner / checkstyle + name: Run runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 diff --git a/src/main/java/org/prebid/server/bidder/GenericBidder.java b/src/main/java/org/prebid/server/bidder/GenericBidder.java index 698c89ed295..a708de0ca1b 100644 --- a/src/main/java/org/prebid/server/bidder/GenericBidder.java +++ b/src/main/java/org/prebid/server/bidder/GenericBidder.java @@ -12,13 +12,9 @@ import org.prebid.server.bidder.model.Result; import org.prebid.server.json.DecodeException; import org.prebid.server.json.JacksonMapper; -import org.prebid.server.json.JsonMerger; import org.prebid.server.util.BidderUtil; import org.prebid.server.util.HttpUtil; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.UUID; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -39,11 +35,6 @@ public GenericBidder(String endpointUrl, JacksonMapper mapper) { @Override public final Result>> makeHttpRequests(BidRequest bidRequest) { - - final List errorsWithLOOOOOOOOOOOOOONGESTnaminggggggggggggggggggggggggggggggggggggggggggg = new ArrayList<>(); - - - return Result.withValue(BidderUtil.defaultRequest(bidRequest, endpointUrl, mapper)); } diff --git a/src/main/java/org/prebid/server/log/CriteriaLogManager.java b/src/main/java/org/prebid/server/log/CriteriaLogManager.java index 86ccd55cfa8..75ca28f5f81 100644 --- a/src/main/java/org/prebid/server/log/CriteriaLogManager.java +++ b/src/main/java/org/prebid/server/log/CriteriaLogManager.java @@ -11,28 +11,6 @@ public class CriteriaLogManager { - - - - - - - - - - - - - - - - - - - - - - private static final Logger logger = LoggerFactory.getLogger(CriteriaLogManager.class); private final Set criterias = new ConcurrentHashSet<>(); diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy index 067b096ddd1..b4cbdd3fb88 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/responsecorrenction/ResponseCorrectionSpec.groovy @@ -32,7 +32,7 @@ import static org.prebid.server.functional.model.response.auction.MediaType.VIDE class ResponseCorrectionSpec extends ModuleBaseSpec { - private final static int OPTIMAL_MAX_LENGTH = 0 + private final static int OPTIMAL_MAX_LENGTH = 20 private static final Map PBS_CONFIG = ["adapter-defaults.modifying-vast-xml-allowed": "false", "adapters.generic.modifying-vast-xml-allowed": "false"] + getResponseCorrectionConfig() diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy index 8dbe7a75f00..d798bc4c478 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/TcfFullTransmitEidsActivitiesSpec.groovy @@ -30,10 +30,10 @@ class TcfFullTransmitEidsActivitiesSpec extends PrivacyBaseSpec { def prepareEncodeResponseBodyWithLegIntPurposes = getVendorListContent(false, true, false) def prepareEncodeResponseBodyWithLegIntAndFlexiblePurposes = getVendorListContent(false, true, true) def prepareEncodeResponseBodyWithPurposesAndFlexiblePurposes = getVendorListContent(true, false, true) -// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesOnly), getVendorListPath(PURPOSES_ONLY_GVL_VERSION)) -// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntPurposes), getVendorListPath(LEG_INT_PURPOSES_ONLY_GVL_VERSION)) -// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntAndFlexiblePurposes), getVendorListPath(LEG_INT_AND_FLEXIBLE_PURPOSES_GVL_VERSION)) -// privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesAndFlexiblePurposes), getVendorListPath(PURPOSES_AND_LEG_INT_PURPOSES_GVL_VERSION)) + privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesOnly), getVendorListPath(PURPOSES_ONLY_GVL_VERSION)) + privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntPurposes), getVendorListPath(LEG_INT_PURPOSES_ONLY_GVL_VERSION)) + privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithLegIntAndFlexiblePurposes), getVendorListPath(LEG_INT_AND_FLEXIBLE_PURPOSES_GVL_VERSION)) + privacyPbsContainerWithMultipleGvl.withCopyToContainer(Transferable.of(prepareEncodeResponseBodyWithPurposesAndFlexiblePurposes), getVendorListPath(PURPOSES_AND_LEG_INT_PURPOSES_GVL_VERSION)) privacyPbsContainerWithMultipleGvl.start() privacyPbsServiceWithMultipleGvl = new PrebidServerService(privacyPbsContainerWithMultipleGvl) } From 8f21648e12210a6cf0a2d609b39e927ed3282fa5 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Thu, 30 Oct 2025 13:56:48 +0200 Subject: [PATCH 109/122] update deps --- .github/workflows/pr-functional-tests.yml | 2 +- .github/workflows/pr-java-ci.yml | 15 +++++++++++++++ .github/workflows/pr-module-functional-tests.yml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-functional-tests.yml b/.github/workflows/pr-functional-tests.yml index 0d62f28212b..0cf032e3e23 100644 --- a/.github/workflows/pr-functional-tests.yml +++ b/.github/workflows/pr-functional-tests.yml @@ -42,7 +42,7 @@ jobs: - name: Emitting run result of functional test if: always() - uses: dorny/test-reporter@v2.1.0 + uses: dorny/test-reporter@v2.1.1 with: name: 'Functional tests' working-directory: 'target/failsafe-reports' diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index a0ecdd6892f..e5836d46ed6 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -32,3 +32,18 @@ jobs: - name: Build with Maven run: mvn -B package --file extra/pom.xml + + - name: Emitting run result of functional test + if: always() + uses: dorny/test-reporter@v2.1.1 + with: + name: 'Unit tests' + working-directory: 'target/surefire-reports' + path: 'TEST-*.xml' + reporter: java-junit + use-actions-summary: 'true' + list-suites: 'failed' + list-tests: 'failed' + fail-on-error: true + fail-on-empty: true + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-module-functional-tests.yml b/.github/workflows/pr-module-functional-tests.yml index a6917acef0e..e61814093b0 100644 --- a/.github/workflows/pr-module-functional-tests.yml +++ b/.github/workflows/pr-module-functional-tests.yml @@ -46,7 +46,7 @@ jobs: - name: Emitting run result of functional test if: always() - uses: dorny/test-reporter@v2.1.0 + uses: dorny/test-reporter@v2.1.1 with: name: 'Module functional tests' working-directory: 'target/failsafe-reports' From 3a80a084d01151141e6fe3141cb9e6eee3067c5a Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Thu, 30 Oct 2025 14:03:44 +0200 Subject: [PATCH 110/122] add errors --- .../org/prebid/server/functional/tests/AccountSpec.groovy | 2 +- .../org/prebid/server/functional/tests/DebugSpec.groovy | 2 +- .../server/functional/tests/module/ModuleBaseSpec.groovy | 2 +- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy index 6bfb51536cc..b6856c42d30 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy @@ -44,7 +44,7 @@ class AccountSpec extends BaseSpec { def "PBS should reject request with unknown account when settings.enforce-valid-account = true"() { given: "Pbs config with enforce-valid-account and default-account-config" def pbsService = pbsServiceFactory.getService( - ["settings.enforce-valid-account" : "true", + ["settings.enforce-valid-account" : "false", "settings.default-account-config": encode(defaultAccountConfig)]) and: "Non-existing account id" diff --git a/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy index ea169ad00ee..644afdfdd4f 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy @@ -50,7 +50,7 @@ class DebugSpec extends BaseSpec { and: "Debug metrics should be incremented" def metricsRequest = defaultPbsService.sendCollectedMetricsRequest() - assert metricsRequest[DEBUG_REQUESTS_METRIC] == 1 + assert metricsRequest[DEBUG_REQUESTS_METRIC] == 0 and: "Account debug metrics shouldn't be incremented" assert !metricsRequest.keySet().contains(ACCOUNT_METRICS_PREFIX_NAME) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy index 453de43aa3c..13371c87cfe 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy @@ -36,7 +36,7 @@ class ModuleBaseSpec extends BaseSpec { Boolean filterMraidEnabled = true, Endpoint endpoint = OPENRTB2_AUCTION) { - ["hooks.${PB_RICHMEDIA_FILTER.code}.enabled" : true, + ["hooks.${PB_RICHMEDIA_FILTER.code}.enabled" : false, "hooks.modules.${PB_RICHMEDIA_FILTER.code}.mraid-script-pattern": scriptPattern, "hooks.modules.${PB_RICHMEDIA_FILTER.code}.filter-mraid" : filterMraidEnabled, "hooks.host-execution-plan" : encode(ExecutionPlan.getSingleEndpointExecutionPlan(endpoint, [(ALL_PROCESSED_BID_RESPONSES): [PB_RICHMEDIA_FILTER]]))] diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 3ba06b5d4a9..6b8e9b10d46 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -68,7 +68,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).hasSize(1) + assertThat(result.getErrors()).hasSize(23102077) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); @@ -99,7 +99,7 @@ public void makeBidsShouldReturnEmptyListIfBidResponseSeatBidIsNull() throws Jso final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).isEmpty(); + assertThat(result.getErrors()).isNotEmpty(); assertThat(result.getValue()).isEmpty(); } From 471f4ba28123b1f143234e4a2fecde54729a345b Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 13:01:48 +0200 Subject: [PATCH 111/122] Replace dorny with mikepenz --- .github/workflows/pr-java-ci.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index e5836d46ed6..7e87150d969 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -33,17 +33,12 @@ jobs: - name: Build with Maven run: mvn -B package --file extra/pom.xml - - name: Emitting run result of functional test - if: always() - uses: dorny/test-reporter@v2.1.1 + - name: Emitting run result of unit test + uses: mikepenz/action-junit-report@v5 + if: success() || failure() with: - name: 'Unit tests' - working-directory: 'target/surefire-reports' - path: 'TEST-*.xml' - reporter: java-junit - use-actions-summary: 'true' - list-suites: 'failed' - list-tests: 'failed' - fail-on-error: true - fail-on-empty: true + report_paths: '**/target/failsafe-reports/TEST-*.xml' + comment: true + fail_on_failure: true + updateComment: true token: ${{ secrets.GITHUB_TOKEN }} From efbf9156f8595fb17a67f2a3a2e7fa1e57e5350c Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 13:02:15 +0200 Subject: [PATCH 112/122] Add generic failed test --- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 6b8e9b10d46..e5a7fc49e4f 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -56,7 +56,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() { assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()).hasSize(1) .extracting(HttpRequest::getUri) - .containsExactly("https://randomurl.com"); + .containsExactly("https://123.com"); } @Test @@ -71,7 +71,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { assertThat(result.getErrors()).hasSize(23102077) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); - assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); + assertThat(error.getMessage()).startsWith("123 to decode: Unrecognized token"); }); assertThat(result.getValue()).isEmpty(); } From 402b10339b4aa60573474a0dcdabb6ed840947f5 Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 13:27:03 +0200 Subject: [PATCH 113/122] Minor change in ci --- .github/workflows/pr-java-ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 7e87150d969..a71b08d3d9f 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -33,12 +33,10 @@ jobs: - name: Build with Maven run: mvn -B package --file extra/pom.xml - - name: Emitting run result of unit test + - name: Publish JUnit Report + if: always() uses: mikepenz/action-junit-report@v5 - if: success() || failure() with: - report_paths: '**/target/failsafe-reports/TEST-*.xml' - comment: true - fail_on_failure: true - updateComment: true - token: ${{ secrets.GITHUB_TOKEN }} + report_paths: '**/target/surefire-reports/TEST-*.xml' + check_name: 'JUnit Test Report' + include_passed: true From 0cb45f0694aab21d934b401714c4eba985b8654c Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 13:44:07 +0200 Subject: [PATCH 114/122] Add comment into PR --- .github/workflows/pr-java-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index a71b08d3d9f..c7a3229bb4a 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -39,4 +39,5 @@ jobs: with: report_paths: '**/target/surefire-reports/TEST-*.xml' check_name: 'JUnit Test Report' - include_passed: true + include_passed: 'true' + comment: 'true' From 3f89f68db76b1cfca5da1d39ccb08b67db849262 Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 13:50:35 +0200 Subject: [PATCH 115/122] Change to comment: true --- .github/workflows/pr-java-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index c7a3229bb4a..85036669655 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -39,5 +39,5 @@ jobs: with: report_paths: '**/target/surefire-reports/TEST-*.xml' check_name: 'JUnit Test Report' - include_passed: 'true' - comment: 'true' + include_passed: true + comment: true From 5f83246ea74820e4d69d4903dbcaadc64b539797 Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 14:33:01 +0200 Subject: [PATCH 116/122] Add to ci updateComment: false --- .github/workflows/pr-java-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 85036669655..6955999e039 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -41,3 +41,6 @@ jobs: check_name: 'JUnit Test Report' include_passed: true comment: true + fail_on_failure: true + updateComment: false + token: ${{ secrets.GITHUB_TOKEN }} From f24a71759e2ec8cd209425bec7c119c19710d00e Mon Sep 17 00:00:00 2001 From: markiian Date: Wed, 5 Nov 2025 14:54:21 +0200 Subject: [PATCH 117/122] Revert failed tests --- .../org/prebid/server/functional/tests/AccountSpec.groovy | 2 +- .../org/prebid/server/functional/tests/DebugSpec.groovy | 2 +- .../server/functional/tests/module/ModuleBaseSpec.groovy | 2 +- .../prebid/server/bidder/generic/GenericBidderTest.java | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy index b6856c42d30..6bfb51536cc 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/AccountSpec.groovy @@ -44,7 +44,7 @@ class AccountSpec extends BaseSpec { def "PBS should reject request with unknown account when settings.enforce-valid-account = true"() { given: "Pbs config with enforce-valid-account and default-account-config" def pbsService = pbsServiceFactory.getService( - ["settings.enforce-valid-account" : "false", + ["settings.enforce-valid-account" : "true", "settings.default-account-config": encode(defaultAccountConfig)]) and: "Non-existing account id" diff --git a/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy index 644afdfdd4f..ea169ad00ee 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/DebugSpec.groovy @@ -50,7 +50,7 @@ class DebugSpec extends BaseSpec { and: "Debug metrics should be incremented" def metricsRequest = defaultPbsService.sendCollectedMetricsRequest() - assert metricsRequest[DEBUG_REQUESTS_METRIC] == 0 + assert metricsRequest[DEBUG_REQUESTS_METRIC] == 1 and: "Account debug metrics shouldn't be incremented" assert !metricsRequest.keySet().contains(ACCOUNT_METRICS_PREFIX_NAME) diff --git a/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy index 13371c87cfe..453de43aa3c 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/module/ModuleBaseSpec.groovy @@ -36,7 +36,7 @@ class ModuleBaseSpec extends BaseSpec { Boolean filterMraidEnabled = true, Endpoint endpoint = OPENRTB2_AUCTION) { - ["hooks.${PB_RICHMEDIA_FILTER.code}.enabled" : false, + ["hooks.${PB_RICHMEDIA_FILTER.code}.enabled" : true, "hooks.modules.${PB_RICHMEDIA_FILTER.code}.mraid-script-pattern": scriptPattern, "hooks.modules.${PB_RICHMEDIA_FILTER.code}.filter-mraid" : filterMraidEnabled, "hooks.host-execution-plan" : encode(ExecutionPlan.getSingleEndpointExecutionPlan(endpoint, [(ALL_PROCESSED_BID_RESPONSES): [PB_RICHMEDIA_FILTER]]))] diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index e5a7fc49e4f..3ba06b5d4a9 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -56,7 +56,7 @@ public void makeHttpRequestsShouldCreateExpectedUrl() { assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()).hasSize(1) .extracting(HttpRequest::getUri) - .containsExactly("https://123.com"); + .containsExactly("https://randomurl.com"); } @Test @@ -68,10 +68,10 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).hasSize(23102077) + assertThat(result.getErrors()).hasSize(1) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); - assertThat(error.getMessage()).startsWith("123 to decode: Unrecognized token"); + assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); }); assertThat(result.getValue()).isEmpty(); } @@ -99,7 +99,7 @@ public void makeBidsShouldReturnEmptyListIfBidResponseSeatBidIsNull() throws Jso final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).isNotEmpty(); + assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()).isEmpty(); } From 6cc5deb912490c55549b1ac828b9728ec76e5af6 Mon Sep 17 00:00:00 2001 From: markiian Date: Fri, 14 Nov 2025 18:42:49 +0200 Subject: [PATCH 118/122] Remove check-style.yml and update pr-java.ci.yml --- .github/workflows/check-style.yml | 18 ------------------ .github/workflows/pr-java-ci.yml | 3 +-- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 .github/workflows/check-style.yml diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml deleted file mode 100644 index 05f9e88ace8..00000000000 --- a/.github/workflows/check-style.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Check style - -on: [pull_request] - -jobs: - checkstyle: - name: Run - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: dbelyaev/action-checkstyle@v3 - with: - github_token: ${{ secrets.github_token }} - reporter: github-pr-review - level: error - checkstyle_config: checkstyle.xml - fail_level: error - filter_mode: diff_context diff --git a/.github/workflows/pr-java-ci.yml b/.github/workflows/pr-java-ci.yml index 6955999e039..3f68172bf32 100644 --- a/.github/workflows/pr-java-ci.yml +++ b/.github/workflows/pr-java-ci.yml @@ -34,7 +34,6 @@ jobs: run: mvn -B package --file extra/pom.xml - name: Publish JUnit Report - if: always() uses: mikepenz/action-junit-report@v5 with: report_paths: '**/target/surefire-reports/TEST-*.xml' @@ -42,5 +41,5 @@ jobs: include_passed: true comment: true fail_on_failure: true - updateComment: false + updateComment: true token: ${{ secrets.GITHUB_TOKEN }} From 458d3498ba7f24d125079c91fbdf401238b5af75 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Mon, 1 Dec 2025 13:14:07 +0200 Subject: [PATCH 119/122] add errors --- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 4 ++-- .../org/prebid/server/bidder/rubicon/RubiconBidderTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 3ba06b5d4a9..a1808a0c38f 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -68,7 +68,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).hasSize(1) + assertThat(result.getErrors()).hasSize(0) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); @@ -179,7 +179,7 @@ public void makeBidsShouldReturnBannerBidIfBannerAndVideoAndAudioAndNativeIsAbse final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).isEmpty(); + assertThat(result.getErrors()).isNotEmpty(); assertThat(result.getValue()) .containsExactly(BidderBid.of(givenBid(), banner, null)); } diff --git a/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java b/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java index 5ed82129c2f..2579b105344 100644 --- a/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java @@ -218,7 +218,7 @@ public void makeHttpRequestsShouldFillMethodAndUrlAndExpectedHeaders() { final Result>> result = target.makeHttpRequests(bidRequest); // then - assertThat(result.getValue()).hasSize(1).element(0).isNotNull() + assertThat(result.getValue()).hasSize(0).element(0).isNotNull() .returns(HttpMethod.POST, HttpRequest::getMethod) .returns(ENDPOINT_URL, HttpRequest::getUri); assertThat(result.getValue().getFirst().getHeaders()).isNotNull() From f1a13c5064350e84f2c18d640fd44e3e4fb5cd28 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Mon, 1 Dec 2025 13:22:20 +0200 Subject: [PATCH 120/122] Revert "add errors" This reverts commit 458d3498ba7f24d125079c91fbdf401238b5af75. --- .../org/prebid/server/bidder/generic/GenericBidderTest.java | 4 ++-- .../org/prebid/server/bidder/rubicon/RubiconBidderTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index a1808a0c38f..3ba06b5d4a9 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -68,7 +68,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).hasSize(0) + assertThat(result.getErrors()).hasSize(1) .allSatisfy(error -> { assertThat(error.getType()).isEqualTo(BidderError.Type.bad_server_response); assertThat(error.getMessage()).startsWith("Failed to decode: Unrecognized token"); @@ -179,7 +179,7 @@ public void makeBidsShouldReturnBannerBidIfBannerAndVideoAndAudioAndNativeIsAbse final Result> result = target.makeBids(httpCall, null); // then - assertThat(result.getErrors()).isNotEmpty(); + assertThat(result.getErrors()).isEmpty(); assertThat(result.getValue()) .containsExactly(BidderBid.of(givenBid(), banner, null)); } diff --git a/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java b/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java index 2579b105344..5ed82129c2f 100644 --- a/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/rubicon/RubiconBidderTest.java @@ -218,7 +218,7 @@ public void makeHttpRequestsShouldFillMethodAndUrlAndExpectedHeaders() { final Result>> result = target.makeHttpRequests(bidRequest); // then - assertThat(result.getValue()).hasSize(0).element(0).isNotNull() + assertThat(result.getValue()).hasSize(1).element(0).isNotNull() .returns(HttpMethod.POST, HttpRequest::getMethod) .returns(ENDPOINT_URL, HttpRequest::getUri); assertThat(result.getValue().getFirst().getHeaders()).isNotNull() From 0f2747423e8140c11ec7d271f0d59d0a6820756b Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Mon, 1 Dec 2025 13:24:38 +0200 Subject: [PATCH 121/122] last tests --- .../bidder/generic/GenericBidderTest.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index 3ba06b5d4a9..e3758d7a0b3 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -167,23 +167,6 @@ public void makeBidsShouldReturnAudioBidIfAudioIsPresentInRequestImp() throws Js .containsExactly(BidderBid.of(givenBid(), audio, null)); } - @Test - public void makeBidsShouldReturnBannerBidIfBannerAndVideoAndAudioAndNativeIsAbsentInRequestImp() - throws JsonProcessingException { - // given - final BidderCall httpCall = givenHttpCall( - givenBidRequest(identity()), - mapper.writeValueAsString(givenBidResponse(impBuilder -> impBuilder.impid("123")))); - - // when - final Result> result = target.makeBids(httpCall, null); - - // then - assertThat(result.getErrors()).isEmpty(); - assertThat(result.getValue()) - .containsExactly(BidderBid.of(givenBid(), banner, null)); - } - private static BidRequest givenBidRequest(UnaryOperator impCustomizer) { return givenBidRequest(identity(), impCustomizer); } From ffde72354abfc8a67462ded7d73802c0a5f24c0c Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Mon, 1 Dec 2025 13:32:33 +0200 Subject: [PATCH 122/122] Revert "last tests" This reverts commit 0f2747423e8140c11ec7d271f0d59d0a6820756b. --- .../bidder/generic/GenericBidderTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java index e3758d7a0b3..3ba06b5d4a9 100644 --- a/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/generic/GenericBidderTest.java @@ -167,6 +167,23 @@ public void makeBidsShouldReturnAudioBidIfAudioIsPresentInRequestImp() throws Js .containsExactly(BidderBid.of(givenBid(), audio, null)); } + @Test + public void makeBidsShouldReturnBannerBidIfBannerAndVideoAndAudioAndNativeIsAbsentInRequestImp() + throws JsonProcessingException { + // given + final BidderCall httpCall = givenHttpCall( + givenBidRequest(identity()), + mapper.writeValueAsString(givenBidResponse(impBuilder -> impBuilder.impid("123")))); + + // when + final Result> result = target.makeBids(httpCall, null); + + // then + assertThat(result.getErrors()).isEmpty(); + assertThat(result.getValue()) + .containsExactly(BidderBid.of(givenBid(), banner, null)); + } + private static BidRequest givenBidRequest(UnaryOperator impCustomizer) { return givenBidRequest(identity(), impCustomizer); }