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(helper): search file error handling #1353

Merged
merged 1 commit into from
Nov 25, 2020
Merged

fix(helper): search file error handling #1353

merged 1 commit into from
Nov 25, 2020

Conversation

florian-hoenicke
Copy link
Member

When running f = Flow.load_config('flow-index.yml'), I received the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/Library/TeX/texbin/flow-index.yml'
This is because the file flow-index.yml did not exist. However, the error message tells me that the file does not exist in my LaTeX folder, which is weird.
It turned out that the current helper function takes the last path in the PATH variable as default. For sure, this is not intended.
I changed the implementation to fire an exception instead of taking the last path as default.

@jina-bot jina-bot added size/S area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality area/testing This issue/PR affects testing labels Nov 25, 2020
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #1353 (fc845cb) into master (ac38ebf) will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1353      +/-   ##
==========================================
- Coverage   82.87%   82.81%   -0.06%     
==========================================
  Files         103      103              
  Lines        6746     6746              
==========================================
- Hits         5591     5587       -4     
- Misses       1155     1159       +4     
Impacted Files Coverage Δ
jina/logging/sse.py 91.93% <0.00%> (-3.23%) ⬇️
jina/docker/hubio.py 64.85% <0.00%> (-0.86%) ⬇️
jina/peapods/grpc_asyncio.py 76.53% <0.00%> (+1.02%) ⬆️

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 253fd85...90b19ae. Read the comment docs.

@florian-hoenicke florian-hoenicke marked this pull request as ready for review November 25, 2020 16:26
@florian-hoenicke florian-hoenicke requested a review from a team as a code owner November 25, 2020 16:26
@cristianmtr
Copy link
Contributor

But won't this affect performance? Recursively checking all these folders?

@JoanFM
Copy link
Member

JoanFM commented Nov 25, 2020

Performance is not an issue at this stage because this is all working at creation time and spin-up

@hanxiao hanxiao merged commit ed81dd3 into jina-ai:master Nov 25, 2020
@florian-hoenicke florian-hoenicke deleted the fix-helper-file-not-found branch November 26, 2020 10:07
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/helper This issue/PR affects the helper functionality area/testing This issue/PR affects testing size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants