Skip to content
Open
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ data class ExplainSMPolicy(
override fun toXContent(builder: XContentBuilder, params: ToXContent.Params): XContentBuilder {
metadata?.let {
builder
.field(SMMetadata.CREATION_FIELD, it.creation)
.optionalField(SMMetadata.CREATION_FIELD, it.creation)
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this have bwc issue when doing rolling upgrade? guess we need to add version check here

Copy link
Contributor Author

@Tarun-kishore Tarun-kishore Oct 13, 2025

Choose a reason for hiding this comment

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

Yes, Good catch. Added a version check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Hailong-am I added a version check for greater than 3.3 (which is current version). The coverage is failing though, version 3.4 needs to be available for testing it. Rest all CI workflows are passing.

.optionalField(SMMetadata.DELETION_FIELD, it.deletion)
.field(SMMetadata.POLICY_SEQ_NO_FIELD, it.policySeqNo)
.field(SMMetadata.POLICY_PRIMARY_TERM_FIELD, it.policyPrimaryTerm)
Expand Down
Loading