Update dependency org.matrix.rustcomponents:sdk-android to v26.2.16 (#6211)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.2.16 * Fix log rotation breaking changes. The new values match iOS (https://github.com/element-hq/element-x-ios/pull/5108/) * Fix `aRustRoomInfo()` test fixture --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
parent
1b73a15953
commit
bc295b3c97
5 changed files with 13 additions and 6 deletions
|
|
@ -429,7 +429,7 @@ class DefaultBugReporterTest {
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).directory).endsWith("/cache/logs/server.org")
|
assertThat((param as WriteToFilesConfiguration.Enabled).directory).endsWith("/cache/logs/server.org")
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).filenamePrefix).isEqualTo("logs")
|
assertThat((param as WriteToFilesConfiguration.Enabled).filenamePrefix).isEqualTo("logs")
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).numberOfFiles).isEqualTo(168)
|
assertThat((param as WriteToFilesConfiguration.Enabled).numberOfFiles).isEqualTo(168)
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo("log")
|
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo(".log")
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
|
|
@ -491,7 +491,7 @@ class DefaultBugReporterTest {
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).directory).endsWith("/cache/logs")
|
assertThat((param as WriteToFilesConfiguration.Enabled).directory).endsWith("/cache/logs")
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).filenamePrefix).isEqualTo("logs")
|
assertThat((param as WriteToFilesConfiguration.Enabled).filenamePrefix).isEqualTo("logs")
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).numberOfFiles).isEqualTo(168)
|
assertThat((param as WriteToFilesConfiguration.Enabled).numberOfFiles).isEqualTo(168)
|
||||||
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo("log")
|
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo(".log")
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version
|
||||||
# https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt
|
# https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt
|
||||||
# All new features should not be implemented in the pull request that upgrades the version, developers should
|
# All new features should not be implemented in the pull request that upgrades the version, developers should
|
||||||
# only fix API breaks and may add some TODOs.
|
# only fix API breaks and may add some TODOs.
|
||||||
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.2.10"
|
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.2.16"
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
|
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ sealed interface WriteToFilesConfiguration {
|
||||||
val filenamePrefix: String,
|
val filenamePrefix: String,
|
||||||
val numberOfFiles: Int?,
|
val numberOfFiles: Int?,
|
||||||
) : WriteToFilesConfiguration {
|
) : WriteToFilesConfiguration {
|
||||||
// DO NOT CHANGE: suffix *MUST* be "log" for the rageshake server to not rename the file to something generic
|
// DO NOT CHANGE: suffix *MUST* be ".log" for the rageshake server to not rename the file to something generic
|
||||||
val filenameSuffix = "log"
|
val filenameSuffix = ".log"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ package io.element.android.libraries.matrix.impl.tracing
|
||||||
|
|
||||||
import dev.zacsweers.metro.AppScope
|
import dev.zacsweers.metro.AppScope
|
||||||
import dev.zacsweers.metro.ContributesBinding
|
import dev.zacsweers.metro.ContributesBinding
|
||||||
|
import io.element.android.libraries.core.data.ByteUnit
|
||||||
|
import io.element.android.libraries.core.data.megaBytes
|
||||||
import io.element.android.libraries.core.meta.BuildMeta
|
import io.element.android.libraries.core.meta.BuildMeta
|
||||||
import io.element.android.libraries.matrix.api.tracing.LogLevel
|
import io.element.android.libraries.matrix.api.tracing.LogLevel
|
||||||
import io.element.android.libraries.matrix.api.tracing.TracingConfiguration
|
import io.element.android.libraries.matrix.api.tracing.TracingConfiguration
|
||||||
|
|
@ -49,7 +51,10 @@ private fun WriteToFilesConfiguration.toTracingFileConfiguration(): TracingFileC
|
||||||
path = directory,
|
path = directory,
|
||||||
filePrefix = filenamePrefix,
|
filePrefix = filenamePrefix,
|
||||||
fileSuffix = filenameSuffix,
|
fileSuffix = filenameSuffix,
|
||||||
maxFiles = numberOfFiles?.toULong(),
|
// Have at max 100MB of logs in disk
|
||||||
|
maxTotalSizeBytes = 100.megaBytes.into(ByteUnit.BYTES).toULong(),
|
||||||
|
// Store up to 7 days of logs
|
||||||
|
maxAgeSeconds = (7 * 24 * 60 * 60).toULong(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ internal fun aRustRoomInfo(
|
||||||
successorRoom: SuccessorRoom? = null,
|
successorRoom: SuccessorRoom? = null,
|
||||||
roomVersion: String? = "11",
|
roomVersion: String? = "11",
|
||||||
privilegedCreatorsRole: Boolean = false,
|
privilegedCreatorsRole: Boolean = false,
|
||||||
|
serviceMembers: List<String> = emptyList(),
|
||||||
) = RoomInfo(
|
) = RoomInfo(
|
||||||
id = id,
|
id = id,
|
||||||
displayName = displayName,
|
displayName = displayName,
|
||||||
|
|
@ -94,4 +95,5 @@ internal fun aRustRoomInfo(
|
||||||
successorRoom = successorRoom,
|
successorRoom = successorRoom,
|
||||||
roomVersion = roomVersion,
|
roomVersion = roomVersion,
|
||||||
privilegedCreatorsRole = privilegedCreatorsRole,
|
privilegedCreatorsRole = privilegedCreatorsRole,
|
||||||
|
serviceMembers = serviceMembers,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue