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: test for hubio test build #1609

Merged
merged 2 commits into from
Jan 7, 2021
Merged

fix: test for hubio test build #1609

merged 2 commits into from
Jan 7, 2021

Conversation

rutujasurve94
Copy link
Contributor

@rutujasurve94 rutujasurve94 commented Jan 6, 2021

Fix for #1575 using docker image object instead of string argument for test_build in hubio

@rutujasurve94 rutujasurve94 requested a review from a team as a code owner January 6, 2021 12:12
@rutujasurve94 rutujasurve94 marked this pull request as draft January 6, 2021 12:12
@jina-bot jina-bot added size/S area/testing This issue/PR affects testing labels Jan 6, 2021
@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #1609 (49d1a00) into master (7200c65) will increase coverage by 0.90%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1609      +/-   ##
==========================================
+ Coverage   83.98%   84.89%   +0.90%     
==========================================
  Files         127      127              
  Lines        6652     6642      -10     
==========================================
+ Hits         5587     5639      +52     
+ Misses       1065     1003      -62     
Impacted Files Coverage Δ
jina/types/document/multimodal.py 98.00% <100.00%> (+0.08%) ⬆️
jina/types/document/uid.py 84.61% <100.00%> (+3.36%) ⬆️
jina/docker/hubapi.py 86.16% <0.00%> (+10.06%) ⬆️
jina/docker/hubio.py 73.59% <0.00%> (+10.26%) ⬆️

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 dfe3033...1b69a9a. Read the comment docs.


def test_hub_build_level_pass(monkeypatch, mock_load_config):

monkeypatch.setattr(BaseExecutor, "load_config", mock_load_config)
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mock do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the mock to use an actual test-yaml file for the BaseExecutor as discussed.

args = set_hub_build_parser().parse_args(['path/hub-mwu', '--push', '--host-info', '--test-level', 'EXECUTOR'])

docker_image = cli.get_image('jinahub/pod.dummy_mwu_encoder')
p_names, failed_levels = HubIO._test_build(docker_image, BuildTestLevel.EXECUTOR, "sample/yaml.yaml", 60, True)
Copy link
Contributor

Choose a reason for hiding this comment

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

In what case, does a user send an image object?
Should this remain an str and inside the _test_build we do the pull/build? @JoanFM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an image object as per our recent discussion

@rutujasurve94 rutujasurve94 marked this pull request as ready for review January 7, 2021 09:40
@github-actions
Copy link

github-actions bot commented Jan 7, 2021

Latency summary

Current PR yields:

  • 😶 index QPS at 2002, delta to last 3 avg.: -1%
  • 😶 query QPS at 37, delta to last 3 avg.: +0%

Breakdown

Version Index QPS Query QPS
current 2002 37
0.9.2 2052 36
0.9.1 2006 37
0.8.22 2056 37

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

Copy link
Member

@nan-wang nan-wang left a comment

Choose a reason for hiding this comment

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

LGTM👍

@nan-wang nan-wang merged commit 80d8c36 into master Jan 7, 2021
@nan-wang nan-wang deleted the test-build-fix branch January 7, 2021 12:49
@nan-wang nan-wang linked an issue Jan 7, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing This issue/PR affects testing size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PR#1361 test is misleading, reverting
4 participants