Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): enable cross compilation plugin for Java 17 #6226

Merged
merged 8 commits into from
Jun 26, 2024

Conversation

mattgogerly
Copy link
Member

Compile to Java 11 bytecode using JDK 17.

Reference: spinnaker/igor#1198

since it's deprecated (see junit-team/junit5#1317).

Once it's gone, the regular gradle test task properly reports failures.
…yFieldRecursively

with usingRecursiveComparison().isEqualTo
like:

$ ./gradlew -PenableCrossCompilerPlugin=true :clouddriver-cloudfoundry:test --tests CloudFoundryLoadBalancerCachingAgentTest

> Task :clouddriver-cloudfoundry:test

CloudFoundryLoadBalancerCachingAgentTest > handleShouldReturnOnDemandResultsWithCacheTimeAndNoProcessedTime() FAILED
    java.lang.AssertionError:
    Expecting actual:
      OnDemandAgent.OnDemandResult(sourceAgentType=account/CloudFoundryLoadBalancerCachingAgent-OnDemand, authoritativeTypes=[], cacheResult=com.netflix.spinnaker.cats.agent.DefaultCacheResult@8aeab9e, evictions={})
    to be equal to:
      OnDemandAgent.OnDemandResult(sourceAgentType=account/CloudFoundryLoadBalancerCachingAgent-OnDemand, authoritativeTypes=[], cacheResult=com.netflix.spinnaker.cats.agent.DefaultCacheResult@2a2dc0a, evictions={})
    when recursively comparing field by field, but found the following difference:

    field/property 'cacheResult.cacheResults.loadBalancers' differ:
    - actual value  : [com.netflix.spinnaker.clouddriver.cloudfoundry.cache.ResourceCacheData@bd31962c]
    - expected value: [com.netflix.spinnaker.clouddriver.cloudfoundry.cache.ResourceCacheData@bd3195f1]
    The following actual elements were not matched in the expected SingletonSet:
      [com.netflix.spinnaker.clouddriver.cloudfoundry.cache.ResourceCacheData@bd31962c]

    The recursive comparison was performed with this configuration:
    - no overridden equals methods were used in the comparison (except for java types)
    - these types were compared with the following comparators:
      - java.lang.Double -> DoubleComparator[precision=1.0E-15]
      - java.lang.Float -> FloatComparator[precision=1.0E-6]
      - java.nio.file.Path -> lexicographic comparator (Path natural order)
    - actual and expected objects and their fields were compared field by field recursively even if they were not of the same type, this allows for example to compare a Person to a PersonDto (call strictTypeChecking(true) to change that behavior).
        at com.netflix.spinnaker.clouddriver.cloudfoundry.provider.agent.CloudFoundryLoadBalancerCachingAgentTest.handleShouldReturnOnDemandResultsWithCacheTimeAndNoProcessedTime(CloudFoundryLoadBalancerCachingAgentTest.java:191)

It's not clear why ignoring the order when comparing what looks like a singleton set is important, but I'd like to unblock the java 17 progress.
Copy link
Contributor

@j-sandy j-sandy left a comment

Choose a reason for hiding this comment

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

LGTM !

@j-sandy j-sandy added the ready to merge Approved and ready for a merge label Jun 26, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Jun 26, 2024
@mergify mergify bot merged commit f12a043 into spinnaker:master Jun 26, 2024
24 checks passed
@mattgogerly mattgogerly deleted the feat/java17 branch June 26, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.35
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants