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

Add 'data.stream.namespace' configuration property #802

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

srishti-saraswat
Copy link
Contributor

@srishti-saraswat srishti-saraswat commented Oct 18, 2024

Problem

Original PR - #742
PR to expose this config on cloud - https://github.com/confluentinc/kafka-connect-elasticsearch-private/pull/43

Solution

Does this solution apply anywhere else?
  • yes
  • no
If yes, where?

Test Strategy

Tested using docker playground
Case 1: correct data stream namespace
connector configs -

{
     "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
     "tasks.max": "1",
     "topics": "test-elasticsearch-sink",
     "key.ignore": "true",
     "connection.url": "*********",
     "connection.username": "********",
     "connection.password": "********",
     "data.stream.namespace": "ssaraswat${topic}"
}

result -

12:46:10 ℹ️ ####################################################
12:46:10 ℹ️ ✅ RESULT: SUCCESS for elasticsearch-sink.sh (took: 2min 10sec - )
12:46:10 ℹ️ ####################################################

12:46:15 ℹ️ 🧩 Displaying status for 🌎onprem connector elasticsearch-sink
Name                           Status       Tasks                                                        Stack Trace                                       
-------------------------------------------------------------------------------------------------------------
elasticsearch-sink             ✅ RUNNING  0:🟢 RUNNING[connect]        -                                                 
-------------------------------------------------------------------------------------------------------------

Case 2: incorrect data stream namespace
connector configs -

{
     "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
     "tasks.max": "1",
     "topics": "test-elasticsearch-sink",
     "key.ignore": "true",
     "connection.url": "*********",
     "connection.username": "********",
     "connection.password": "********",
     "data.stream.namespace": "ssaraswat$-{topic}"
}

result -

12:56:43 🔥 Command failed with error code 400
12:56:43 🔥 Connector configuration is invalid and contains the following 1 error(s):
Invalid value ssaraswat- for configuration data.stream.namespace: The specified namespace must not contain any spaces or invalid characters \/*?"<>|,#-:
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`

Testing done:
  • Unit tests
  • Integration tests
  • System tests
  • Manual tests

Release Plan

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@sonarqube-confluent

This comment has been minimized.

@srishti-saraswat srishti-saraswat marked this pull request as ready for review October 21, 2024 04:57
@srishti-saraswat srishti-saraswat requested a review from a team as a code owner October 21, 2024 04:57
@srishti-saraswat srishti-saraswat changed the base branch from 14.0.x to 10.0.x October 21, 2024 08:03
@srishti-saraswat srishti-saraswat changed the base branch from 10.0.x to 14.0.x October 21, 2024 08:04
@srishti-saraswat srishti-saraswat changed the base branch from 14.0.x to 12.0.x October 21, 2024 08:50
@sonarqube-confluent

This comment has been minimized.

1 similar comment
@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent

This comment has been minimized.

sp-gupta
sp-gupta previously approved these changes Oct 21, 2024
@srishti-saraswat srishti-saraswat changed the base branch from 14.0.x to 12.0.x October 21, 2024 11:39
@srishti-saraswat srishti-saraswat dismissed sp-gupta’s stale review October 21, 2024 11:39

The base branch was changed.

@sonarqube-confluent

This comment has been minimized.

@sonarqube-confluent
Copy link

Failed

  • 70.40% Coverage on New Code (is less than 80.00%)

Analysis Details

4 Issues

  • Bug 0 Bugs
  • Vulnerability 1 Vulnerability
  • Code Smell 3 Code Smells

Coverage and Duplications

  • Coverage 70.40% Coverage (58.40% Estimated after merge)
  • Duplications No duplication information (1.20% Estimated after merge)

Project ID: kafka-connect-elasticsearch

View in SonarQube

@srishti-saraswat srishti-saraswat merged commit fddb620 into 14.0.x Oct 21, 2024
2 checks passed
@srishti-saraswat srishti-saraswat deleted the CC-29637 branch October 21, 2024 13:56
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.

3 participants