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 9 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 107 tests   - 151   1 112 ✅  - 2 039   5m 23s ⏱️ + 1m 14s
    7 suites  - 550      19 💤  -    88 
    7 files    - 550   1 976 ❌ +1 976 

For more details on these failures, see this check.

Results for commit 921e07b. ± Comparison against base commit f417fd4.

This pull request removes 3258 and adds 3107 tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
PocIntegrationTest ‑ givenEmailAndPasswordWhenLoggingInThenRegisterClientAndLogout
PocIntegrationTest ‑ givenUserWhenHandlingTextMessagesThenProcessShouldSucceed
QualifiedIdTest ‑ givenIdsWithDifferentDomains_whenEqualsIgnoringBlankDomain_thenReturnsFalse[jvm]
QualifiedIdTest ‑ givenIdsWithDifferentValues_whenEqualsIgnoringBlankDomain_thenReturnsFalse[jvm]
QualifiedIdTest ‑ givenIdsWithSameDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue[jvm]
QualifiedIdTest ‑ givenIdsWithoutDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue[jvm]
QualifiedIdTest ‑ givenOneIdWithoutDomain_whenEqualsIgnoringBlankDomain_thenReturnsTrue[jvm]
com.wire.kalium.HttpClientConnectionSpecsTest ‑ givenOkHttpSingleton_whenBuildingClearTextTrafficOkhttpClient_thenEnsureConnectionSpecClearText[jvm]
com.wire.kalium.HttpClientConnectionSpecsTest ‑ givenTheHttpClientIsCreated_ThenEnsureOnlySupportedSpecsArePresent[jvm]
…
.QualifiedIdTest ‑ givenIdsWithDifferentDomains_whenEqualsIgnoringBlankDomain_thenReturnsFalse
.QualifiedIdTest ‑ givenIdsWithDifferentValues_whenEqualsIgnoringBlankDomain_thenReturnsFalse
.QualifiedIdTest ‑ givenIdsWithSameDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue
.QualifiedIdTest ‑ givenIdsWithoutDomains_whenEqualsIgnoringBlankDomain_thenReturnsTrue
.QualifiedIdTest ‑ givenOneIdWithoutDomain_whenEqualsIgnoringBlankDomain_thenReturnsTrue
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 ‑ givenCRLWithHttpsProtocol_whenGettingClientDomainCRL_thenItShouldNotBeChanged
com.wire.kalium.api.common.ACMEApiTest ‑ givenNoLocationInHeader_whenCallingSendAcmeRequestApi_theResponseShouldBeConfigureCorrectly
…
This pull request removes 107 skipped tests and adds 19 skipped tests. Note that renamed tests count towards both.
PocIntegrationTest ‑ givenApiWhenGettingACMEDirectoriesThenReturnAsExpectedBasedOnNetworkState
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.cryptography.CryptoUtilsTest ‑ givenDummyText_whenEncryptedAndDecryptedWithAES256_returnsOriginalText[js, browser]
…
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.data.conversation.ConversationRepositoryTest ‑ givenAGroupConversationHasNotNewMessages_whenGettingConversationDetails_ThenReturnZeroUnreadMessageCount
…

♻️ This comment has been updated with latest results.

Copy link

@datadog-wireapp
Copy link

datadog-wireapp bot commented Jul 17, 2024

Datadog Report

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

❌ 1976 Failed (0 Known Flaky), 1140 Passed, 53 Skipped, 36.37s Total Time

❌ Failed Tests (1976)

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:
     ...
    

Copy link
Contributor

github-actions bot commented Sep 12, 2024

🐰 Bencher Report

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!

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
BenchmarkLatencynanoseconds (ns)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
653,736.85
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
338,342,380.21
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
926,433,814.80
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
21,620,768.09
🐰 View full continuous benchmarking report in Bencher

Copy link

Copy link

sonarqubecloud bot commented Nov 8, 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