-
Notifications
You must be signed in to change notification settings - Fork 143
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
Create a new content index if it doesn't exist #1668
Conversation
connectors/es/sink.py
Outdated
else: | ||
raise IndexMissing(f"Index {index} does not exist!") | ||
self._logger.debug("Index %s already has mappings. Skipping...", index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you mentioned
https://github.com/elastic/connectors-python/blob/6b700bcdbc80e0344dc4b809db9491657df0e3fa/connectors/es/sink.py#L670
Do you want to handle mapping changes here? In normal cases, the index should be created by either Kibana or Connector service. If we find a discrepancy, should we 1) create a new index with the correct mapping or 2) raise an error or 3) simply log a warning message and continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question:
If the connector can't apply mappings to the index it should fail immediately. This can already happen, see this issue.
I guess it would be nice to handle it and pass a human-readable error. Is this what you also meant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a couple suggestions for log lines.
I personally find log lines ending with "..." suitable only for lines that imply some lengthy process after, e.g:
Creating something...
Created!
Co-authored-by: Artem Shelkovnikov <[email protected]>
Co-authored-by: Artem Shelkovnikov <[email protected]>
Co-authored-by: Artem Shelkovnikov <[email protected]>
c408d85
to
d66c589
Compare
💔 Failed to create backport PR(s)The backport operation could not be completed due to the following error: The backport PRs will be merged automatically after passing CI. To backport manually run: |
This PR brings back the original functionality that creates content indices.
This handles a use-case when customers use Connectors without Kibana.
Checklists
Pre-Review Checklist
v7.13.2
,v7.14.0
,v8.0.0
)