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

Added helmchart variable to operator to be able to set a default "global" request logging prefix #1517

Conversation

axsaucedo
Copy link
Contributor

@axsaucedo axsaucedo commented Mar 7, 2020

Fixes #1510

This PR includes:

  • Added extra env variable to executor to add a default request logging prefix
  • Added changes in executor to use this as default variable
  • Default env var is cached in executor code with variable to avoid accessing getenv for efficiency
  • Helmchart resources python file also has the extra env variable for helmchart generation
  • Helmchart resources python file was edited by formatter (hence why all file is updated)

Things to consider:

  • Currently it allows for the prefix to be overriden, which still assumes that there will be one request logger per namespace. If we think it's best to make it a REQUEST_LOGGER_ENDPOINT instead of REQUEST_LOGGER_ENDPOINT_PREFIX then we'd just need to make sure it reflects this.
  • Currently the changes made the ENV variable to be optional as there is a "default" value in executor/logger/constants.go, however if we add this value as the default when the executor container is being created in the operator we would be abel to have that default there instead.

Further questions:

  • Currently the way to enable request logging needs to be set on every deployment, for every predictor. It could also be possible to enable request logging on a global level, with the ability to enable/disable on a per-deployment level. If this is something desirable, then we would look at adding another variable and ensuring that it's checked in the executor's predictor_process Predict method.

@axsaucedo axsaucedo requested a review from ukclivecox March 7, 2020 11:48
REmoved previous edits of types
@seldondev
Copy link
Collaborator

Sat Mar 7 11:49:38 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-1517/2.log

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

@seldondev
Copy link
Collaborator

Sat Mar 7 11:49:38 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-1517/1.log

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

@seldondev
Copy link
Collaborator

Sat Mar 7 11:50:39 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-1517/3.log

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

@seldondev
Copy link
Collaborator

Sat Mar 7 11:50:46 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-1517/4.log

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

@seldondev
Copy link
Collaborator

Sat Mar 7 11:59:18 UTC 2020
The logs for [lint] [6] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1517/6.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1517 --build=6

@seldondev
Copy link
Collaborator

Sat Mar 7 11:59:40 UTC 2020
The logs for [pr-build] [5] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1517/5.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1517 --build=5

@axsaucedo
Copy link
Contributor Author

Questions to consider:

  • Currently the way to enable request logging needs to be set on every deployment, for every predictor. It could also be possible to enable request logging on a global level, with the ability to enable/disable on a per-deployment level. If this is something desirable, then we would look at adding another variable and ensuring that it's checked in the executor's predictor_process Predict method.

@axsaucedo
Copy link
Contributor Author

Another thing to consider:
Currently it allows for the prefix to be overriden, which still assumes that there will be one request logger per namespace. If we think it's best to make it a REQUEST_LOGGER_ENDPOINT instead of REQUEST_LOGGER_ENDPOINT_PREFIX then we'd just need to make sure it reflects this.

@ryandawsonuk
Copy link
Contributor

Just thinking about the use an env var. I realise I suggested this but executor actually tends to use startup parameters instead.

Just a detail though. I think we should look to get something in and refine later.

@axsaucedo
Copy link
Contributor Author

No, that's definitely a good point. I think from a design perspective using parameters would be cleaner, but there wasn't any obvious way of adding it without some bigger changes. If you think we should do it in a different way, we could add it through the param and have the default URL as part of the PredictorProcess class, or alternatively we could have it as an env variable for now/initially and explore the best way to manage the config.

@ryandawsonuk
Copy link
Contributor

I take it with this change we'd only need to set the env var at operator install time and then on each SeldonDeployment we'd turn on logging with e.g.

      logger:
        mode: all

@axsaucedo
Copy link
Contributor Author

@ryandawsonuk that is correct - I was thinking that it may be good to add that as a default, but that could be something as a follow-up

@axsaucedo
Copy link
Contributor Author

/test integration

@seldondev
Copy link
Collaborator

Mon Mar 9 13:53:50 UTC 2020
The logs for [integration] [7] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1517/7.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1517 --build=7

Copy link
Contributor

@ryandawsonuk ryandawsonuk left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ryandawsonuk

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

@axsaucedo: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
integration 4702272 link /test integration

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@seldondev
Copy link
Collaborator

New changes are detected. LGTM label has been removed.

@seldondev seldondev removed the lgtm label Mar 9, 2020
@seldondev
Copy link
Collaborator

Mon Mar 9 19:37:57 UTC 2020
The logs for [pr-build] [8] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1517/8.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1517 --build=8

@seldondev
Copy link
Collaborator

Mon Mar 9 19:37:57 UTC 2020
The logs for [lint] [9] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1517/9.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1517 --build=9

@seldondev seldondev merged commit 9ff9647 into SeldonIO:master Mar 9, 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.

Add top level registry prefix to Helm Charts for custom registries
3 participants