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

refactor: moving log parse to core from jinad #1342

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

deepankarm
Copy link
Contributor

No description provided.

@deepankarm deepankarm requested a review from a team as a code owner November 24, 2020 11:05
@jina-bot jina-bot added size/XS area/core This issue/PR affects the core codebase area/network This issue/PR affects network functionality component/peapod labels Nov 24, 2020
@@ -189,6 +189,7 @@ async def wslogs(self, remote_id: 'str', stop_event: Event, current_line: int =
log_line = json.loads(log_line)
current_line = int(list(log_line.keys())[0])
log_line_dict = list(log_line.values())[0]
log_line_dict = json.loads(log_line_dict.split('\t')[-1].strip())
Copy link
Member

Choose a reason for hiding this comment

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

is this safe? can we add a try to default to simply the log_line_dict as it is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've added a json.decoder.JSONDecodeError. Should be safe for now.

@codecov
Copy link

codecov bot commented Nov 24, 2020

Codecov Report

Merging #1342 (45c6dc5) into master (dd94e54) will increase coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1342      +/-   ##
==========================================
+ Coverage   83.35%   83.40%   +0.04%     
==========================================
  Files         101      101              
  Lines        6706     6707       +1     
==========================================
+ Hits         5590     5594       +4     
+ Misses       1116     1113       -3     
Impacted Files Coverage Δ
jina/peapods/jinad.py 54.36% <0.00%> (-0.37%) ⬇️
jina/drivers/querylang/select.py 79.31% <0.00%> (-6.90%) ⬇️
jina/logging/sse.py 95.16% <0.00%> (+3.22%) ⬆️
jina/peapods/grpc_asyncio.py 80.61% <0.00%> (+4.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2de9b3c...45c6dc5. Read the comment docs.

@deepankarm deepankarm merged commit 8d97afa into master Nov 24, 2020
@deepankarm deepankarm deleted the refactor-log-parsing branch November 24, 2020 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/network This issue/PR affects network functionality component/peapod size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants