Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

feat: logs added for es8 index - #1551

Merged
samsja merged 6 commits into
docarray:mainfrom
agaraman0:feat-esindex-logs
May 23, 2023
Merged

samsja merged 6 commits into
docarray:mainfrom
agaraman0:feat-esindex-logs

Conversation

@aman-exp-infy

@aman-exp-infy aman-exp-infy commented May 17, 2023 •

Copy link
Copy Markdown
Contributor

Adding logs sequentially for all indexes in docarray according to issue

agaraman0 added 2 commits May 17, 2023 20:30
Signed-off-by: agaraman0 <agaraman0@gmail.com>
Signed-off-by: agaraman0 <agaraman0@gmail.com>
@agaraman0
agaraman0 deleted the feat-esindex-logs branch May 18, 2023 06:47
@agaraman0
agaraman0 restored the feat-esindex-logs branch May 18, 2023 06:49
@agaraman0

Copy link
Copy Markdown
Contributor

Hey @samsja I have tried to debug the failed test case but have not been able to figure it out as I have just added logs here.

@samsja

samsja commented May 22, 2023

Copy link
Copy Markdown
Member

these tests are failing because it needs to access a token in the docarray org but because you are opening a PR trough your fork you don't have access.

Basically don't worry we will merge even if it fails

@samsja

samsja commented May 22, 2023

Copy link
Copy Markdown
Member

I will review asap btw

Comment thread docarray/index/backends/elastic.py Outdated
agaraman0 added 2 commits May 22, 2023 14:53
Signed-off-by: agaraman0 <agaraman0@gmail.com>
Signed-off-by: agaraman0 <agaraman0@gmail.com>

@samsja samsja left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets not log inside private function

Comment thread docarray/index/backends/elastic.py Outdated
Signed-off-by: agaraman0 <agaraman0@gmail.com>
Comment thread docarray/index/backends/elastic.py Outdated
Comment on lines +132 to +137
self._logger.error(
'A ElasticDocIndex must be typed with a Document type.'
'To do so, use the syntax: ElasticDocIndex[DocumentType]'
)

return self._db_config.index_name or default_index_name
raise ValueError
index_name = self._db_config.index_name or default_index_name

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can do smth like

error_msg = 'A ElasticDocIndex must be typed with a Document type.'
'To do so, use the syntax: ElasticDocIndex[DocumentType]'

self._logger.error(error_msg)
raise ValueError(error_msg)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

oh okay.

Signed-off-by: agaraman0 <agaraman0@gmail.com>
@samsja
samsja merged commit 8651e6e into docarray:main May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants