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

EXPERIMENTAL[grpc]: synonymous configuration fields #2980

Closed
wants to merge 2 commits into from

Conversation

aarnphm
Copy link
Member

@aarnphm aarnphm commented Sep 12, 2022

Address #2986

This PR address some tests followup as well as some configuration refactor to be consistent with correct exporter field

This PR will also introduce tests related to gRPC tracing interceptor

Depends on #2808 and will rebase to main once #2808 is merged.

@pep8speaks
Copy link

pep8speaks commented Sep 12, 2022

Hello @aarnphm, Thanks for updating this PR.

There are currently no PEP 8 issues detected in this PR. Cheers! 🍻

Comment last updated at 2022-09-13 11:54:03 UTC

@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Merging #2980 (df37888) into main (926b613) will decrease coverage by 0.01%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2980      +/-   ##
==========================================
- Coverage   67.96%   67.94%   -0.02%     
==========================================
  Files         113      113              
  Lines       10887    10919      +32     
  Branches     1908     1947      +39     
==========================================
+ Hits         7399     7419      +20     
- Misses       3047     3062      +15     
+ Partials      441      438       -3     
Impacted Files Coverage Δ
bentoml/_internal/configuration/containers.py 74.21% <63.63%> (+1.77%) ⬆️
bentoml/grpc/interceptors/access.py 93.02% <0.00%> (-2.33%) ⬇️
bentoml/grpc/interceptors/prometheus.py 94.23% <0.00%> (-1.93%) ⬇️
bentoml/grpc/interceptors/opentelemetry.py 76.11% <0.00%> (-1.50%) ⬇️
bentoml/_internal/utils/analytics/usage_stats.py 94.62% <0.00%> (-1.08%) ⬇️
bentoml/_internal/utils/__init__.py 67.28% <0.00%> (-0.75%) ⬇️
bentoml/_internal/service/loader.py 72.59% <0.00%> (-0.75%) ⬇️
bentoml/_internal/utils/telemetry.py 84.00% <0.00%> (-0.62%) ⬇️
bentoml/_internal/bento/pip_pkg.py 0.00% <0.00%> (ø)
bentoml/_internal/utils/benchmark.py 0.00% <0.00%> (ø)
... and 3 more

@aarnphm aarnphm force-pushed the refactor/configuration branch 2 times, most recently from e11f81c to 6b2d765 Compare September 12, 2022 21:52
@aarnphm aarnphm changed the title refactor: synonymous configuration fields [DEPENDS ON #2808] EXPERIMENTAL[grpc]: synonymous configuration fields Sep 12, 2022
@aarnphm aarnphm changed the base branch from main to grpc September 12, 2022 21:57
@aarnphm aarnphm marked this pull request as ready for review September 12, 2022 21:57
@aarnphm aarnphm requested a review from a team as a code owner September 12, 2022 21:57
@aarnphm aarnphm requested review from ssheng and removed request for a team September 12, 2022 21:57
@aarnphm aarnphm force-pushed the refactor/configuration branch 2 times, most recently from 2d1b5a5 to 5772b59 Compare September 12, 2022 22:03
@aarnphm aarnphm mentioned this pull request Sep 12, 2022
3 tasks
# - tracing.jaeger.* -> tracing.jaeger.http.*
# - add tracing.jaeger.grpc.* with default values
# TODO: follow up versioning and deprecation generation.
v1_to_v2_migration(config_merger, override_config)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should only call this if there's no version specified, i.e. it's a v1 config.

We need to figure out some way to enforce people to version their configs though.

Copy link
Member Author

@aarnphm aarnphm Sep 12, 2022

Choose a reason for hiding this comment

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

I was thinking to have a version field

version: v1
...

if no version is specified, then we default that to v1

for key in ["cors", "max_request_size", "host", "port"]
)
# tracing compat
if "tracing" in override_config:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a utility function rename_field might be useful? e.g. rename_field(config, "zipkin.url", "zipkin.endpoint") or something? I think it would make this easier to read.

Copy link
Member Author

Choose a reason for hiding this comment

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

sg.

aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 17, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 17, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 18, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 18, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 18, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 18, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 18, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 18, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 19, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 20, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 20, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 20, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 20, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 20, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 20, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 21, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 27, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 27, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 27, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
aarnphm added a commit to aarnphm/BentoML that referenced this pull request Sep 28, 2022
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
enable tracing tests for grpc

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
@aarnphm aarnphm closed this Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants