Skip to content

OpenAPI misleading UID description about ResultAPI #533

Description

@xinnjie

Currently doc mix-use Result UID as both name and UID of result. The terminology should be sorted out, otherwise users may get confused.

About terminology

name of Result

Here result name refer to the name decided by the clients of Results API Server. And (from implementation aspect) currently Watcher use Taskrun/Pipelinerun UID as result name.

UID of Result

UID refer to the id decided by Results API Server when inserting Result object.

Actual Behavior

While GetResultRequest needs specifying result name to query Result, OpenAPI document that get /v1alpha2/parents/{parent}/results/{result_uid} get a single result given the UID.
There are also same wrong description about update, delete of Result

GRPC service definition:

rpc GetResult(GetResultRequest) returns (Result) {
  option (google.api.http) = {
    get: "/apis/results.tekton.dev/v1alpha2/parents/{name=*/results/*}"
  };
}

message GetResultRequest {
  string name = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "tekton.results.v1alpha2/Result"
    }];
}

OpenAPI doc:

  /v1alpha2/parents/{parent}/results/{result_uid}:
    summary: Get, Create, Delete or update result
    get:
      tags:
        - Results
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Result"
          description: Default response
      operationId: get_result_by_uid
      summary: Get a single result given the UID
      description: ""

Expected Behavior

OpenAPI summary of get /v1alpha2/parents/{parent}/results/{result_uid} change Get a single result given the UID to Get a single result given name and so on.

Steps to Reproduce the Problem

Additional Info

  • Kubernetes version:

    Output of kubectl version:

    (paste your output here)
    
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

  • Tekton Results version:
    current main branch

Metadata

Metadata

Assignees

Labels

kind/documentationCategorizes issue or PR as related to documentation.

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions