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

Expose more boolean Flask Configurations via FLASK_ prefix #2280

Conversation

ericandrewmeadows
Copy link
Contributor

What this PR does / why we need it:
When failures occur, it is useful to expose where Exceptions are occurring. By default, you just get a 500 HTTP Status code, and no details on the line of the failure.

Which issue(s) this PR fixes:

Fixes #
No issue filed

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Exposes the ability to set the PROPAGATE_EXCEPTIONS for the Flask Python Wrapper, allowing for better debugging when interacting with models that use additional functions in their class declaration.

@seldondev
Copy link
Collaborator

Hi @ericandrewmeadows. Thanks for your PR.

I'm waiting for a SeldonIO member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

@seldondev seldondev added size/L and removed size/M labels Aug 14, 2020
@seldondev seldondev added size/M and removed size/L labels Aug 14, 2020
@ericandrewmeadows ericandrewmeadows changed the title Expose PROPAGATE_EXCEPTIONS for Flask Expose more boolean Flask Configurations via FLASK_ prefix Aug 14, 2020
@ericandrewmeadows
Copy link
Contributor Author

Minor request - can Prettier be used for formatting Markdown files?

@adriangonz
Copy link
Contributor

/cc @RafalSkolasinski @adriangonz

Copy link
Contributor

@adriangonz adriangonz left a comment

Choose a reason for hiding this comment

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

Hey @ericandrewmeadows,

Thanks a lot for your contribution! I think this is definitely a great start and something needed. I've added a few minor comments, but I like the overall intention of the PR.

Regarding prettier, it would be good to raise it in today's community call to gather everyone else's thoughts.

python/seldon_core/wrapper.py Outdated Show resolved Hide resolved
"USE_X_SENDFILE",
]

for env_var, value in os.environ.items():
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are iterating over a list of allowed variables, would it be possible to iterate over those instead of os.environ.items()?

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 fair.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original design here was to allow users to set any flask configs they would like, and if they tried to set an unsupported one, it would be called out in the logs.

python/seldon_core/wrapper.py Outdated Show resolved Hide resolved
@adriangonz
Copy link
Contributor

/approve

Thanks for adding those changes in @ericandrewmeadows! I think this looks good to go now.

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriangonz

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

@axsaucedo
Copy link
Contributor

/ok-to-test

@seldondev
Copy link
Collaborator

Fri Sep 4 12:20:06 UTC 2020
The logs for [lint] [2] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2280/2.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2280 --build=2

@seldondev
Copy link
Collaborator

Fri Sep 4 12:20:28 UTC 2020
The logs for [pr-build] [1] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2280/1.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2280 --build=1

@seldondev
Copy link
Collaborator

Fri Sep 4 12:40:41 UTC 2020
The logs for [pr-build] [3] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2280/3.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2280 --build=3

@seldondev
Copy link
Collaborator

Fri Sep 4 12:40:49 UTC 2020
The logs for [lint] [4] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2280/4.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2280 --build=4

@adriangonz adriangonz merged commit 49aabe4 into SeldonIO:master Sep 7, 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.

None yet

4 participants