Open xinnjie opened 1 year ago
/kind documentation
@enarha @sayan-biswas @khrm Let's discuss about this documentation issue.
@xinnjie the difference between gRPC method and REST call. The gRPC method expects a single parameter called name
which is of the pattern <parent_name>/results/<results_uid>
. In the REST API call, I have made them separate parameters. I agree, it would be better to keep them in sync. Let me make the necessary changes.
My point is that results_uid
in <parent_name>/results/<results_uid>
collides with uid
in Result
of Results Service API
message Result {
string name = 1 [(google.api.resource_reference) = {
child_type: "tekton.results.v1alpha2/Result"
}];
// Server assigned identifier of the Result.
// DEPRECATED: use uid instead.
string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY, deprecated = true];
// Server assigned identifier of the Result.
string uid = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
...
}
Maybe we could call results_uid
in <parent_name>/results/<results_uid>
as results name, <parent_name>/results/<results_uid>
as results full name.
Results UID is the UID in Result
of Results Service API.
Names could be discussed as long as long they do not collide.
/remove-kind bug
Agree with @xinnjie. result-name
seems more accurate.
Okay let me open a fix.
/assign
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen
with a justification.
/lifecycle stale
Send feedback to tektoncd/plumbing.
/remove-lifecycle stale Work is in progress
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 useTaskrun
/Pipelinerun
UID as resultname
.UID of
Result
UID
refer to the id decided by Results API Server when insertingResult
object.Actual Behavior
While
GetResultRequest
needs specifying result name to queryResult
, OpenAPI document thatget /v1alpha2/parents/{parent}/results/{result_uid}
get a single result given the UID. There are also same wrong description about update, delete ofResult
GRPC service definition:
OpenAPI doc:
Expected Behavior
OpenAPI
summary
ofget /v1alpha2/parents/{parent}/results/{result_uid}
changeGet a single result given the UID
toGet a single result given name
and so on.Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
Tekton Results version: current
main
branch