Skip to content

Commit

Permalink
SDKGracefulTermination: Promote to beta
Browse files Browse the repository at this point in the history
Follows checklist in features.go.

Closes googleforgames#2831
  • Loading branch information
zmerlynn committed Dec 8, 2022
1 parent ad9dfd0 commit 3daf877
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ KIND_CONTAINER_NAME=$(KIND_PROFILE)-control-plane
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.14

# Enable all alpha feature gates. Keep in sync with `false` (alpha) entries in pkg/util/runtime/features.go:featureDefaults
ALPHA_FEATURE_GATES ?= "LifecycleContract=true&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&SDKGracefulTermination=true&Example=true"
ALPHA_FEATURE_GATES ?= "LifecycleContract=true&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&Example=true"

# Build with Windows support
WITH_WINDOWS=1
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ steps:

- name: 'e2e-runner'
args:
- 'CustomFasSyncInterval=false&StateAllocationFilter=false&LifecycleContract=true&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&SDKGracefulTermination=true&Example=true'
- 'CustomFasSyncInterval=false&SDKGracefulTermination=false&StateAllocationFilter=false&LifecycleContract=true&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&Example=true'
- 'e2e-test-cluster'
- "${_REGISTRY}"
id: e2e-feature-gates
Expand Down
2 changes: 1 addition & 1 deletion install/helm/agones/defaultfeaturegates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

# Beta features
CustomFasSyncInterval: true
SDKGracefulTermination: true
StateAllocationFilter: true

# Alpha features
LifecycleContract: false
PlayerAllocationFilter: false
PlayerTracking: false
ResetMetricsOnDelete: false
SDKGracefulTermination: false

# Example feature
Example: false
12 changes: 6 additions & 6 deletions pkg/util/runtime/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const (
// FeatureCustomFasSyncInterval is a feature flag that enables a custom FleetAutoscaler resync interval
FeatureCustomFasSyncInterval Feature = "CustomFasSyncInterval"

// FeatureSDKGracefulTermination is a feature flag that enables SDK to support gracefulTermination
FeatureSDKGracefulTermination Feature = "SDKGracefulTermination"

// FeatureStateAllocationFilter is a feature flag that enables state filtering on Allocation.
FeatureStateAllocationFilter Feature = "StateAllocationFilter"

Expand All @@ -54,9 +57,6 @@ const (
// relevant metric views to reset their state immediately when an Agones resource is deleted.
FeatureResetMetricsOnDelete Feature = "ResetMetricsOnDelete"

// FeatureSDKGracefulTermination is a feature flag that enables SDK to support gracefulTermination
FeatureSDKGracefulTermination Feature = "SDKGracefulTermination"

////////////////
// Example feature

Expand Down Expand Up @@ -92,15 +92,15 @@ var (
// In each of these, keep the feature sorted by descending maturity then alphabetical
featureDefaults = map[Feature]bool{
// Beta features
FeatureCustomFasSyncInterval: true,
FeatureStateAllocationFilter: true,
FeatureCustomFasSyncInterval: true,
FeatureSDKGracefulTermination: true,
FeatureStateAllocationFilter: true,

// Alpha features
FeatureLifecycleContract: false,
FeaturePlayerAllocationFilter: false,
FeaturePlayerTracking: false,
FeatureResetMetricsOnDelete: false,
FeatureSDKGracefulTermination: false,

// Example feature
FeatureExample: false,
Expand Down
14 changes: 14 additions & 0 deletions site/content/en/docs/Guides/feature-stages.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ that can be found in the [Helm configuration]({{< ref "/docs/Installation/Instal

The current set of `alpha` and `beta` feature gates:

{{% feature publishVersion="1.29.0" %}}
| Feature Name | Gate | Default | Stage | Since |
|-----------------------------------------------------------------------------------------------------------------------|--------------------------|----------|---------|--------|
| [Custom resync period for FleetAutoscaler](https://github.com/googleforgames/agones/issues/1955) | `CustomFasSyncInterval` | Enabled | `Beta` | 1.25.0 |
| [Graceful Termination for GameServer SDK](https://github.com/googleforgames/agones/pull/2205) | `SDKGracefulTermination` | Enabled | `Beta` | 1.18.0 |
| [GameServer state filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `StateAllocationFilter` | Enabled | `Beta` | 1.26.0 |
| [Lifecycle Contracts](https://github.com/googleforgames/agones/issues/2794) | `LifecycleContract` | Disabled | `Alpha` | 1.28.0 |
| [GameServer player capacity filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `PlayerAllocationFilter` | Disabled | `Alpha` | 1.14.0 |
| [Player Tracking]({{< ref "/docs/Guides/player-tracking.md" >}}) | `PlayerTracking` | Disabled | `Alpha` | 1.6.0 |
| [Reset Metric Export on Fleet / Autoscaler deletion]({{% relref "./metrics.md#dropping-metric-labels" %}}) | `ResetMetricsOnDelete` | Disabled | `Alpha` | 1.26.0 |
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |
{{% /feature %}}
{{% feature expiryVersion="1.29.0" %}}
| Feature Name | Gate | Default | Stage | Since |
|-----------------------------------------------------------------------------------------------------------------------|--------------------------|----------|---------|--------|
| [Custom resync period for FleetAutoscaler](https://github.com/googleforgames/agones/issues/1955) | `CustomFasSyncInterval` | Enabled | `Beta` | 1.25.0 |
Expand All @@ -34,6 +47,7 @@ The current set of `alpha` and `beta` feature gates:
| [Reset Metric Export on Fleet / Autoscaler deletion]({{% relref "./metrics.md#dropping-metric-labels" %}}) | `ResetMetricsOnDelete` | Disabled | `Alpha` | 1.26.0 |
| [Graceful Termination for GameServer SDK](https://github.com/googleforgames/agones/pull/2205) | `SDKGracefulTermination` | Disabled | `Alpha` | 1.18.0 |
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |
{{% /feature %}}

{{< alert title="Note" color="info" >}}
If you aren't sure if Feature Flags have been set correctly, have a look at the
Expand Down

0 comments on commit 3daf877

Please sign in to comment.