Skip to content

Commit

Permalink
fix: prunepolicy.max_unused_percent should allow decimal values
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Sep 17, 2024
1 parent d59c6fc commit 3056203
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions gen/go/v1/config.pb.go

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

4 changes: 2 additions & 2 deletions proto/v1/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ message RetentionPolicy {

message PrunePolicy {
Schedule schedule = 2 [json_name="schedule"];
int32 max_unused_bytes = 3 [json_name="maxUnusedBytes"]; // max unused bytes before running prune.
int32 max_unused_percent = 4 [json_name="maxUnusedPercent"]; // max unused percent before running prune.
int64 max_unused_bytes = 3 [json_name="maxUnusedBytes"]; // max unused bytes before running prune.
double max_unused_percent = 4 [json_name="maxUnusedPercent"]; // max unused percent before running prune.
}

message CheckPolicy {
Expand Down
12 changes: 6 additions & 6 deletions webui/gen/ts/v1/config_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";

/**
* @generated from message v1.HubConfig
Expand Down Expand Up @@ -623,14 +623,14 @@ export class PrunePolicy extends Message<PrunePolicy> {
/**
* max unused bytes before running prune.
*
* @generated from field: int32 max_unused_bytes = 3;
* @generated from field: int64 max_unused_bytes = 3;
*/
maxUnusedBytes = 0;
maxUnusedBytes = protoInt64.zero;

/**
* max unused percent before running prune.
*
* @generated from field: int32 max_unused_percent = 4;
* @generated from field: double max_unused_percent = 4;
*/
maxUnusedPercent = 0;

Expand All @@ -643,8 +643,8 @@ export class PrunePolicy extends Message<PrunePolicy> {
static readonly typeName = "v1.PrunePolicy";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "schedule", kind: "message", T: Schedule },
{ no: 3, name: "max_unused_bytes", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 4, name: "max_unused_percent", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 3, name: "max_unused_bytes", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 4, name: "max_unused_percent", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PrunePolicy {
Expand Down

0 comments on commit 3056203

Please sign in to comment.