Skip to content
Closed
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
2 changes: 1 addition & 1 deletion coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,15 @@ type Feature struct {
HardLimit *int64 `json:"hard_limit,omitempty"`
// Actual is the usage measured against Limit, when known: a
// point-in-time count for most features, or usage accumulated over
// UsagePeriod for features that set one. Its unit matches Limit's;
// UsagePeriod for features that set one. FeatureAgentRuntimeHours
// without a licensed usage period instead reports all retained usage
// since tracking began without a UsagePeriod. Its unit matches Limit's;
// FeatureAgentRuntimeHours reports whole hours floored from the
// recorded milliseconds, with the precise value available in
// ActualMs. FeatureAgentRuntimeHours usage can trail by roughly one
// hour because the current hour is not emitted, plus the entitlement
// refresh interval.
// refresh interval, and can undercount after outages beyond the usage
// event backfill window.
Actual *int64 `json:"actual,omitempty"`
// ActualMs is the precise usage backing Actual, in milliseconds, for
// features measured in time. It has the same freshness as Actual.
Expand Down
14 changes: 7 additions & 7 deletions codersdk/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,8 @@ func TestEntitlementsCapabilities(t *testing.T) {
codersdk.FeatureAuditLog: {
Entitlement: codersdk.EntitlementEntitled,
Enabled: true,
Limit: ptr.Ref(int64(10)),
Actual: ptr.Ref(int64(5)),
Limit: new(int64(10)),
Actual: new(int64(5)),
},
codersdk.FeatureSCIM: {
Entitlement: codersdk.EntitlementGracePeriod,
Expand All @@ -1082,8 +1082,8 @@ func TestEntitlementsCapabilities(t *testing.T) {
codersdk.FeatureUserLimit: {
Entitlement: codersdk.EntitlementEntitled,
Enabled: true,
Limit: ptr.Ref(int64(1)),
Actual: ptr.Ref(int64(2)),
Limit: new(int64(1)),
Actual: new(int64(2)),
},
codersdk.FeatureBrowserOnly: {
Entitlement: codersdk.EntitlementEntitled,
Expand All @@ -1092,9 +1092,9 @@ func TestEntitlementsCapabilities(t *testing.T) {
codersdk.FeatureAppearance: {
Entitlement: codersdk.EntitlementNotEntitled,
Enabled: true,
SoftLimit: ptr.Ref(int64(3)),
HardLimit: ptr.Ref(int64(4)),
ActualMs: ptr.Ref(int64(5)),
SoftLimit: new(int64(3)),
HardLimit: new(int64(4)),
ActualMs: new(int64(5)),
UsagePeriod: &codersdk.UsagePeriod{IssuedAt: time.Now()},
},
},
Expand Down
20 changes: 10 additions & 10 deletions docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading