tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.51k stars 1.78k forks source link

Git resolver timeout > 1m doesn't work #6025

Open lbernick opened 1 year ago

lbernick commented 1 year ago

Expected Behavior

Git resolution times out after the amount of time specified by "fetch-timeout" in the git-resolver-config configmap in the tekton-pipelines-resolvers namespace.

Actual Behavior

Resolution times out after 1m. Possibly because of this?

Additional Info

Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:21:56Z", GoVersion:"go1.18.4", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.13-gke.900", GitCommit:"900b919b3b8275ecb9f70a489a318b5b08a4ab9c", GitTreeState:"clean", BuildDate:"2022-10-26T09:25:23Z", GoVersion:"go1.17.13b7", Compiler:"gc", Platform:"linux/amd64"}
Client version: 0.25.0
Chains version: v0.8.0
Pipeline version: v0.41.0
Triggers version: v0.22.0
Dashboard version: v0.31.0
abayer commented 1 year ago

Yup, because of that. I missed that TODO. Whoops.

lbernick commented 1 year ago

A brief explanation of why this issue is occurring:

When Pipelines sees a reference to a remote task or a remote pipeline, it creates a resolution request object that is labeled with the resolver that should handle the request. Resolvers, including the git resolver, watch for resolution requests to be created that they can handle. The git resolver will time out fetching something from git after the time configured in the git resolver feature flags. However, pipelines will cancel the resolution request after 1 minute. So if the git timeout is > 1m, the git resolver won't time out after 1m, but the request will get timed out anyway.

One idea for solving this is to allow the resolver to update the resolution request with something indicating "resolution is in progress, please don't time this out". The global timeout would then only apply if the resolver hadn't updated the resolution request at all.

EmmaMunley commented 1 year ago

/assign @EmmaMunley

I can take this on. I think we can start with making the global timeout configurable, and later remove the git timeout if it's too confusing.

tekton-robot commented 1 year ago

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.

vdemeester commented 1 year ago

/lifecycle frozen

anithapriyanatarajan commented 3 weeks ago

/remove-lifecycle stale

Please prioritize this issue since this is impacting timely completion of many pipeline runs relying on remote tasks