I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Closing #795
After this PR, generating key/cert through pyvespa will be deprecated. (This has been warned as deprecation previously).
If vespa CLI is installed (either through pip or other method), this will be used to generate key/cert if none is found in the default locations. If none is found and vespa CLI is not installed, user will be prompted to install using pip.
This became a bit involved, but took the opportunity to improve a few things regarding auth and prod_deployment as well.
Add methods to set application, set target and generate cert with vespacli
Use this method when auth files are not detected (instead of generating with pyvespa as it was before) in VespaDeployment()._load_certificate_pair()
Remove references to pyvespa-generated private_cert.txt
Refactor retry in deploy_to_prod()
Refactor auth to a common method - Vespa()._get_valid_auth_method()
Use this method upon initialization of VespaSync and VespaAsync
Add decorator run_with_max_time- to more easily handle timeouts for functions that have many subcalls.
Support pip install pyvespa[vespacli] in pyproject.toml.
Next step will be to update notebooks and docs with simplified approach, ref #795 description.
As docs are updated independent of release, we should release a new version when docs are published.
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Closing #795
After this PR, generating key/cert through pyvespa will be deprecated. (This has been warned as deprecation previously). If vespa CLI is installed (either through pip or other method), this will be used to generate key/cert if none is found in the default locations. If none is found and vespa CLI is not installed, user will be prompted to install using pip.
This became a bit involved, but took the opportunity to improve a few things regarding auth and prod_deployment as well.
vespacli
VespaDeployment()._load_certificate_pair()
private_cert.txt
deploy_to_prod()
Vespa()._get_valid_auth_method()
VespaSync
andVespaAsync
run_with_max_time
- to more easily handle timeouts for functions that have many subcalls.pip install pyvespa[vespacli]
inpyproject.toml
.Next step will be to update notebooks and docs with simplified approach, ref #795 description. As docs are updated independent of release, we should release a new version when docs are published.