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

fix(hubio): when error occurs, exit code should be set to non-zero #2871

Merged
merged 3 commits into from
Jul 9, 2021

Conversation

mapleeit
Copy link
Member

@mapleeit mapleeit commented Jul 7, 2021

Fix that when error occurs, the exit code still be 0. It makes tests confusing and hard to detect whether it's successful or not.

❯ JINA_HUBBLE_REGISTRY=http://localhost:3000 jina hub push case9; echo $?

MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNNNNNNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNNNNNNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMWxxxxxxxxxOMMMMMNxxxxxxxxx0MMMMMKddddddxkKWMMMMMMMMMMMMXOxdddxONMMMM
MMMMMMMMMMMMXllllllllldMMMMM0lllllllllxMMMMMOllllllllllo0MMMMMMMM0olllllllllo0MM
MMMMMMMMMMMMXllllllllldMMMMM0lllllllllxMMMMMOlllllllllllloWMMMMMdllllllllllllldM
MMMMMMMMMMMMXllllllllldMMMMM0lllllllllxMMMMMOllllllllllllloMMMM0lllllllllllllllK
MMMMMMMMMMMMKllllllllldMMMMM0lllllllllxMMMMMOllllllllllllllKMMM0lllllllllllllllO
MMMMMMMMMMMMKllllllllldMMMMM0lllllllllxMMMMMOllllllllllllll0MMMMollllllllllllllO
MWOkkkkk0MMMKlllllllllkMMMMM0lllllllllxMMMMMOllllllllllllll0MMMMMxlllllllllllllO
NkkkkkkkkkMMKlllllllloMMMMMM0lllllllllxMMMMMOllllllllllllll0MMMMMMWOdolllllllllO
KkkkkkkkkkNMKllllllldMMMMMMMMWWWWWWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MOkkkkkkk0MMKllllldXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMWX00KXMMMMXxk0XMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

▶️  /Users/miaozhaofeng/.pyenv/versions/3.9.5/bin/jina hub push case9
🔧️                            cli = hub
                            force = None
🔧️                            hub = push
🔧️                       no-usage = False
🔧️                           path = case9
                           secret = None

          HubIO@3649[E]:Error while pushing session_id=3443c17e-deef-11eb-86e5-1e00d92e5291:
Exception('Unknown Error')
0

@mapleeit mapleeit requested review from hanxiao and numb3r3 July 7, 2021 06:51
@mapleeit mapleeit requested a review from a team as a code owner July 7, 2021 06:51
@jina-bot jina-bot added size/XS area/core This issue/PR affects the core codebase labels Jul 7, 2021
@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #2871 (d613a78) into master (0094bbf) will increase coverage by 6.60%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2871      +/-   ##
==========================================
+ Coverage   82.21%   88.82%   +6.60%     
==========================================
  Files         106      138      +32     
  Lines        7064     9515    +2451     
==========================================
+ Hits         5808     8452    +2644     
+ Misses       1256     1063     -193     
Flag Coverage Δ
daemon 43.40% <ø> (?)
jina 88.77% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/__init__.py 71.64% <ø> (ø)
jina/checker.py 96.55% <ø> (ø)
jina/clients/__init__.py 100.00% <ø> (ø)
jina/clients/base/__init__.py 90.90% <ø> (ø)
jina/clients/base/grpc.py 63.82% <ø> (ø)
jina/clients/base/http.py 93.18% <ø> (ø)
jina/clients/base/websocket.py 86.36% <ø> (ø)
jina/clients/grpc.py 100.00% <ø> (ø)
jina/clients/helper.py 100.00% <ø> (ø)
jina/clients/http.py 100.00% <ø> (ø)
... and 215 more

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 14cbb0d...d613a78. Read the comment docs.

Copy link
Member

@hanxiao hanxiao left a comment

Choose a reason for hiding this comment

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

hub test is broken

@jina-bot jina-bot added size/L area/entrypoint This issue/PR affects the entrypoint codebase area/helper This issue/PR affects the helper functionality area/network This issue/PR affects network functionality area/setup This issue/PR affects setting up Jina area/testing This issue/PR affects testing component/peapod component/resource component/type and removed size/XS labels Jul 8, 2021
@jina-bot jina-bot added size/S and removed size/L labels Jul 8, 2021
@mapleeit mapleeit requested a review from hanxiao July 8, 2021 04:56
@github-actions
Copy link

github-actions bot commented Jul 9, 2021

Latency summary

Current PR yields:

  • 😶 index QPS at 1345, delta to last 1 avg.: -2%
  • 😶 query QPS at 24, delta to last 1 avg.: -5%
  • 😶 import jina within 0.2558s, delta to last 1 avg.: +1%

Breakdown

Version Index QPS Query QPS Import Time (s)
current 1345 24 0.2558
2.0.4 1379 25 0.2515

Backed by latency-tracking. Further commits will update this comment.

@mapleeit
Copy link
Member Author

mapleeit commented Jul 9, 2021

Ready to be reviewed again. @hanxiao @numb3r3

Copy link
Member

@hanxiao hanxiao left a comment

Choose a reason for hiding this comment

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

just to clarify, this line assumes that push is always used under CLI, and it will invalidate the usage from other Python functions.

@hanxiao hanxiao merged commit a55432d into master Jul 9, 2021
@hanxiao hanxiao deleted the fix-hubble-exit-code branch July 9, 2021 09:10
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/entrypoint This issue/PR affects the entrypoint codebase area/helper This issue/PR affects the helper functionality area/network This issue/PR affects network functionality area/setup This issue/PR affects setting up Jina area/testing This issue/PR affects testing component/peapod component/resource component/type size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants