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(flow): add needs, inspect, version to flow yaml #1442

Merged
merged 11 commits into from Dec 11, 2020

Conversation

hanxiao
Copy link
Member

@hanxiao hanxiao commented Dec 11, 2020

Feature

  • Flow YAML now supports versioning. The current master is considered as version: legacy.
  • Flow YAML now supports needs, inspect as constructor beyond add, they can be specified via method:
!Flow
version: '1.0'
pods:
  - name: pod0  # notice the change here, name is now an attribute
    method: add  # by default method is always add, available: add, needs, inspect
    uses: _pass
    needs: gateway
  - name: pod1  # notice the change here, name is now an attribute
    method: add  # by default method is always add, available: add, needs, inspect
    uses: _pass
    needs: gateway
  - method: inspect  # add an inspect node on pod1
  - method: needs  # let's try something new in Flow YAML v1: needs
    needs: [pod1, pod0]
  • dumper & loader can be specified for each version, see jina.flow.parser for details

@hanxiao hanxiao requested a review from a team as a code owner December 11, 2020 15:30
@jina-bot jina-bot added size/M area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality area/testing This issue/PR affects testing component/flow component/type labels Dec 11, 2020
@hanxiao hanxiao linked an issue Dec 11, 2020 that may be closed by this pull request
jina/flow/__init__.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #1442 (6dabc50) into master (ce5f094) will decrease coverage by 0.04%.
The diff coverage is 82.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1442      +/-   ##
==========================================
- Coverage   81.58%   81.54%   -0.05%     
==========================================
  Files         109      113       +4     
  Lines        6575     6761     +186     
==========================================
+ Hits         5364     5513     +149     
- Misses       1211     1248      +37     
Impacted Files Coverage Δ
jina/peapods/pods/__init__.py 84.00% <ø> (-0.31%) ⬇️
jina/types/sets/document.py 96.47% <ø> (ø)
jina/flow/yaml_parser/legacy.py 52.63% <52.63%> (ø)
jina/flow/yaml_parser/base.py 75.00% <75.00%> (ø)
jina/flow/yaml_parser/__init__.py 96.29% <96.29%> (ø)
jina/excepts.py 100.00% <100.00%> (ø)
jina/flow/yaml_parser/v1.py 100.00% <100.00%> (ø)
jina/clients/python/grpc.py 66.66% <0.00%> (-14.29%) ⬇️
jina/clients/python/runtime.py 78.33% <0.00%> (-8.34%) ⬇️
jina/logging/sse.py 92.64% <0.00%> (-2.52%) ⬇️
... and 34 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 021e099...02775c7. Read the comment docs.

@jina-bot jina-bot added area/network This issue/PR affects network functionality component/peapod labels Dec 11, 2020
@hanxiao hanxiao merged commit ec8d913 into master Dec 11, 2020
@hanxiao hanxiao deleted the feat-flow-version-yaml branch December 11, 2020 18:39
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/helper This issue/PR affects the helper functionality area/network This issue/PR affects network functionality area/testing This issue/PR affects testing component/flow component/peapod component/resource component/type size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

needs & inspect builder pattern are not available in YAML
3 participants