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

fix: restore port to overload type hint and json schema #5501

Merged
merged 5 commits into from
Dec 7, 2022

Conversation

alaeddine-13
Copy link
Contributor

As multi port and protocol feature was added, the port argument accepts a CastToIntAction.
Parsing arguments depends on knowing which action is attached to the argument.
Therefore, json schema and inject-cli-overload failed to show the port argument.
This PR fixes this issue and makes the port argument detectable when generating json schema and injecting CLI overload.

@@ -7,14 +7,14 @@
| `quiet_error` | If set, then exception stack information will not be added to the log | `boolean` | `False` |
| `timeout_ctrl` | The timeout in milliseconds of the control request, -1 for waiting forever | `number` | `60` |
| `polling` | The polling strategy of the Deployment and its endpoints (when `shards>1`).<br> Can be defined for all endpoints of a Deployment or by endpoint.<br> Define per Deployment:<br> - ANY: only one (whoever is idle) Pod polls the message<br> - ALL: all Pods poll the message (like a broadcast)<br> Define per Endpoint:<br> JSON dict, {endpoint: PollingType}<br> {'/custom': 'ALL', '/search': 'ANY', '*': 'ANY'} | `string` | `ANY` |
| `shards` | The number of shards in the deployment running at the same time. For more details check https://docs.jina.ai/concepts/flow/create-flow/#complex-flow-topologies | `number` | `1` |
| `shards` | The number of shards in the deployment running at the same time. For more details check https://docs.jina.ai/fundamentals/flow/create-flow/#complex-flow-topologies | `number` | `1` |
Copy link
Member

Choose a reason for hiding this comment

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

it shoukd be concepts now

@github-actions github-actions bot added size/L area/cli This issue/PR affects the command line interface area/core This issue/PR affects the core codebase area/docs This issue/PR affects the docs labels Dec 7, 2022
@JoanFM JoanFM closed this Dec 7, 2022
@JoanFM JoanFM reopened this Dec 7, 2022
@github-actions github-actions bot added the size/S label Dec 7, 2022
@github-actions
Copy link

github-actions bot commented Dec 7, 2022

📝 Docs are deployed on https://fix-port-protocol-type-hint--jina-docs.netlify.app 🎉

@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Merging #5501 (2ecfe95) into master (50417a1) will increase coverage by 9.94%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5501      +/-   ##
==========================================
+ Coverage   74.87%   84.81%   +9.94%     
==========================================
  Files          99      101       +2     
  Lines        6678     6724      +46     
==========================================
+ Hits         5000     5703     +703     
+ Misses       1678     1021     -657     
Flag Coverage Δ
jina 84.81% <100.00%> (+9.94%) ⬆️

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

Impacted Files Coverage Δ
jina/parsers/orchestrate/base.py 100.00% <ø> (ø)
jina/parsers/orchestrate/runtimes/worker.py 100.00% <ø> (ø)
jina/orchestrate/flow/base.py 83.87% <100.00%> (+1.48%) ⬆️
jina/serve/runtimes/gateway/composite/gateway.py 33.33% <0.00%> (-66.67%) ⬇️
...a/orchestrate/deployments/config/docker_compose.py 94.60% <0.00%> (-4.42%) ⬇️
jina/jaml/parsers/flow/v1.py 97.01% <0.00%> (-2.99%) ⬇️
jina/orchestrate/deployments/config/k8s.py 99.38% <0.00%> (-0.62%) ⬇️
jina/parsers/helper.py 54.21% <0.00%> (-0.61%) ⬇️
jina/orchestrate/deployments/config/helper.py 94.73% <0.00%> (ø)
jina/resources/health_check/gateway.py 41.17% <0.00%> (ø)
... and 47 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@JoanFM JoanFM merged commit 23a911b into master Dec 7, 2022
@JoanFM JoanFM deleted the fix-port-protocol-type-hint branch December 7, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli This issue/PR affects the command line interface area/core This issue/PR affects the core codebase area/docs This issue/PR affects the docs size/L size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants