Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Main (unreleased)
### Features

- A new `mimir.alerts.kubernetes` component which discovers `AlertmanagerConfig` Kubernetes resources and loads them into a Mimir instance. (@ptodev)
- Mark `stage.windowsevent` block in the `loki.process` component as GA. (@kgeckhart)

### Enhancements

Expand Down
17 changes: 0 additions & 17 deletions internal/component/loki/process/stages/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ const (
StageTypeWindowsEvent = "windowsevent"
)

// Add stages that are not GA. Stages that are not specified here are considered GA.
var stagesUnstable = map[string]featuregate.Stability{
StageTypeWindowsEvent: featuregate.StabilityExperimental,
}

// Processor takes an existing set of labels, timestamp and log entry and returns either a possibly mutated
// timestamp and log entry
type Processor interface {
Expand Down Expand Up @@ -121,14 +116,6 @@ func toStage(p Processor) Stage {
}
}

func checkFeatureStability(stageName string, minStability featuregate.Stability) error {
blockStability, exist := stagesUnstable[stageName]
if exist {
return featuregate.CheckAllowed(blockStability, minStability, fmt.Sprintf("stage %q", stageName))
}
return nil
}

// New creates a new stage for the given type and configuration.
func New(logger log.Logger, jobName *string, cfg StageConfig, registerer prometheus.Registerer, minStability featuregate.Stability) (Stage, error) {
var (
Expand Down Expand Up @@ -278,10 +265,6 @@ func New(logger log.Logger, jobName *string, cfg StageConfig, registerer prometh
panic(fmt.Sprintf("unreachable; should have decoded into one of the StageConfig fields: %+v", cfg))
}

if err := checkFeatureStability(s.Name(), minStability); err != nil {
return nil, err
}

return s, nil
}

Expand Down
5 changes: 0 additions & 5 deletions internal/component/loki/process/stages/windowsevent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,3 @@ func TestWindowsEventValidate(t *testing.T) {
})
}
}

func TestWindowsEventStabilityLevel(t *testing.T) {
_, err := NewPipeline(log.NewNopLogger(), loadConfig(testWindowsEventMsgDefaults), nil, prometheus.DefaultRegisterer, featuregate.StabilityPublicPreview)
require.ErrorContains(t, err, `invalid stage config stage "windowsevent" is at stability level "experimental", which is below the minimum allowed stability level "public-preview". Use --stability.level command-line flag to enable "experimental" features`)
}
Loading