You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2022/10/18 20:45:40 UTC

[lucenenet] branch master updated (b5802f870 -> e2ae17398)

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git


    from b5802f870 SWEEP: Add a nested comment explaining why this method is empty. Fixes #681.
     new c18b9f1eb publish-test-results.yml: Added check for assembly binding failure to detect crashed runs. See #699.
     new e2ae17398 .github/workflows: Added Lucene-Net-Dependency-Conflict-Warning.yml to post a message to post a reminder comment to a PR to run the tests in Azure DevOps if it contains changes to dependences.props or any .csproj file. See #699.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .build/azure-templates/publish-test-results.yml    | 18 +++++----
 .build/azure-templates/run-tests-on-os.yml         |  3 +-
 .../Lucene-Net-Dependency-Conflict-Warning.yml     | 45 ++++++++++++++++++++++
 3 files changed, 58 insertions(+), 8 deletions(-)
 create mode 100644 .github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml


[lucenenet] 01/02: publish-test-results.yml: Added check for assembly binding failure to detect crashed runs. See #699.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit c18b9f1eb008bc0704d411f4c43511baddc13007
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Tue Oct 18 21:28:19 2022 +0700

    publish-test-results.yml: Added check for assembly binding failure to detect crashed runs. See #699.
---
 .build/azure-templates/publish-test-results.yml | 18 +++++++++++-------
 .build/azure-templates/run-tests-on-os.yml      |  3 ++-
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/.build/azure-templates/publish-test-results.yml b/.build/azure-templates/publish-test-results.yml
index 8fb4db36a..28f428136 100644
--- a/.build/azure-templates/publish-test-results.yml
+++ b/.build/azure-templates/publish-test-results.yml
@@ -1,4 +1,4 @@
-# Licensed to the Apache Software Foundation (ASF) under one
+# Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
 # regarding copyright ownership.  The ASF licenses this file
@@ -73,12 +73,16 @@ steps:
                     if ($reader.Name -eq 'RunInfos') {
                         $inRunInfos = $true
                     }
-                    if ($inRunInfos -and !$crashed -and $reader.Name -eq 'Text' -and $reader.ReadInnerXml().Contains('Test host process crashed')) {
-                        Write-Host "##vso[task.setvariable variable=HostCrashed;]true"
-                        # Report all of the test projects that crashed
-                        $crashedRuns = "$env:CRASHEDRUNS,$testProjectName".TrimStart(',')
-                        Write-Host "##vso[task.setvariable variable=CrashedRuns;]$crashedRuns"
-                        $crashed = $true
+                    if ($inRunInfos -and !$crashed -and $reader.Name -eq 'Text') {
+                        $innerXml = $reader.ReadInnerXml()
+                        # Test for specific error messages - we may need to adjust this, as needed
+                        if ($innerXml -and ($innerXml.Contains('Test host process crashed') -or $innerXml.Contains('Could not load file or assembly'))) {
+                            Write-Host "##vso[task.setvariable variable=HostCrashed;]true"
+                            # Report all of the test projects that crashed
+                            $crashedRuns = "$env:CRASHEDRUNS,$testProjectName".TrimStart(',')
+                            Write-Host "##vso[task.setvariable variable=CrashedRuns;]$crashedRuns"
+                            $crashed = $true
+                        }
                     }
                 }
                 if ($reader.NodeType -eq [System.Xml.XmlNodeType]::EndElement -and $reader.Name -eq 'RunInfos') {
diff --git a/.build/azure-templates/run-tests-on-os.yml b/.build/azure-templates/run-tests-on-os.yml
index b1282f20a..9250f0bee 100644
--- a/.build/azure-templates/run-tests-on-os.yml
+++ b/.build/azure-templates/run-tests-on-os.yml
@@ -251,7 +251,8 @@ steps:
 - pwsh: |
     $failed = $false
     if ($env:HOSTCRASHED -eq 'true') {
-        Write-Host "##vso[task.logissue type=error;]Test host process(es) crashed:  $($env:CRASHEDRUNS)."
+        $runsExpanded = "$($env:CRASHEDRUNS)" -replace ',',"`r`n"
+        Write-Host "##vso[task.logissue type=error;]Test host process(es) crashed, hung, or failed to load assemblies. Review the testresults artifacts for details. (click here to view the projects that failed)`r`n$runsExpanded"
         $failed = $true
     }
     $maximumAllowedFailures = '${{ parameters.maximumAllowedFailures }}'


[lucenenet] 02/02: .github/workflows: Added Lucene-Net-Dependency-Conflict-Warning.yml to post a message to post a reminder comment to a PR to run the tests in Azure DevOps if it contains changes to dependences.props or any .csproj file. See #699.

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit e2ae173988ce51a1584805d84b752e300d982499
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Tue Oct 18 22:53:00 2022 +0700

    .github/workflows: Added Lucene-Net-Dependency-Conflict-Warning.yml to post a message to post a reminder comment to a PR to run the tests in Azure DevOps if it contains changes to dependences.props or any .csproj file. See #699.
---
 .../Lucene-Net-Dependency-Conflict-Warning.yml     | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/.github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml b/.github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml
new file mode 100644
index 000000000..d8da6c9dd
--- /dev/null
+++ b/.github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# References:
+# https://stackoverflow.com/a/58704739
+# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
+
+name: 'Lucene.Net Dependency Conflict Warning'
+
+on:
+  pull_request:
+    paths:
+    - '.build/dependencies.props'
+    - 'src/**/*.csproj'
+
+jobs:
+
+  comment:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Add warning comment to PR
+        env:
+          URL: ${{ github.event.pull_request.comments_url }}
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          curl \
+            -X POST \
+            $URL \
+            -H "Content-Type: application/json" \
+            -H "Authorization: token $GITHUB_TOKEN" \
+            --data '{ "body": ":warning: **IMPORTANT:** This PR may contain changes to dependency versions. The GitHub Actions test runner is not set up to detect dependency version conflicts between projects. To ensure the changes do not cause dependency conflicts, [run the tests for these changes in Azure DevOps](https://github.com/apache/lucenenet#azure-devops) before accepting this pull request. :warning:" }'