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

Add API to get domain #5443

Merged
merged 11 commits into from
Jun 20, 2024
Merged

Add API to get domain #5443

merged 11 commits into from
Jun 20, 2024

Conversation

zychen5186
Copy link
Contributor

@zychen5186 zychen5186 commented Jun 1, 2024

Why are the changes needed?

  1. While integrating interactive CLI into flytectl, I would need to allow users to select the domain for the project in commands like flytectl get execution.

What changes were proposed in this pull request?

  1. Add GetDomains API in flyteidl
  2. Server GetDomains implementation in flyteadmin,
  3. Client GetDomains implementation in flytectl

How was this patch tested?

Tested by running flyteadmin with dev cluster and called the GetDomains function in AdminFetcherExtClient by flytectl.

Added unit test to:

  1. flyte/flyteadmin/tests/project_test.go
  2. flyte/flytectl/pkg/ext/domain_fetcher_test.go

Setup process

flytectl demo start --dev
POD_NAMESPACE=flyte ./flyte start --config flyte-single-binary-local.yaml

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

In order to support domain selection in interactive CLI

Docs link

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 61.34%. Comparing base (297cdf8) to head (13551b4).
Report is 133 commits behind head on master.

Files with missing lines Patch % Lines
flyteadmin/pkg/rpc/adminservice/project.go 0.00% 10 Missing ⚠️
flytectl/pkg/ext/domain_fetcher.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5443      +/-   ##
==========================================
+ Coverage   61.01%   61.34%   +0.32%     
==========================================
  Files         793      791       -2     
  Lines       51419    51040     -379     
==========================================
- Hits        31372    31309      -63     
+ Misses      17155    16851     -304     
+ Partials     2892     2880      -12     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.72% <60.00%> (-0.03%) ⬇️
unittests-flytecopilot ?
unittests-flytectl 68.03% <60.00%> (-0.01%) ⬇️
unittests-flyteidl 79.04% <ø> (ø)
unittests-flyteplugins 61.83% <ø> (ø)
unittests-flytepropeller 57.30% <ø> (ø)
unittests-flytestdlib 65.80% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zychen5186 zychen5186 force-pushed the domainAPI branch 2 times, most recently from 32e8fd7 to b268533 Compare June 7, 2024 07:10
@zychen5186 zychen5186 marked this pull request as ready for review June 8, 2024 17:31
flyteadmin/pkg/manager/interfaces/project.go Outdated Show resolved Hide resolved
flyteadmin/pkg/manager/mocks/project.go Outdated Show resolved Hide resolved
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
@zychen5186 zychen5186 force-pushed the domainAPI branch 2 times, most recently from d022eb4 to a15d27c Compare June 13, 2024 03:56
Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

Thank you, some minor comments

flyteidl/protos/flyteidl/admin/project.proto Outdated Show resolved Hide resolved
flyteadmin/pkg/manager/mocks/project.go Outdated Show resolved Hide resolved
flyteadmin/pkg/manager/mocks/project.go Outdated Show resolved Hide resolved
flyteadmin/pkg/manager/mocks/project.go Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/metrics.go Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/metrics.go Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/metrics.go Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/project.go Outdated Show resolved Hide resolved
flyteadmin/tests/project_test.go Outdated Show resolved Hide resolved
pingsutw
pingsutw previously approved these changes Jun 17, 2024
Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

troychiu
troychiu previously approved these changes Jun 18, 2024
flyteidl/protos/flyteidl/service/admin.proto Show resolved Hide resolved
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
@pingsutw pingsutw merged commit f87a049 into flyteorg:master Jun 20, 2024
52 of 53 checks passed
robert-ulbrich-mercedes-benz pushed a commit to robert-ulbrich-mercedes-benz/flyte that referenced this pull request Jul 2, 2024
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
vlibov pushed a commit to vlibov/flyte that referenced this pull request Aug 16, 2024
Signed-off-by: zychen5186 <brianchen5197@gmail.com>
Signed-off-by: Vladyslav Libov <vladyslav.libov@d-fine.de>
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.

3 participants