-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backend): Refactor apiserver, add Pipeline and other v2beta serv…
…ices (#8633) * Staging WIP * Fix recurring run, switch to pipeline_version_id * Regenerate python client * Refactor packages for pipeline service v2 * Stage progress * Add support for pipeline service v2beta1 * Go mod tidy * Update licenses * Set default namespace to be empty * Separate deletion of pipeline versions * Change report ReportRunMetrics to obey AIP * Use pipeline version id in run proto * Update run.proto * Upgrade storage * Remove dependencies on api * Stage refactoring progress * Refactor apiserver * Update v1beta1 unit test * Update dependencies * Fix integration test * Revert visualization server changes (workaround) * Address comments * Basic lint the api server * Update licenses file * Adjust intergtaion tests * Fix typos in the tests * Update tests * Update test * Add support v1 delepe pipeline * Remove gorm.Model to split into a different PR * Lint api server * Fix default experiment in upgrade test * Update storage states * Testing upgrade test run * Add copying pod logs to the GCS bucket * Fix upgrade test * Adjust backend test for list * Fix the tests * Fix workflow manifest discrepancy at create * Add a few unit-tests * Add misc service and fix persistence agent * Remove default values from TEXT columns * Address comments. Fixes #8702. * Address comment, reorder resource, server, storage * Fix front end integration test * Fix FE integration test * Fix tabs, add pauses, make more explicit FE test * Revert FE test changes * Enable default experiment and disable its deletion * Replace empty namespace with POD_NAMESPACE * Default experiment is now the oldest * Emplace empty with POD_NAMESPACE for argo only * Fix api integration test * Revert changes to default experiment's description * Improve FE test flakiness * Force refresh in the FE test * Fix FE integration test * Add delay in FE test * Add local debug to FE test * Update tests * Fix typo * Address comments * Enforce template version verification * Fix workflow manifest discrepancy with v1 * Fix FE test * Revert changes in persistence agent * Limit to one resource owner * Change default run state to unknown * Revert changes to FE integration test * Make states consistent * Remove links from error messages * Address comments * Address comments * Change the order for teardown --------- Co-authored-by: Chen Sun <chensun@users.noreply.github.com>
- Loading branch information
Showing
279 changed files
with
24,369 additions
and
16,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Copyright 2023 The Kubeflow Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
option go_package = "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client"; | ||
package kubeflow.pipelines.backend.api.v2beta1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/protobuf/empty.proto"; | ||
import "protoc-gen-swagger/options/annotations.proto"; | ||
import "google/rpc/status.proto"; | ||
|
||
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { | ||
responses: { | ||
key: "default"; | ||
value: { | ||
schema: { | ||
json_schema: { | ||
ref: ".google.rpc.Status"; | ||
} | ||
} | ||
} | ||
} | ||
// Use bearer token for authorizing access to job service. | ||
// Kubernetes client library(https://kubernetes.io/docs/reference/using-api/client-libraries/) | ||
// uses bearer token as default for authorization. The section below | ||
// ensures security definition object is generated in the swagger definition. | ||
// For more details see https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject | ||
security_definitions: { | ||
security: { | ||
key: "Bearer"; | ||
value: { | ||
type: TYPE_API_KEY; | ||
in: IN_HEADER; | ||
name: "authorization"; | ||
} | ||
} | ||
} | ||
security: { | ||
security_requirement: { | ||
key: "Bearer"; | ||
value: {}; | ||
} | ||
} | ||
}; | ||
|
||
service AuthService { | ||
rpc Authorize(AuthorizeRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
get: "/apis/v2beta1/auth" | ||
}; | ||
} | ||
} | ||
|
||
// Ask for authorization of an access by providing resource's namespace, type | ||
// and verb. User identity is not part of the message, because it is expected | ||
// to be parsed from request headers. Caller should proxy user request's headers. | ||
message AuthorizeRequest { | ||
// Type of resources in pipelines system. | ||
enum Resources { | ||
UNASSIGNED_RESOURCES = 0; | ||
VIEWERS = 1; | ||
} | ||
// Type of verbs that act on the resources. | ||
enum Verb { | ||
UNASSIGNED_VERB = 0; | ||
CREATE = 1; | ||
GET = 2; | ||
DELETE = 3; | ||
} | ||
string namespace = 1; // Namespace the resource belongs to. | ||
Resources resources = 2; // Resource type asking for authorization. | ||
Verb verb = 3; // Verb on the resource asking for authorization. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.