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

Make Azure dependency optional #2170

Merged
merged 6 commits into from
Jul 21, 2020

Conversation

adriangonz
Copy link
Contributor

What this PR does / why we need it:
Make dependency on Azure optional. It can still be installed as:

pip install seldon-core[azure]

Which issue(s) this PR fixes:

Fixes #2168

Special notes for your reviewer:
Since we leverage KFServing's model initialiser image (which does contain Azure's lib), this shouldn't impact most users.

Does this PR introduce a user-facing change?:

Changed Azure dependency to be optional.

@seldondev
Copy link
Collaborator

STARTING TEST [ lint # 2 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/2.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=2

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 1 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/1.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=1

@seldondev
Copy link
Collaborator

SUCCESS [lint # 2] TEST PASSED ✅

Well done! 😎

@seldondev
Copy link
Collaborator

SUCCESS [pr-build # 1] TEST PASSED ✅

Well done! 😎

@adriangonz
Copy link
Contributor Author

/test integration
/test notebooks

@seldondev
Copy link
Collaborator

STARTING TEST [ integration # 4 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/4.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=4

@adriangonz
Copy link
Contributor Author

/cc @RafalSkolasinski @axsaucedo

@seldondev
Copy link
Collaborator

STARTING TEST [ notebooks # 3 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/3.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=3

jenkins-x.yml Outdated
- update_package
- install_dev
- test
- TOX_TEST=azure
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

Comment on lines 30 to +35
if _GCS_PRESENT:
from google.auth import exceptions
from google.cloud import storage

if _AZURE_PRESENT:
from azure.storage.blob import BlockBlobService
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wonder, we make these imports dependent on the library presence but we don't check bellow when they are used.

Could it lead to some obscure undefined name errors?
Would it be good idea to check bellow for values of _GCS_PRESENT / _AZURE_PRESENT.

I guess it's because we do not want to modify storage.py as we gonna drop our copy of it and use upstream soon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's the main reason. To keep these changes simple.

We do print a log message already if Azure or any of the other optional dependencies are not there, which is handled here:

https://github.com/adriangonz/seldon-core/blob/0095ba5a39e98caff2b86c2a3f7cec422279d1c4/python/seldon_core/imports_helper.py#L65-L84

I also imagine that the logic to check the value of _AZURE_PRESENT inside Storage.py could be a bit more nuanced. For example, what happens if we try to use it but it's not there, should we just raise an exception or fail silently?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... If it fail silenty it'd mean it didn't download required files so we will get errors somewhere else that may be harder to debug.

Right now it will raise NameError (I guess) -> the only better suggestion I could have would be to raise some custom DependencyError with more informant error message.

Anyway, that would be only potential improvement and as current logic was already present for _GCS_PRESENT it shouldn't stop this from being merged.

@seldondev
Copy link
Collaborator

SUCCESS [notebooks # 3] TEST PASSED ✅

Well done! 😎

@axsaucedo
Copy link
Contributor

/test this

1 similar comment
@axsaucedo
Copy link
Contributor

/test this

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 5 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/5.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=5

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 6 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/6.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=6

@axsaucedo
Copy link
Contributor

/test this

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 7 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/7.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=7

@axsaucedo
Copy link
Contributor

/test this

1 similar comment
@axsaucedo
Copy link
Contributor

/test this

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 8 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/8.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=8

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 9 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/9.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=9

@axsaucedo
Copy link
Contributor

/test this

@axsaucedo
Copy link
Contributor

/test this

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 11 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/11.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=11

@seldondev
Copy link
Collaborator

STARTING TEST [ pr-build # 10 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/10.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=10

@adriangonz
Copy link
Contributor Author

/retest

@seldondev
Copy link
Collaborator

STARTING TEST [ integration # 12 ]

Logs will be available when test completes in the following link:
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/12.log

Impatient try:
jx get build logs SeldonIO/seldon-core/PR-2170 --build=12

@seldondev
Copy link
Collaborator

SUCCESS [integration # 12] TEST PASSED ✅

Well done! 😎

@axsaucedo
Copy link
Contributor

axsaucedo commented Jul 21, 2020

Looks good to go @adriangonz , probably just needs updating the jenkins-x merge conflicts

@axsaucedo
Copy link
Contributor

Seems it may be simple enough to do it on the UI ^

@axsaucedo
Copy link
Contributor

Just added ^
/approve

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: axsaucedo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@seldondev
Copy link
Collaborator

Tue Jul 21 14:48:12 UTC 2020
The logs for [lint] [14] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/14.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2170 --build=14

@seldondev
Copy link
Collaborator

Tue Jul 21 14:48:14 UTC 2020
The logs for [pr-build] [13] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/13.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2170 --build=13

@seldondev
Copy link
Collaborator

Tue Jul 21 15:20:51 UTC 2020
The logs for [pr-build] [15] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/15.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2170 --build=15

@seldondev
Copy link
Collaborator

Tue Jul 21 15:20:57 UTC 2020
The logs for [lint] [16] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/16.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2170 --build=16

@seldondev
Copy link
Collaborator

Tue Jul 21 17:15:34 UTC 2020
The logs for [lint] [18] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/18.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2170 --build=18

@seldondev
Copy link
Collaborator

Tue Jul 21 17:15:35 UTC 2020
The logs for [pr-build] [17] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2170/17.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2170 --build=17

@axsaucedo axsaucedo merged commit ec69741 into SeldonIO:master Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Azure dependency optional
4 participants