GoogleCloudPlatform / cloud-opensource-java

Tools for detecting and avoiding linkage errors in GCP open source projects
Apache License 2.0
157 stars 73 forks source link

chore: update linkage tests #2358

Closed burkedavison closed 1 year ago

burkedavison commented 1 year ago

This PR updates the linkage tests to reflect the new expected error counts, as suggested by @suztomo .

burkedavison commented 1 year ago
[ERROR]   DashboardTest.testLinkageReports:220 value of: trimAndCollapseWhiteSpace(...)
expected: 4 target classes causing linkage errors referenced from 4 source classes.
but was : 5 target classes causing linkage errors referenced from 5 source classes.

Replicating locally, the relevant dashboard section now reads:

  <h3>io.grpc:grpc-netty-shaded:1.20.0</h3>
  <p class="jar-linkage-report">
    5 target classes
    causing linkage errors referenced from
    5 source classes.
  </p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.AllocatedBuffer is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.Conscrypt is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.HandshakeListener is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.BufferAllocator is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">sun.security.x509.AlgorithmId&#39;s field &quot;sun.security.util.ObjectIdentifier sha256WithRSAEncryption_oid&quot; is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator</p>
  <p class="linkage-check-dependency-paths">
    The following paths contain io.grpc:grpc-netty-shaded:1.20.0:
  </p>

    <!-- The visibility of this list is toggled via the button above. Hidden by default -->
    <ul class="linkage-check-dependency-paths"
        style="display:">
          <li>io.grpc:grpc-netty-shaded:1.20.0 (compile)</li>
          <li>io.grpc:grpc-alts:1.20.0 (compile) / io.grpc:grpc-netty-shaded:1.20.0 (compile)</li>
    </ul>

With Java 8, the relevant dashboard section now reads:

  <h3>io.grpc:grpc-netty-shaded:1.20.0</h3>
  <p class="jar-linkage-report">
    4 target classes
    causing linkage errors referenced from
    4 source classes.
  </p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.AllocatedBuffer is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.Conscrypt is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.HandshakeListener is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
      <p class="jar-linkage-report-cause">Class org.conscrypt.BufferAllocator is not found, referenced from io.grpc.netty.shaded.io.netty.handler.ssl.ConscryptAlpnSslEngine</p>
  <p class="linkage-check-dependency-paths">
    The following paths contain io.grpc:grpc-netty-shaded:1.20.0:
  </p>

    <!-- The visibility of this list is toggled via the button above. Hidden by default -->
    <ul class="linkage-check-dependency-paths"
        style="display:">
          <li>io.grpc:grpc-netty-shaded:1.20.0 (compile)</li>
          <li>io.grpc:grpc-alts:1.20.0 (compile) / io.grpc:grpc-netty-shaded:1.20.0 (compile)</li>
    </ul>
burkedavison commented 1 year ago
[INFO] Building: bom-project-using-spring-repository/pom.xml
[INFO] run post-build script verify.groovy
[INFO]   Assertion Error
[INFO]           bom-project-using-spring-repository/pom.xml ...... FAILED (15.8 s)

Replicating locally and saving build.log shows: go/bit/burkedavison/6345083555151872

burkedavison commented 1 year ago

LinkageCheckerMainIntegrationTest.testBom_java11 is currently ignored, with the following as the linkageProblems, but no known way to replicate the prior (expected) set: go/bit/burkedavison/6385103120891904