Skip to content
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

adding constructor with optional comments indices args #674

Merged
merged 5 commits into from
Jun 10, 2024
Merged

adding constructor with optional comments indices args #674

merged 5 commits into from
Jun 10, 2024

Conversation

toepkerd
Copy link
Contributor

@toepkerd toepkerd commented Jun 10, 2024

Description

Fixing a breaking change to Security Analytics Plugin caused by #663

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -89,6 +86,29 @@ data class DataSources(
findingsEnabled = sin.readOptionalBoolean()
)

@Throws(IOException::class)
Copy link
Member

Choose a reason for hiding this comment

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

why are we expecting IoException?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing

@@ -89,6 +86,28 @@ data class DataSources(
findingsEnabled = sin.readOptionalBoolean()
)

constructor(
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/opensearch-project/common-utils/pull/674/files#diff-97cf101698aba14b5844f08b1d5be6fcf2752671b9d7510d1a566efbeec20793R83

comments index should be using readOptionalString(), writeOptionalString, null check in parsing etc.
plz incorporate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updating readOptional and writeOptional, parse adds an empty string placeholder for any comments that don't exist in the XContent, so leaving that be

Signed-off-by: Dennis Toepker <[email protected]>
Signed-off-by: Dennis Toepker <[email protected]>
Signed-off-by: Dennis Toepker <[email protected]>
@AWSHurneyt AWSHurneyt merged commit bc215fd into opensearch-project:main Jun 10, 2024
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 10, 2024
* adding ctor with optional comments indices args

Signed-off-by: Dennis Toepker <[email protected]>

* removing throws IOException declaration above new ctor

Signed-off-by: Dennis Toepker <[email protected]>

* making reads and writes optional

Signed-off-by: Dennis Toepker <[email protected]>

* quick comment change

Signed-off-by: Dennis Toepker <[email protected]>

* adding test for new ctor

Signed-off-by: Dennis Toepker <[email protected]>

---------

Signed-off-by: Dennis Toepker <[email protected]>
Co-authored-by: Dennis Toepker <[email protected]>
(cherry picked from commit bc215fd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
eirsep pushed a commit that referenced this pull request Jun 10, 2024
* adding ctor with optional comments indices args



* removing throws IOException declaration above new ctor



* making reads and writes optional



* quick comment change



* adding test for new ctor



---------



(cherry picked from commit bc215fd)

Signed-off-by: Dennis Toepker <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dennis Toepker <[email protected]>
@toepkerd toepkerd deleted the alerting-comments branch June 10, 2024 23:59
@eirsep eirsep changed the title adding ctor with optional comments indices args adding constrcutor with optional comments indices args Jun 11, 2024
@eirsep eirsep changed the title adding constrcutor with optional comments indices args adding constructor with optional comments indices args Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants