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

Hosted SDK Version Info #578

Merged
merged 51 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
af9ebce
new class HostedSdkVersionInfo
nelsitoPuglisi Mar 15, 2024
9280495
new UnitySdkVersionInfo
nelsitoPuglisi Mar 15, 2024
4ed8f0d
host sdk platform strategy
nelsitoPuglisi Mar 17, 2024
3256905
HostedPlatformStrategy instantiated internally
nelsitoPuglisi Mar 19, 2024
8cde730
fix detekt
nelsitoPuglisi Mar 19, 2024
da38824
GHA worflows - Use common actions
paolostancato Mar 18, 2024
bae8602
Extract wrapper for EmbraceSerializer
bidetofevil Mar 15, 2024
d550885
Protect EmbraceCacheService against races for lock acquisition
bidetofevil Mar 16, 2024
3cc20d1
Synchronize access to lock map when a lock isn't found
bidetofevil Mar 17, 2024
40dd1e7
Add helper component to coordinate parallel execution and reimplement…
bidetofevil Mar 16, 2024
c75aaff
Stop running a couple of flakey tests to future diagnoise problem
bidetofevil Mar 17, 2024
6b04b4a
Use a blocking queue in test infra to prevent races in validation data
bidetofevil Mar 17, 2024
6322d6c
Remove concurrency testing logic from FakeStorageService
bidetofevil Mar 17, 2024
1b40ef4
More flaky commenting out
bidetofevil Mar 17, 2024
f12909e
Remove unsynchronized execution order checks
bidetofevil Mar 17, 2024
f6c376d
Remove unused methods in CacheService and modify tests to use differe…
bidetofevil Mar 17, 2024
f26a293
Simple reordering of methods in interface and impls before bigger change
bidetofevil Mar 17, 2024
6584ded
Extract safe-write logic from session writing path so it can be reused
bidetofevil Mar 17, 2024
7afa4cd
Use the safe write method to write to disk for all objects
bidetofevil Mar 17, 2024
75ff738
Split EnvelopeSource into LogEnvelopeSource and SessionEnvelopeSource
lucaslabari Mar 18, 2024
185e9ea
Fix race condition in Log Sink.
lucaslabari Mar 17, 2024
0edf6bd
Remove max param from flushLogs() and use the const from LogOrchestra…
lucaslabari Mar 18, 2024
150e5cc
Change the names used for emb.type
bidetofevil Mar 18, 2024
7b32ff3
Changed description of the type
bidetofevil Mar 18, 2024
ff809b7
fix: ensure spans aren't flushed twice
fractalwrench Mar 18, 2024
48e6370
refactor: alter v2 spans endpoint
fractalwrench Mar 18, 2024
f196adc
refactor: use v1 endpoint for now
fractalwrench Mar 18, 2024
dec49f7
Fix expected JSON for functional tests
bidetofevil Mar 18, 2024
1b1043b
Remove unused method
leandro-godon Mar 18, 2024
82f63b6
Format fixes
leandro-godon Mar 18, 2024
de494ac
Add a version of take() that is threadsafe
bidetofevil Mar 18, 2024
696e12f
Add app framework to the v2 logs
leandro-godon Mar 18, 2024
84acbb9
Lint fixes
leandro-godon Mar 18, 2024
a3996b7
Restate deleted line
leandro-godon Mar 18, 2024
aae02b2
Extract common methods from LogServie and LogMessageService to a comm…
leandro-godon Mar 19, 2024
a4707d6
Replace LogMessageService with a CompositeLogService that can switch …
leandro-godon Mar 19, 2024
b2ce831
Rename method to sendLogEnvelope()
lucaslabari Mar 18, 2024
4f87bc5
Update param in sendLogs for DeliveryService.
lucaslabari Mar 18, 2024
0a66dc8
Update EmbraceApiServiceTest
lucaslabari Mar 18, 2024
aba4145
Implement logEnvelopeSource in FakePayloadModule
lucaslabari Mar 18, 2024
6bbfc8d
Pass LogEnvelopeSource to LogOrchestrator
lucaslabari Mar 18, 2024
407bea9
Update to verify that the sink is empty.
lucaslabari Mar 18, 2024
de15135
Add null or empty validation.
lucaslabari Mar 18, 2024
f150d3e
Make EmbraceSpan snapshottable
bidetofevil Mar 19, 2024
d314d45
Fix need for synthetic accessor
bidetofevil Mar 19, 2024
7b91625
Make Span services consume PersistableEmbraceSpan
bidetofevil Mar 19, 2024
d87cb78
test: add integration tests for features
fractalwrench Mar 19, 2024
704a9c3
add span assertions for tests
fractalwrench Mar 20, 2024
996abc6
remove logDeveloper
nelsitoPuglisi Mar 20, 2024
a7a8c90
remove unused class
nelsitoPuglisi Mar 20, 2024
9f01d17
Merge branch 'master' into nelson/hosted-sdk-version-info
nelsitoPuglisi Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simple reordering of methods in interface and impls before bigger change
  • Loading branch information
bidetofevil authored and nelsitoPuglisi committed Mar 20, 2024
commit f26a29347244227429e7a579f141b2b89a745f29
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ internal interface CacheService {
*/
fun cachePayload(name: String, action: SerializationAction)

/**
* Serializes a session object to disk via a stream. This saves memory when the session is large & the return value isn't used
* (e.g. for a crash & periodic caching). If an existing session already exists, it will only be replaced if the new [SessionMessage]
* is successfully written to disk
*/
fun writeSession(name: String, sessionMessage: SessionMessage)

/**
* Provides a function that writes the bytes from a cached file, if it exists, to an
* outputstream
Expand Down Expand Up @@ -71,6 +64,13 @@ internal interface CacheService {
*/
fun loadOldPendingApiCalls(name: String): List<PendingApiCall>?

/**
* Serializes a session object to disk via a stream. This saves memory when the session is large & the return value isn't used
* (e.g. for a crash & periodic caching). If an existing session already exists, it will only be replaced if the new [SessionMessage]
* is successfully written to disk
*/
fun writeSession(name: String, sessionMessage: SessionMessage)

/**
* Transform the current saved session with the given name using the given [transformer] and save it in its place
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,22 @@ internal class EmbraceCacheService(
return properSessionFileIds.toList()
}

override fun loadOldPendingApiCalls(name: String): List<PendingApiCall>? {
findLock(name).read {
val file = storageService.getFileForRead(EMBRACE_PREFIX + name)
try {
val type = Types.newParameterizedType(List::class.java, PendingApiCall::class.java)
return serializer.fromJson(file.inputStream(), type) as List<PendingApiCall>?
?: emptyList()
} catch (ex: FileNotFoundException) {
logger.logDebug("Cache file cannot be found " + file.path)
} catch (ex: Exception) {
logger.logDebug("Failed to read cache object " + file.path, ex)
}
return null
}
}

override fun writeSession(name: String, sessionMessage: SessionMessage) {
findLock(name).write {
var isOverwrite = false
Expand Down Expand Up @@ -212,22 +228,6 @@ internal class EmbraceCacheService(
}
}

override fun loadOldPendingApiCalls(name: String): List<PendingApiCall>? {
findLock(name).read {
val file = storageService.getFileForRead(EMBRACE_PREFIX + name)
try {
val type = Types.newParameterizedType(List::class.java, PendingApiCall::class.java)
return serializer.fromJson(file.inputStream(), type) as List<PendingApiCall>?
?: emptyList()
} catch (ex: FileNotFoundException) {
logger.logDebug("Cache file cannot be found " + file.path)
} catch (ex: Exception) {
logger.logDebug("Failed to read cache object " + file.path, ex)
}
return null
}
}

override fun transformSession(name: String, transformer: (SessionMessage) -> SessionMessage) {
findLock(name).write {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ internal class FakeCacheService : CacheService {
TODO("Not yet implemented")
}

override fun deleteFile(name: String): Boolean {
override fun cachePayload(name: String, action: SerializationAction) {
TODO("Not yet implemented")
}

override fun normalizeCacheAndGetSessionFileIds(): List<String> {
override fun loadPayload(name: String): SerializationAction {
TODO("Not yet implemented")
}

override fun writeSession(name: String, sessionMessage: SessionMessage) {
override fun deleteFile(name: String): Boolean {
TODO("Not yet implemented")
}

override fun loadOldPendingApiCalls(name: String): List<PendingApiCall>? {
override fun normalizeCacheAndGetSessionFileIds(): List<String> {
TODO("Not yet implemented")
}

override fun cachePayload(name: String, action: SerializationAction) {
override fun loadOldPendingApiCalls(name: String): List<PendingApiCall>? {
TODO("Not yet implemented")
}

override fun loadPayload(name: String): SerializationAction {
override fun writeSession(name: String, sessionMessage: SessionMessage) {
TODO("Not yet implemented")
}

Expand Down