Skip to content

Commit

Permalink
fix: remove invalidate oauth2Token after pipeline task tear down (#4772
Browse files Browse the repository at this point in the history
…) (#4778)

Co-authored-by: littlejian <[email protected]>
  • Loading branch information
erda-bot and littlejiancc authored May 5, 2022
1 parent 1fa5767 commit 0821ee5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/pipeline/providers/reconciler/task_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ func (tr *defaultTaskReconciler) TeardownAfterReconcileDone(ctx context.Context,
_ = aop.Handle(aop.NewContextForTask(*task, *p, aoptypes.TuneTriggerTaskAfterExec))

// invalidate openapi oauth2 token
// TODO Temporarily remove EnvOpenapiToken, this causes the deployment to not be canceled when pipeline is canceled. And its ttl is 3630s,
tokens := strutil.DedupSlice([]string{
task.Extra.PublicEnvs[apistructs.EnvOpenapiTokenForActionBootstrap],
task.Extra.PrivateEnvs[apistructs.EnvOpenapiToken],
}, true)
for _, token := range tokens {
_, err := tr.bdl.InvalidateOAuth2Token(apistructs.OAuth2TokenInvalidateRequest{AccessToken: token})
Expand Down

0 comments on commit 0821ee5

Please sign in to comment.