Skip to content

Conversation

panagiotisgts
Copy link
Contributor

@panagiotisgts panagiotisgts commented Aug 28, 2025

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

@github-actions github-actions bot added the component/zeebe Related to the Zeebe component/team label Aug 28, 2025
Exclude fields introduced in 8.8 from being part of the serialized ES/OS exported document for previous versions
@panagiotisgts panagiotisgts requested review from ChrisKujawa, a team and houssain-barouni and removed request for a team August 29, 2025 13:16
@panagiotisgts panagiotisgts changed the title fix: exclude batchOperationReference for 8.7 records from being exported Exclude 8.8 fields from being serialized for 8.7 records Aug 29, 2025
@houssain-barouni houssain-barouni requested a review from a team August 29, 2025 13:32
Copy link
Collaborator

@houssain-barouni houssain-barouni left a 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.

PROCESS_DEFINITION_PATH_PROPERTY,
CALLING_ELEMENT_PATH_PROPERTY,
})
private static final class ProcessInstanceMixin {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here ProcessInstance87Mixin ?

Copy link
Contributor Author

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

Copy link
Collaborator

@houssain-barouni houssain-barouni Sep 1, 2025

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

@panagiotisgts panagiotisgts force-pushed the pg/37343-exclude-batchOperationReference branch from 5d22749 to 2d4e2fc Compare September 1, 2025 12:05
Copy link
Collaborator

@houssain-barouni houssain-barouni left a 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.

@houssain-barouni houssain-barouni added backport stable/8.6 Backport a pull request to stable/8.6 backport stable/8.7 Backport a pull request to stable/8.7 labels Sep 1, 2025
@panagiotisgts panagiotisgts force-pushed the pg/37343-exclude-batchOperationReference branch from 5c23ab6 to bfa38c8 Compare September 1, 2025 12:33
Copy link
Contributor

github-actions bot commented Sep 1, 2025

🧪 Flaky Tests Summary

👻 Haunted Tests — They Fail When No One's Watching

  • shouldAssign87ZeebeTaskV1 – 💀 100% flakiness

    • Jobs: opensearch-integration-tests
    • Package: io.camunda.it.migration.usertask
    • Class: AssignUserTaskMigrationIT
    • Occurrences: 1 / 1
  • shouldMigrateProcess – 💀 100% flakiness

    • Jobs: opensearch-integration-tests
    • Package: io.camunda.it.orchestration
    • Class: ProcessMigrationIT
    • Occurrences: 1 / 1

If the changes affect this area, please check and fix before merging.
If not, leave a quick comment explaining why it's likely unrelated.

@panagiotisgts panagiotisgts added this pull request to the merge queue Sep 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 1, 2025
@houssain-barouni houssain-barouni added this pull request to the merge queue Sep 1, 2025
Merged via the queue into main with commit b62c0ae Sep 1, 2025
105 checks passed
@houssain-barouni houssain-barouni deleted the pg/37343-exclude-batchOperationReference branch September 1, 2025 14:17
@backport-action
Copy link
Collaborator

Created backport PR for stable/8.6:

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

@backport-action
Copy link
Collaborator

Created backport PR for stable/8.7:

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

@backport-action
Copy link
Collaborator

other side closed

@backport-action
Copy link
Collaborator

Successfully created backport PR for release-8.8.0-alpha8:

panagiotisgts added a commit that referenced this pull request Sep 2, 2025
…zed for 8.7 records (#37464)

# Description
Backport of #37346 to `release-8.8.0-alpha8`.

relates to #37343
github-merge-queue bot pushed a commit that referenced this pull request Sep 2, 2025
# 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"
<                 }
<               }
<             },
```
github-merge-queue bot pushed a commit that referenced this pull request Sep 2, 2025
# 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"
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.6 Backport a pull request to stable/8.6 backport stable/8.7 Backport a pull request to stable/8.7 component/zeebe Related to the Zeebe component/team version:8.6.26 version:8.7.12 version:8.8.0-alpha8-rc3 version:8.8.0-alpha8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporting backlog from 8.7 should exclude 8.8 fields from being serialized
3 participants