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

feat(jaml): add keyword jtype to represent YAML tag #2044

Merged
merged 3 commits into from Feb 25, 2021
Merged

Conversation

hanxiao
Copy link
Member

@hanxiao hanxiao commented Feb 25, 2021

Content

  • we will be slowly migrating from !YAMLTag to jtype: YAMLTag, this PR is a starting point
  • the rationale behind this is we want to enable JSONSchema (FYI, YAML is a superset of JSON) for IDE-level of validation and autocompletion, as we heavily rely on YAML configs.
  • the current problem is that those customized tags are not compatible to JSONschema, but also creates problem during internal/external-integration. (@BastinJafari on dashboard)
  • in general, we want the maximum compatibility of our YAML file, to get broader support from the Schema ecosystem.

Breaking Changes

  • the old way of {"__cls": "SomeExecutor" } to construct executor from JSON is now replaced by {"jtype": "SomeExecutor"}

Alternatives

Other alternatives to realize this but dropped: https://github.com/jina-ai/jina/blob/refactor-jaml-tag-2/

@hanxiao hanxiao requested a review from a team as a code owner February 25, 2021 07:35
@jina-bot jina-bot added size/M area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing component/jaml labels Feb 25, 2021
@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #2044 (f7c5830) into master (1f4ded9) will decrease coverage by 13.89%.
The diff coverage is 47.50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2044       +/-   ##
===========================================
- Coverage   88.75%   74.86%   -13.90%     
===========================================
  Files         200      181       -19     
  Lines       10933    10373      -560     
===========================================
- Hits         9704     7766     -1938     
- Misses       1229     2607     +1378     
Flag Coverage Δ
daemon ?
jina 74.86% <47.50%> (-14.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/clients/base.py 75.83% <ø> (-5.00%) ⬇️
jina/executors/indexers/keyvalue.py 98.70% <ø> (ø)
jina/flow/base.py 58.26% <ø> (-34.13%) ⬇️
jina/helloworld/chatbot/__init__.py 89.28% <ø> (ø)
jina/helloworld/helper.py 90.62% <ø> (ø)
jina/helloworld/multimodal/__init__.py 90.90% <ø> (ø)
jina/importer.py 95.60% <ø> (+15.18%) ⬆️
jina/logging/logger.py 77.95% <ø> (-4.73%) ⬇️
jina/logging/profile.py 70.07% <ø> (-25.20%) ⬇️
jina/optimizers/__init__.py 0.00% <ø> (-94.40%) ⬇️
... and 125 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6982572...3b9fd81. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 25, 2021

Latency summary

Current PR yields:

  • 😶 index QPS at 997, delta to last 3 avg.: +2%
  • 😶 query QPS at 16, delta to last 3 avg.: -4%

Breakdown

Version Index QPS Query QPS
current 997 16
1.0.4 992 16
1.0.3 945 16

Backed by latency-tracking. Further commits will update this comment.

@hanxiao hanxiao merged commit 070ebde into master Feb 25, 2021
@hanxiao hanxiao deleted the feat-jaml-jtype branch February 25, 2021 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing component/jaml size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants