Skip to content

Commit

Permalink
Add default merge request status check timeout
Browse files Browse the repository at this point in the history
Add merge request status check timeout 10m

Signed-off-by: yuzhipeng <[email protected]>
  • Loading branch information
yuzp1996 committed Mar 15, 2023
1 parent dd9ac0c commit 2c80e48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const (

// PrunerKeepFeatureKey represent taskRun keep configuration key
PrunerKeepFeatureKey = "taskRunPruner.keep"

// BuildMRCheckTimeoutKey represet build merge request status check timeout key
BuildMRCheckTimeoutKey = "build.mergerequest.checkTimeout"
)

const (
Expand All @@ -48,6 +51,9 @@ const (
// DefaultPrunerKeep represent default keep number for taskRun
// If the corresponding key does not exist, the default value is returned.
DefaultPrunerKeep FeatureValue = "10000"

// DefaultMRCheckTimeout represent default timeout for merge request status check
DefaultMRCheckTimeout FeatureValue = "10m"
)

// defaultFeatureValue defines the default value for the feature switch.
Expand All @@ -56,6 +62,7 @@ var defaultFeatureValue = map[string]FeatureValue{
InitializeAllowLocalRequestsFeatureKey: DefaultInitializeAllowLocalRequests,
PrunerDelayAfterCompletedFeatureKey: DefaultPrunerDelayAfterCompleted,
PrunerKeepFeatureKey: DefaultPrunerKeep,
BuildMRCheckTimeoutKey: DefaultMRCheckTimeout,
}

// FeatureFlags holds the features configurations
Expand Down

0 comments on commit 2c80e48

Please sign in to comment.