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: upgrade to kotlin 2.0 [WPB-8645] #2884

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

vitorhugods
Copy link
Member

@vitorhugods vitorhugods commented Jul 17, 2024

EpicWPB-8645 [Android] Infrastructure code and developer experience


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Upgrade to Kotlin 2.0.0

Detekt is being forced to run using 1.9.23 for now, as it can't run on 2.0.0 yet.


PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

Copy link
Contributor

github-actions bot commented Jul 17, 2024

Test Results

3 050 tests   - 147   1 077 ✔️  - 2 015   4m 52s ⏱️ + 1m 14s
       7 suites  - 543        18 💤  -      87 
       7 files    - 543   1 955 +1 955 

For more details on these failures, see this check.

Results for commit bf1ca06. ± Comparison against base commit 2b6e0ac.

This pull request removes 3197 and adds 3050 tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
PocIntegrationTest ‑ givenEmailAndPasswordWhenLoggingInThenRegisterClientAndLogout
com.wire.kalium.HttpClientConnectionSpecsTest ‑ givenOkHttpSingleton_whenBuildingClearTextTrafficOkhttpClient_thenEnsureConnectionSpecClearText[jvm]
com.wire.kalium.HttpClientConnectionSpecsTest ‑ givenTheHttpClientIsCreated_ThenEnsureOnlySupportedSpecsArePresent[jvm]
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayloadWithAccessRoleAndDeprecatedAccessRoleField_whenDecoding_thenDeprecatedFieldIsPreferred[jvm]
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayloadWithDeprecatedAccessRoleField_whenDecoding_thenSuccess[jvm]
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayload_whenDecoding_thenSuccess[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoLocationInHeader_whenCallingSendAcmeRequestApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoNonce_whenCallingSendAcmeRequestApi_theResponseShouldBeMissingNonce[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ givingASuccessfulResponse_whenGettingACMEFederationCertificateChain_thenAllCertificatesShouldBeParsed[jvm]
…
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayloadWithAccessRoleAndDeprecatedAccessRoleField_whenDecoding_thenDeprecatedFieldIsPreferred
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayloadWithDeprecatedAccessRoleField_whenDecoding_thenSuccess
com.wire.kalium.api.base.authenticated.notification.AccessUpdateTest ‑ givenPayload_whenDecoding_thenSuccess
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoLocationInHeader_whenCallingSendAcmeRequestApi_theResponseShouldBeConfigureCorrectly
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoNonce_whenCallingSendAcmeRequestApi_theResponseShouldBeMissingNonce
com.wire.kalium.api.common.ACMEApiTest ‑ givingASuccessfulResponse_whenGettingACMEFederationCertificateChain_thenAllCertificatesShouldBeParsed
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGeTrustAnchorsApi_theResponseShouldBeConfigureCorrectly
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGetACMEDirectoriesApi_theResponseShouldBeConfigureCorrectly
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGetACMENonceApi_theResponseShouldBeConfigureCorrectly
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingSendAcmeRequestApi_theResponseShouldBeConfigureCorrectly
…
This pull request removes 105 skipped tests and adds 18 skipped tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
PocIntegrationTest ‑ givenEmailAndPasswordWhenLoggingInThenRegisterClientAndLogout
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGeTrustAnchorsApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingSendChallengeRequestApi_theResponseShouldBeConfigureCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenActivationEmailWIthCode_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenRegisteringAccountWithEMail_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenAValidEmail_whenSendingActivationEmail_theRequestShouldBeConfiguredCorrectly[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenActivationCodeFail_thenErrorIsPropagated[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenRegistrationFail_whenRegisteringAccountWithEMMail_thenErrorIsPropagated[jvm]
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ givenSendActivationCodeFail_thenErrorIsPropagated[jvm]
…
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingGeTrustAnchorsApi_theResponseShouldBeConfigureCorrectly
com.wire.kalium.api.common.ACMEApiTest ‑ whenCallingSendChallengeRequestApi_theResponseShouldBeConfigureCorrectly
com.wire.kalium.api.v0.user.register.RegisterApiV0Test ‑ null
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenDummyText_whenEncryptedAndDecryptedWithAES256_returnsOriginalText
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenSomeDummyFile_whenEncryptedAndDecryptedWithAES256_returnsExpectedOriginalFile
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenSomeDummyFile_whenEncryptedAsAFileAndDecryptedWithAES256AsData_returnsExpectedOriginalFileContent
com.wire.kalium.cryptography.CryptoUtilsTest ‑ givenSomeDummyFile_whenEncryptedAsDataAndDecryptedWithAES256AsAFile_returnsExpectedOriginalFileContent
com.wire.kalium.cryptography.CryptoUtilsTest ‑ testGivenByteArray_whenCallingCalcMd5_returnsExpectedDigest
com.wire.kalium.cryptography.CryptoUtilsTest ‑ testGivenByteArray_whenCallingCalcSHA256_returnsExpectedDigest
com.wire.kalium.logic.feature.backup.RestoreBackupUseCaseTest ‑ givenACorrectlyEncryptedBackup_whenRestoringWithWrongPassword_thenTheRightErrorIsThrown
…

♻️ This comment has been updated with latest results.

Copy link

sonarcloud bot commented Jul 17, 2024

@datadog-wireapp
Copy link

datadog-wireapp bot commented Jul 17, 2024

Datadog Report

Branch report: chore/upgrade-to-kotlin-2.0
Commit report: 2077684
Test service: kalium-jvm

❌ 1955 Failed (0 Known Flaky), 1102 Passed, 52 Skipped, 11.61s Total Time

❌ Failed Tests (1955)

This report shows up to 5 failed tests.

  • givenFailure_thenErrorIsPropagated[jvm] - com.wire.kalium.logic.cache.SelfConversationIdProviderTest - Details

    Expand for error
     io.mockative.NoSuchMockException: A mock for the type ClientRepository was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     
             @Mock
             private val myMock = mock(classOf<ClientRepository>())
     
     io.mockative.NoSuchMockException: A mock for the type ClientRepository was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     ...
    
  • givenMLSClientHasBeenRegistered_thenMLSAndProteusSelfConversationAreReturned[jvm] - com.wire.kalium.logic.cache.SelfConversationIdProviderTest - Details

    Expand for error
     io.mockative.NoSuchMockException: A mock for the type ClientRepository was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     
             @Mock
             private val myMock = mock(classOf<ClientRepository>())
     
     io.mockative.NoSuchMockException: A mock for the type ClientRepository was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     ...
    
  • givenMLSClientHasNotBeenRegistered_thenProteusSelfConversationIsReturned[jvm] - com.wire.kalium.logic.cache.SelfConversationIdProviderTest - Details

    Expand for error
     io.mockative.NoSuchMockException: A mock for the type ClientRepository was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     
             @Mock
             private val myMock = mock(classOf<ClientRepository>())
     
     io.mockative.NoSuchMockException: A mock for the type ClientRepository was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     ...
    
  • givenIsNewClientTrue_whenGettingE2EIClient_newAcmeEnrollmentCalled[jvm] - com.wire.kalium.logic.client.E2EIClientProviderTest - Details

    Expand for error
     io.mockative.NoSuchMockException: A mock for the type MLSClientProvider was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     
             @Mock
             private val myMock = mock(classOf<MLSClientProvider>())
     
     io.mockative.NoSuchMockException: A mock for the type MLSClientProvider was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     ...
    
  • givenMLSClientWithE2EI_whenGettingE2EIClient_callsNewActivationEnrollment[jvm] - com.wire.kalium.logic.client.E2EIClientProviderTest - Details

    Expand for error
     io.mockative.NoSuchMockException: A mock for the type MLSClientProvider was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     
             @Mock
             private val myMock = mock(classOf<MLSClientProvider>())
     
     io.mockative.NoSuchMockException: A mock for the type MLSClientProvider was not generated.
     
         Make sure the property holding the mock is annotated with @Mock:
     ...
    

@vitorhugods vitorhugods marked this pull request as draft July 18, 2024 08:03
@echoes-hq echoes-hq bot added the echoes: throughput/ci-maintenance Changes we need to do to keep CI healthy and fast label Jul 22, 2024
Copy link
Contributor

github-actions bot commented Sep 12, 2024

🐰Bencher

ReportThu, September 12, 2024 at 08:54:11 UTC
Projectkalium
Branchchore/upgrade-to-kotlin-2.0
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

  • Latency (latency)

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles➖ (view plot)689,841.29
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory➖ (view plot)1,092,650,420.82
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark➖ (view plot)943,841,300.87
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark➖ (view plot)21,060,324.88

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link

sonarcloud bot commented Sep 12, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants