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 3 commits into
base: develop
Choose a base branch
from

Conversation

vitorhugods
Copy link
Member


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

2 976 tests   - 136   1 064 ✔️  - 1 943   1h 1m 34s ⏱️ + 58m 25s
       7 suites  - 526        18 💤  -      87 
       7 files    - 526   1 894 +1 894 

For more details on these failures, see this check.

Results for commit b839499. ± Comparison against base commit 5881d0d.

This pull request removes 3112 and adds 2976 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: b5d3892
Test service: kalium-jvm

❌ 1894 Failed (0 Known Flaky), 1079 Passed, 52 Skipped, 13.73s Total Time

❌ Failed Tests (1894)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants