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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

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 60.98%. Comparing base (59e18d1) to head (95f2bca).
Report is 1 commits behind head on master.

Files 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   60.97%   60.98%           
=======================================
  Files         793      794    +1     
  Lines       51350    51370   +20     
=======================================
+ Hits        31312    31326   +14     
- Misses      17152    17157    +5     
- Partials     2886     2887    +1     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.68% <60.00%> (+0.01%) ⬆️
unittests-flytecopilot 17.79% <ø> (ø)
unittests-flytectl 67.96% <60.00%> (-0.01%) ⬇️
unittests-flyteidl 79.04% <ø> (ø)
unittests-flyteplugins 61.84% <ø> (ø)
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
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>
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!

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.

None yet

3 participants