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: list-like args passed as string #5464

Merged
merged 95 commits into from
Dec 14, 2022
Merged

fix: list-like args passed as string #5464

merged 95 commits into from
Dec 14, 2022

Conversation

AnneYang720
Copy link
Contributor

@AnneYang720 AnneYang720 commented Nov 29, 2022

Goals:

  • resolves bug: list-like args passed as string #5352

  • parser can receive single value, str with "," and list of str

  • Flow can reveice list of values

  • Deployment can accept list of values + remove parsing logic

  • add tests

  • check and update documentation. See guide and ask the team.

@github-actions github-actions bot added size/S area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing labels Nov 29, 2022
Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

Make sure to check documentation

@JoanFM JoanFM closed this Nov 29, 2022
@JoanFM JoanFM reopened this Nov 29, 2022
@github-actions github-actions bot added the area/docs This issue/PR affects the docs label Nov 29, 2022
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #5464 (b32b73e) into master (a5b9df5) will decrease coverage by 0.00%.
The diff coverage is 93.42%.

@@            Coverage Diff             @@
##           master    #5464      +/-   ##
==========================================
- Coverage   87.53%   87.52%   -0.01%     
==========================================
  Files         121      121              
  Lines        9648     9645       -3     
==========================================
- Hits         8445     8442       -3     
  Misses       1203     1203              
Flag Coverage Δ
jina 87.52% <93.42%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
jina/clients/__init__.py 96.87% <ø> (ø)
jina/orchestrate/flow/base.py 90.02% <ø> (-0.05%) ⬇️
jina/orchestrate/pods/factory.py 100.00% <ø> (ø)
jina/parsers/orchestrate/pod.py 100.00% <ø> (ø)
jina/serve/executors/__init__.py 89.21% <ø> (ø)
jina/serve/runtimes/head/__init__.py 97.74% <ø> (ø)
jina/helper.py 80.91% <71.42%> (-0.33%) ⬇️
jina/orchestrate/deployments/__init__.py 91.55% <94.11%> (+0.62%) ⬆️
...a/orchestrate/deployments/config/docker_compose.py 99.03% <100.00%> (+0.01%) ⬆️
jina/orchestrate/deployments/config/k8s.py 100.00% <100.00%> (ø)
... and 5 more

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

Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

Something seems wrong, many args seem to have disappeared

jina/parsers/helper.py Show resolved Hide resolved
@github-actions github-actions bot added size/M area/helper This issue/PR affects the helper functionality labels Nov 30, 2022
@AnneYang720 AnneYang720 marked this pull request as draft November 30, 2022 04:58
docs/concepts/flow/executor-args.md Show resolved Hide resolved
jina/orchestrate/deployments/__init__.py Outdated Show resolved Hide resolved
jina/parsers/helper.py Show resolved Hide resolved
Comment on lines +27 to +29
# set_pod_parser returns a parser for worker runtime, which expects list of ports (because external executors
# can provide multiple ports and hosts). However this parser is not compatible with ContainerPod, Pod and worker runtime.
# Should we add a seperate parser for Pod?
Copy link
Contributor

Choose a reason for hiding this comment

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

@JoanFM you might need to check this
In my opinion, this is fine for now. We don't expect people to use the pod parser on the Worker runtime or Pod anyways

Copy link
Member

Choose a reason for hiding this comment

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

what does it mean is not compatible wirh ContainerPod why not?

Copy link
Contributor

Choose a reason for hiding this comment

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

because set_pod_parser generates args where port and host are lists.
This works fine with Flow and Deployment.
In the deployment layer, the lists are transformed to single values (for each shard and replica). The Pod and Worker runtime therefore expect single values. That's why, set_pod_parser cannot be used with Pod and worker runtime

tests/integration/deployments/test_deployment.py Outdated Show resolved Hide resolved
tests/integration/deployments/test_deployment.py Outdated Show resolved Hide resolved
@JoanFM
Copy link
Member

JoanFM commented Dec 13, 2022

@alaeddine-13 @AnneYang720 please review test not workinf

@AnneYang720 AnneYang720 reopened this Dec 14, 2022
@github-actions
Copy link

📝 Docs are deployed on https://fix-list-args--jina-docs.netlify.app 🎉

Copy link
Member

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

I only have one doubt in the code. LGTM otherwise @alaeddine-13 @AnneYang720

@@ -318,19 +323,6 @@ def update_pod_args(self):
else:
self.pod_args = self._parse_args(self.args)

if self.external:
Copy link
Member

Choose a reason for hiding this comment

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

why is this logic not needed anymore?

Copy link
Contributor

Choose a reason for hiding this comment

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

we decided to move it here, so that all setting logic is in one place
image

Copy link
Member

Choose a reason for hiding this comment

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

okey perfect

@JoanFM JoanFM merged commit 87912a3 into master Dec 14, 2022
@JoanFM JoanFM deleted the fix-list-args branch December 14, 2022 10:26
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 area/helper This issue/PR affects the helper functionality area/testing This issue/PR affects testing component/client size/L size/M size/S size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: list-like args passed as string
4 participants