Skip to content

Added ACM for SLL and Discovery Mode Configurations#1645

Merged
asifsmohammed merged 2 commits intoopensearch-project:mainfrom
asifsmohammed:cpf-discovery-mode
Aug 9, 2022
Merged

Added ACM for SLL and Discovery Mode Configurations#1645
asifsmohammed merged 2 commits intoopensearch-project:mainfrom
asifsmohammed:cpf-discovery-mode

Conversation

@asifsmohammed
Copy link
Copy Markdown
Collaborator

@asifsmohammed asifsmohammed commented Aug 8, 2022

Signed-off-by: Asif Sohail Mohammed nsifmoh@amazon.com

Description

  • Added Discovery Mode configuration option with Static, DNS, Cloud Map Discover modes
  • Added ACM support for SSL

Issues Resolved

Resolves #1591

Check List

  • New functionality includes testing.
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

@asifsmohammed asifsmohammed requested a review from a team as a code owner August 8, 2022 15:36
void invalid_InvalidPeerForwarderConfig_test(final String filePath) {
void invalid_InvalidPeerForwarderConfig_test(final String filePath) throws IOException {
// PeerForwarderConfiguration peerForwarderConfiguration = makeConfig(filePath);
// System.out.println(peerForwarderConfiguration.isSsl());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove commented out code.

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

class AwsCloudMapPeerListProvider_CreateTest {
Copy link
Copy Markdown
Collaborator

@chenqi0805 chenqi0805 Aug 9, 2022

Choose a reason for hiding this comment

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

We should change this name pattern into AwsCloudMapPeerListProviderCreateTest or AwsCloudMapPeerListProviderCreationTest

import static org.mockito.Mockito.when;

@ExtendWith(MockitoExtension.class)
class DnsPeerListProvider_CreateTest {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as above

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

class StaticPeerListProvider_CreateTest {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as above

Signed-off-by: Asif Sohail Mohammed <nsifmoh@amazon.com>
Signed-off-by: Asif Sohail Mohammed <nsifmoh@amazon.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #1645 (165201a) into main (b87298c) will decrease coverage by 0.11%.
The diff coverage is 90.81%.

@@             Coverage Diff              @@
##               main    #1645      +/-   ##
============================================
- Coverage     93.95%   93.83%   -0.12%     
- Complexity     1220     1272      +52     
============================================
  Files           163      167       +4     
  Lines          3474     3652     +178     
  Branches        282      292      +10     
============================================
+ Hits           3264     3427     +163     
- Misses          146      156      +10     
- Partials         64       69       +5     
Impacted Files Coverage Δ
...repper/peerforwarder/discovery/DiscoveryUtils.java 0.00% <0.00%> (ø)
...pper/peerforwarder/PeerForwarderConfiguration.java 83.82% <81.13%> (-0.71%) ⬇️
...prepper/peerforwarder/discovery/DiscoveryMode.java 88.88% <87.50%> (-11.12%) ⬇️
...rwarder/discovery/AwsCloudMapPeerListProvider.java 95.12% <95.12%> (ø)
...r/peerforwarder/discovery/DnsPeerListProvider.java 100.00% <100.00%> (ø)
...eerforwarder/discovery/StaticPeerListProvider.java 100.00% <100.00%> (ø)
...dataprepper/plugins/source/RandomStringSource.java 76.66% <0.00%> (+3.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

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

This looks good. Thanks!

One high-level thought: There might be a good opportunity to use the plugin framework for discovery modes. This would make for a nested configuration and allow the addition of other discovery modes easily. I think it is fair to put that beyond the scope of this PR though.

@asifsmohammed
Copy link
Copy Markdown
Collaborator Author

This looks good. Thanks!

One high-level thought: There might be a good opportunity to use the plugin framework for discovery modes. This would make for a nested configuration and allow the addition of other discovery modes easily. I think it is fair to put that beyond the scope of this PR though.

Does it mean using pluginModel for Discover Mode?

@asifsmohammed asifsmohammed merged commit 719e776 into opensearch-project:main Aug 9, 2022
@dlvenable
Copy link
Copy Markdown
Member

Yes. We could use the pluginModel for the discovery mode. This way, other discovery options can be provided without changing Data Prepper core.

engechas pushed a commit to engechas/data-prepper that referenced this pull request Sep 12, 2022
…ct#1645)

* Added ACM for SLL and Discovery Mode Configurations

Signed-off-by: Asif Sohail Mohammed <nsifmoh@amazon.com>
@asifsmohammed asifsmohammed deleted the cpf-discovery-mode branch September 18, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PeerForwarderConfiguration class

4 participants