-
Notifications
You must be signed in to change notification settings - Fork 692
Exclude 8.8 fields from being serialized for 8.7 records #37346
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
Exclude 8.8 fields from being serialized for 8.7 records #37346
Conversation
Exclude fields introduced in 8.8 from being part of the serialized ES/OS exported document for previous versions
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.
Thank you for handling this 💪
I have added some comments and suggestions.
Let's consider creating a follow-up task to add a unit (revapi?) test ensuring all new fields are excluded when serializing records from previous versions.
I have not exhaustively compared all the 8.7 and 8.8 differences. Let me know if you would like me to take a closer look.
...porters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/BulkIndexRequest.java
Outdated
Show resolved
Hide resolved
...porters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/BulkIndexRequest.java
Outdated
Show resolved
Hide resolved
PROCESS_DEFINITION_PATH_PROPERTY, | ||
CALLING_ELEMENT_PATH_PROPERTY, | ||
}) | ||
private static final class ProcessInstanceMixin {} |
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.
same here ProcessInstance87Mixin
?
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.
Mixins would most likely be used for the previous versions, not sure whether we'd to make this explicit
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.
EvaluatedDecisionMixin
is used for the current version, so it can be confusing
...porters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/BulkIndexRequest.java
Show resolved
Hide resolved
...porters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/BulkIndexRequest.java
Outdated
Show resolved
Hide resolved
...porters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/BulkIndexRequest.java
Outdated
Show resolved
Hide resolved
...porters/elasticsearch-exporter/src/main/java/io/camunda/zeebe/exporter/BulkIndexRequest.java
Show resolved
Hide resolved
5d22749
to
2d4e2fc
Compare
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.
LGTM! 🚀
To avoid confusion, I still recommend including the version in the names of the Mixin classes.
I will add backport labels to backport this to stable/8.7 and 8.6 to fix #37283.
Some adaptation will be required for these branches. If you are busy with other tasks, I can handle this. This issue is urgent, so it would be beneficial to have the fix included in the upcoming patch releases.
For the backport to release-8.8.0-alpha8, you need to check with @cmur2 , if we can still have this in the alpha8 release.
5c23ab6
to
bfa38c8
Compare
🧪 Flaky Tests Summary👻 Haunted Tests — They Fail When No One's Watching
If the changes affect this area, please check and fix before merging. |
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-37346-to-stable/8.6
git worktree add --checkout .worktree/backport-37346-to-stable/8.6 backport-37346-to-stable/8.6
cd .worktree/backport-37346-to-stable/8.6
git reset --hard HEAD^
git cherry-pick -x f1b7a665a94d15300d9cc07b6a7a9487e564a9b3 cc4f633fd2c43a82397824340640c99fcd943d44 2d4e2fc021a5ac3911ff7c3d8582faf701161b03 bfa38c811a854ac1b13eef6b8c99f13319b3bc7e
git push --force-with-lease |
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-37346-to-stable/8.7
git worktree add --checkout .worktree/backport-37346-to-stable/8.7 backport-37346-to-stable/8.7
cd .worktree/backport-37346-to-stable/8.7
git reset --hard HEAD^
git cherry-pick -x f1b7a665a94d15300d9cc07b6a7a9487e564a9b3 cc4f633fd2c43a82397824340640c99fcd943d44 2d4e2fc021a5ac3911ff7c3d8582faf701161b03 bfa38c811a854ac1b13eef6b8c99f13319b3bc7e
git push --force-with-lease |
other side closed |
Successfully created backport PR for |
# Description Backport of #37346 to `stable/8.7`. closes #37283 relates to #37343 8.6 vs 8.7 diffs show ``` > diff -r 8.7/zeebe/exporters/elasticsearch-exporter/src/main/resources 8.6/zeebe/exporters/elasticsearch-exporter/src/main/resources diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-deployment-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-deployment-template.json 161,191d160 < "resourceMetadata": { < "properties": { < "resourceId": { < "type": "keyword" < }, < "version": { < "type": "long" < }, < "resourceKey": { < "type": "long" < }, < "resourceName": { < "type": "text" < }, < "checksum": { < "enabled": false < }, < "duplicate": { < "type": "boolean" < }, < "tenantId": { < "type": "keyword" < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" < } < } < }, ```
# Description Backport of #37346 to `stable/8.6`. closes #37283 relates to #37343 8.5 vs 8.6 diffs: ``` diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-command-distribution-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-command-distribution-template.json 25,27d24 < "queueId": { < "type": "keyword" < }, diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-decision-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-decision-template.json 45,50d44 < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-deployment-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-deployment-template.json 46,51d45 < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" 121,126d114 < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" 152,157d139 < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" 163,165d144 < }, < "deploymentKey": { < "type": "long" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-form-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-form-template.json 47,52d46 < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-incident-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-incident-template.json 51,59d50 < }, < "elementInstancePath": { < "enabled": false < }, < "processDefinitionPath": { < "enabled": false < }, < "callingElementPath": { < "enabled": false diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-job-batch-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-job-batch-template.json 97,102d96 < }, < "jobListenerEventType": { < "type": "keyword" < }, < "changedAttributes": { < "type": "text" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-job-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-job-template.json 78,83d77 < }, < "jobListenerEventType": { < "type": "keyword" < }, < "changedAttributes": { < "type": "text" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-process-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-process-template.json 45,50d44 < }, < "deploymentKey": { < "type": "long" < }, < "versionTag": { < "type": "keyword" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-template.json 53,55d52 < }, < "operationReference": { < "type": "long" diff -r zeebe/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-user-task-template.json zeebe3/zeebe/exporters/elasticsearch-exporter/src/main/resources/zeebe-record-user-task-template.json 81,83d80 < }, < "priority": { < "type": "integer" ```
Description
Conditionally exclude fields introduced in 8.8 for records with version 8.7 from being serialized in ES/OS Exporter exported records as it breaks schema mappings.
Tests had to be adjusted to have a specified Broker Version in the records generated so as to have a parsable semver value
Checklist
Related issues
closes #37343