elixir-cloud-aai / tesk-core

Python code that is launched as images into the Kubernetes cluster by tesk-api.
Apache License 2.0
2 stars 13 forks source link

Add support to netrc #15

Closed lvarin closed 4 years ago

lvarin commented 4 years ago

If the environment variable 'NETRC_SECRETNAME' is present, and the content of the secret is a valid netrc file, it will be used for authentication. Otherwise the previous method of FTP* variable will be used for backwards compatibility reasons.

codecov-commenter commented 4 years ago

Codecov Report

Merging #15 into master will increase coverage by 0.53%. The diff coverage is 40.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
+ Coverage   27.55%   28.09%   +0.53%     
==========================================
  Files           8        8              
  Lines         606      630      +24     
==========================================
+ Hits          167      177      +10     
- Misses        439      453      +14     
Impacted Files Coverage Δ
src/tesk_core/filer_class.py 0.00% <0.00%> (ø)
src/tesk_core/taskmaster.py 0.00% <0.00%> (ø)
src/tesk_core/filer.py 38.02% <52.38%> (+0.99%) :arrow_up:

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 acebd70...60110d7. Read the comment docs.

aniewielska commented 4 years ago

This change unfortunately does not work for me. The .netrc file is mounted under the user of taskmaster container (/home/taskmaster), which is not the same for filer (by default filer runs as root). What is more, inability to find a mounted .netrc results in UnboundLocalError: local variable 'user' referenced before assignment

aniewielska commented 4 years ago

I am not sure, if the current version works for you as well. I would appreciate testing it on OpenShift.

lvarin commented 4 years ago

I just came from holidays today. I will check it the current version works in OpenShift.

By the way, thank you for the merge.

lvarin commented 4 years ago

I does not work. Instead of continuing here, I will create a new issue.