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

Implement GetProject endpoint in FlyteAdmin #4825

Merged
merged 17 commits into from
Mar 20, 2024

Conversation

RRap0so
Copy link
Contributor

@RRap0so RRap0so commented Feb 2, 2024

Tracking issue

Closes #4317

Why are the changes needed?

We have several services and operators that fetch single Project objects from flyteadmin. This new endpoint will save some filtering by only fetching the one we need instead of fetching a List of Projects (the endpoint available today)

Note: This replaces #4316 (diverged too much from main)

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

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

Related PRs

Docs link

Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Feb 2, 2024
@RRap0so RRap0so changed the title [Core feature] Implement GetProject endpoint in FlyteAdmin Implement GetProject endpoint in FlyteAdmin Feb 2, 2024
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: Patch coverage is 53.12500% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 58.98%. Comparing base (04dc245) to head (681d2fb).
Report is 2 commits behind head on master.

Files Patch % Lines
flyteadmin/pkg/rpc/adminservice/project.go 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4825      +/-   ##
==========================================
+ Coverage   58.97%   58.98%   +0.01%     
==========================================
  Files         645      645              
  Lines       55578    55622      +44     
==========================================
+ Hits        32778    32811      +33     
- Misses      20207    20217      +10     
- Partials     2593     2594       +1     
Flag Coverage Δ
unittests 58.98% <53.12%> (+0.01%) ⬆️

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.

RRap0so and others added 2 commits February 5, 2024 13:39
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@RRap0so
Copy link
Contributor Author

RRap0so commented Feb 5, 2024

I've added the missing coverage for `project.go.

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.

should we add rpc GetProject to the proto?

rpc UpdateProject (flyteidl.admin.Project) returns (flyteidl.admin.ProjectUpdateResponse) {
option (google.api.http) = {
put: "/api/v1/projects/{id}"
body: "*"
additional_bindings {
put: "/api/v1/projects/org/{org}/{id}"
body: "*"
}
};
// option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
// description: "Update a project."
// };
}
// Fetches a list of :ref:`ref_flyteidl.admin.Project`
rpc ListProjects (flyteidl.admin.ProjectListRequest) returns (flyteidl.admin.Projects) {
option (google.api.http) = {
get: "/api/v1/projects"
additional_bindings {
get: "/api/v1/projects/org/{org}"
}
};
// option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {
// description: "Fetch registered projects."
// };

Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@RRap0so
Copy link
Contributor Author

RRap0so commented Feb 5, 2024

@pingsutw added, ptal.

flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
RRap0so and others added 4 commits February 9, 2024 16:38
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
Signed-off-by: Rafael Raposo <100569684+RRap0so@users.noreply.github.com>
Signed-off-by: Rafael Raposo <100569684+RRap0so@users.noreply.github.com>
Signed-off-by: Rafael Raposo <100569684+RRap0so@users.noreply.github.com>
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Feb 9, 2024
pingsutw
pingsutw previously approved these changes Feb 14, 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, @katrogan, mind taking a look as well?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 14, 2024
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/project.go Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/project.go Outdated Show resolved Hide resolved
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
@pingsutw
Copy link
Member

@RRap0so Any update on this PR?

Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Mar 18, 2024
@RRap0so
Copy link
Contributor Author

RRap0so commented Mar 18, 2024

@pingsutw I've done the changes and I've merged with master.

Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@dosubot dosubot bot removed the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 18, 2024
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 18, 2024
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Mar 18, 2024
Copy link
Contributor

@katrogan katrogan left a comment

Choose a reason for hiding this comment

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

hey @RRap0so seeing a couple of resolved comments that weren't addressed, is this PR missing a push to remote?

flyteadmin/pkg/rpc/adminservice/project.go Outdated Show resolved Hide resolved
flyteadmin/pkg/rpc/adminservice/project.go Outdated Show resolved Hide resolved
flyteidl/protos/flyteidl/service/admin.proto Outdated Show resolved Hide resolved
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Mar 18, 2024
@RRap0so
Copy link
Contributor Author

RRap0so commented Mar 18, 2024

@katrogan sorry about that, I've addressed all the comments.

Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
@katrogan
Copy link
Contributor

@RRap0so no problem, just wanted to make sure all changes had been pushed!

Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
Copy link
Contributor

@katrogan katrogan 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 for making this change!

@katrogan katrogan merged commit 3fe4533 into flyteorg:master Mar 20, 2024
47 of 48 checks passed
Copy link

welcome bot commented Mar 20, 2024

Congrats on merging your first pull request! 🎉

@RRap0so RRap0so deleted the get_project_endpoint branch March 20, 2024 18:46
yubofredwang pushed a commit to yubofredwang/flyte that referenced this pull request Mar 26, 2024
pmahindrakar-oss pushed a commit that referenced this pull request May 1, 2024
) (#178)

## Overview
Cherry-pick of [3fe4533](3fe4533) and [c21ded6](c21ded6)
as well as code changes to be org-aware

## Test Plan
*TODO: Summarize tests added, integration tests run, or other steps you took to validate this change. Include (or link to) relevant test output or screenshots.*

## Rollout Plan (if applicable)
*TODO: Describe any deployment or compatibility considerations for rolling out this change.*

## Upstream Changes
Should this change be upstreamed to OSS (flyteorg/flyte)? If so, please check this box for auditing. Note, this is the responsibility of each developer. See [this guide](https://unionai.atlassian.net/wiki/spaces/ENG/pages/447610883/Flyte+-+Union+Cloud+Development+Runbook/#When-are-versions-updated%3F).
- [ ] To be upstreamed

## Jira Issue
https://unionai.atlassian.net/browse/<project-number>

## Checklist
* [ ] Added tests
* [ ] Ran a deploy dry run and shared the terraform plan
* [ ] Added logging and metrics
* [ ] Updated [dashboards](https://unionai.grafana.net/dashboards) and [alerts](https://unionai.grafana.net/alerting/list)
* [ ] Updated documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core feature] Implement GetProject endpoint in FlyteAdmin
3 participants