Skip to content

Commit

Permalink
Add templaterender timeout and retention key and default value
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzp1996 committed Aug 16, 2023
1 parent a3e5d7c commit 8dc9f96
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/feature_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ const (

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

// TemplateRenderCheckTimeoutKey represent templatrender timeout key
TemplateRenderCheckTimeoutKey = "templateRender.checkTimeout"

// TemplateRenderRetentionTimeKey represent the config key for how long templatrender will remain
TemplateRenderRetentionTimeKey = "templateRender.retention"
)

const (
Expand All @@ -62,6 +68,12 @@ const (

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

// DefaultTemplateRenderCheckTimeout represent default timeout for templaterender check
DefaultTemplateRenderCheckTimeout FeatureValue = "30s"

// DefaultTemplateRenderRetentionTime represents default duration how long the templatrender will remain
DefaultTemplateRenderRetentionTime FeatureValue = "30m"
)

// defaultFeatureValue defines the default value for the feature switch.
Expand All @@ -72,6 +84,8 @@ var defaultFeatureValue = map[string]FeatureValue{
PrunerDelayAfterCompletedFeatureKey: DefaultPrunerDelayAfterCompleted,
PrunerKeepFeatureKey: DefaultPrunerKeep,
BuildMRCheckTimeoutKey: DefaultMRCheckTimeout,
TemplateRenderCheckTimeoutKey: DefaultTemplateRenderCheckTimeout,
TemplateRenderRetentionTimeKey: DefaultTemplateRenderRetentionTime,
}

// FeatureFlags holds the features configurations
Expand Down

0 comments on commit 8dc9f96

Please sign in to comment.