RUM-10316: using common-schema for common object generation#2794
Conversation
…ng cloning common schema
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/v3 #2794 +/- ##
==============================================
- Coverage 67.62% 67.59% -0.03%
==============================================
Files 818 818
Lines 30745 30763 +18
Branches 5179 5180 +1
==============================================
+ Hits 20789 20792 +3
- Misses 8564 8583 +19
+ Partials 1392 1388 -4
🚀 New features to boost your workflow:
|
| extension.apply { | ||
| clone( | ||
| "https://github.com/DataDog/rum-events-format.git", | ||
| "schemas/rum", |
There was a problem hiding this comment.
Just out of curiosity. Will it work if I write here schemas/rum/_common-schema.json without specifying all other files in excludedPrefixes?
There was a problem hiding this comment.
it would but it will download all those files that is unnecessary for logs schema.
Specifying single file is not supported by clone gradle plugin at this moment
|
Is my understanding correct that another solution would be just to change schemas for Yes, there will not be a single source of truth but we would avoid all complicated changes here. |
|
And where does schema for logs for example actually come from (tbh I don't know)? The way I see it we should just use that (whatever it is). We shouldn't on our side decide that "oh actually this should be the same as in RUM". Logs might know nothing about RUM backend. |
Well, not exactly. We need to have same schema as iOS has. So in case if we just manually adjust *.json files we still gonna have lot of changes in generated code and as well as in mapper logic. So the only difference will be actually in schema file. (And we could avoid adding clone plugin integration). But on the other hand every schema change will force us manually compare changes and align schema, which might lead to potential issues |
Ageed, and we don't actually use RUM schema for logs. We use RUM schema for |
The base branch was changed.
What does this PR do?
This PR continues changes started in #2793
There are several changes were mage under this PR:
cloneCommonSchematask was added for-logsand-tracemodules - making possible to clone most recent schema file from schema repositorygenerateLogModelsFromJsonandgenerateTraceModelFromJsontasks were updated to ignore objects from_common_schema.jsonfrom being generated directlyspan-schema.jsonandlog-schema.jsonfiles were updated to support property referencing added in RUM-10316 - properties referencing support #2793Motivation
We aiming to align event schema for v3 on both platforms.
Similar changes were made for ios DataDog/dd-sdk-ios#2322
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)