-
Notifications
You must be signed in to change notification settings - Fork 57
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
RUMM-2372 Adapt PokoGenerator and Session Replay models generator to new schemas #1002
RUMM-2372 Adapt PokoGenerator and Session Replay models generator to new schemas #1002
Conversation
15950e3
to
1360359
Compare
Codecov Report
@@ Coverage Diff @@
## feature/session-replay-vo #1002 +/- ##
=============================================================
+ Coverage 82.81% 82.89% +0.08%
=============================================================
Files 306 306
Lines 9853 9852 -1
Branches 1616 1615 -1
=============================================================
+ Hits 8159 8166 +7
+ Misses 1190 1186 -4
+ Partials 504 500 -4
|
"https://github.com/DataDog/rum-events-format.git", | ||
"schemas/session-replay/mobile", | ||
destinationFolder = "src/main/json/schemas/session-replay/mobile", | ||
excludedPrefixes = listOf(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: default value is emptyList()
anyway, so there is no need to specify this parameter explicitly
"https://github.com/DataDog/rum-events-format.git", | ||
"schemas/session-replay/common", | ||
destinationFolder = "src/main/json/schemas/session-replay/common", | ||
excludedPrefixes = listOf(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: same as above
@@ -27,9 +27,6 @@ class JsonSchemaReader( | |||
fun readSchema(schemaFile: File): TypeDefinition { | |||
logger.info("Reading schema ${schemaFile.name}") | |||
val schema = loadSchema(schemaFile) | |||
require(schema.type == JsonType.OBJECT) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is removed if no changes are done to the reader logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is to support the special case I added in the tests. Is because the browser team needed this in the schemas and we are sharing that with them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, just wanted to make sure things work as expected in the JsonSchemaReader
for the schema.type != JsonType.OBJECT
case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, apparently they work, I still need to ask Xavier why he added this there in the first place. Maybe it was a constraint in the beginning.
1360359
to
0a1a561
Compare
What does this PR do?
The Session Replay schemas structure was modified in order to support also the browser events format.
We had to adapt our PokoGenerator to support a root schema for which the type is resolved from a referenced schema.
We also had to change/adapt our models generator Gradle tasks in the
dd-sdk-android-session-replay
module.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)