diff --git a/eden/mononoke/config_structs/blobimport/state.thrift b/eden/mononoke/config_structs/blobimport/state.thrift new file mode 100644 index 0000000000000..7f182509aeeae --- /dev/null +++ b/eden/mononoke/config_structs/blobimport/state.thrift @@ -0,0 +1,37 @@ +// @generated SignedSource<> +// DO NOT EDIT THIS FILE MANUALLY! +// This file is a mechanical copy of the version in the configerator repo. To +// modify it, edit the copy in the configerator repo instead and copy it over by +// running the following in your fbcode directory: +// +// configerator-thrift-updater scm/mononoke/blobimport/state.thrift + +namespace py configerator.blobimport_state.state + +typedef i64 RepoId +typedef string RepoName + +# TODO: Remove after updating blobimport +struct BlobimportState { + 1: map running, +} + +# TODO: Remove after updating blobimport +struct RepoNames { + 1: map mapping, +} + +enum BlobimportStatus { + STOPPED = 0, + RUNNING = 1, +} + +struct Repository { + 1: RepoId id, + 2: RepoName name, + 3: BlobimportStatus blobimport_status, +} + +struct Blobimport { + 1: list repositories, +} diff --git a/eden/mononoke/config_structs/fastreplay/fastreplay.thrift b/eden/mononoke/config_structs/fastreplay/fastreplay.thrift new file mode 100644 index 0000000000000..1d3384f70195d --- /dev/null +++ b/eden/mononoke/config_structs/fastreplay/fastreplay.thrift @@ -0,0 +1,23 @@ +// @generated SignedSource<> +// DO NOT EDIT THIS FILE MANUALLY! +// This file is a mechanical copy of the version in the configerator repo. To +// modify it, edit the copy in the configerator repo instead and copy it over by +// running the following in your fbcode directory: +// +// configerator-thrift-updater scm/mononoke/fastreplay/fastreplay.thrift + +namespace py configerator.fastreplay.fastreplay + +struct FastReplayConfig { + // What % of traffic should be replayed? + 1: i64 admission_rate; + + // How many requests should be executed concurrently? + 2: i64 max_concurrency; + + // One in scuba_sampling_target entries will be logged. This should be > 0. + 3: i64 scuba_sampling_target; + + // Which repos shouldn't have their traffic replayed? + 4: set skipped_repos; +} diff --git a/eden/mononoke/config_structs/loadshedding/limits.thrift b/eden/mononoke/config_structs/loadshedding/limits.thrift new file mode 100644 index 0000000000000..ccedcb0e1e7f1 --- /dev/null +++ b/eden/mononoke/config_structs/loadshedding/limits.thrift @@ -0,0 +1,73 @@ +// @generated SignedSource<<808a1a4956ee9253be832d28687b0dec>> +// DO NOT EDIT THIS FILE MANUALLY! +// This file is a mechanical copy of the version in the configerator repo. To +// modify it, edit the copy in the configerator repo instead and copy it over by +// running the following in your fbcode directory: +// +// configerator-thrift-updater scm/mononoke/loadshedding/limits.thrift + +namespace rust mononoke.loadlimiting.config + +struct MononokeThrottleLimit { + 1: double egress_bytes; + 2: double ingress_blobstore_bytes; + 3: double total_manifests; + # quicksand_manifests is deprecated, DO NOT USE + 4: double quicksand_manifests; + 5: double getfiles_files; + 6: double getpack_files; + 7: double commits; +} + +enum RateLimitStatus { + // Don't run this code at all. + Disabled = 0, + // Track this limit, but don't enforce it. + Tracked = 1, + // Enforce this limit. + Enforced = 2, +} + +struct RateLimit { + // What is this limit? + 1: string name; + // Should we enable this limit? + 2: RateLimitStatus status; + // What should the limit be? + 3: i64 max_value; + // Over what interval? + 4: i32 interval; + // What prefix to use for the keys? (this can be used for invalidation) + 5: string prefix; + // How should the user get help? + 6: string help; + // How long are we willing to wait to make a decision on this rate limit? + // (in seconds) Setting this to 0 effectively disables the rate limit. + 7: i64 timeout +} + +struct RateLimits { + 1: RateLimit commits_per_author; +} + +struct MononokeThrottleLimits { + // default limits if there is no hostprefix match + 1: MononokeThrottleLimit defaults; + + // Map from datacenter prefix to a percentage of capacity, for example + // if PRN has 75% of the total capacity, this would be represented as: + // {"prn": 75} + 2: map datacenter_prefix_capacity; + + // limits per hostprefix + 3: map hostprefixes; + + // Throttling specific for quicksand requests. + // 1 means quicksand has the same limits, + // 0 means all quicksand traffic is dropped + 4: double quicksand_multiplier; + + // Rate limits are global limits that are implemented in Mononoke itself (i.e. + // those aren't passed through to ratelim's load limiter). + 5: RateLimits rate_limits; +} diff --git a/eden/mononoke/config_structs/pushredirect/enable.thrift b/eden/mononoke/config_structs/pushredirect/enable.thrift new file mode 100644 index 0000000000000..e27d2a0bd3e9a --- /dev/null +++ b/eden/mononoke/config_structs/pushredirect/enable.thrift @@ -0,0 +1,24 @@ +// @generated SignedSource<> +// DO NOT EDIT THIS FILE MANUALLY! +// This file is a mechanical copy of the version in the configerator repo. To +// modify it, edit the copy in the configerator repo instead and copy it over by +// running the following in your fbcode directory: +// +// configerator-thrift-updater scm/mononoke/pushredirect/enable.thrift + +namespace rust mononoke.pushredirect.enable +namespace py configerator.pushredirect.enable + +typedef i64 RepoId + +struct PushRedirectEnableState { + // Should we enable push redirect on infinitepush (draft) pushes? + 1: bool draft_push; + // Should we enable push redirect on public pushes (push, pushrebase, bookmark moves)? + 2: bool public_push; +} + +struct MononokePushRedirectEnable { + // Map from repo to push redirection state + 1: map per_repo; +}