Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-sync with internal repository #18

Merged
merged 1 commit into from
Apr 20, 2020
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
37 changes: 37 additions & 0 deletions eden/mononoke/config_structs/blobimport/state.thrift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// @generated SignedSource<<cb17cfee46cd3f890d0e413c4ae99a03>>
// 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<RepoId, bool> running,
}

# TODO: Remove after updating blobimport
struct RepoNames {
1: map<string, RepoId> mapping,
}

enum BlobimportStatus {
STOPPED = 0,
RUNNING = 1,
}

struct Repository {
1: RepoId id,
2: RepoName name,
3: BlobimportStatus blobimport_status,
}

struct Blobimport {
1: list<Repository> repositories,
}
23 changes: 23 additions & 0 deletions eden/mononoke/config_structs/fastreplay/fastreplay.thrift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// @generated SignedSource<<e660e73a362306ee7fc69717a1ac484c>>
// 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<string> skipped_repos;
}
73 changes: 73 additions & 0 deletions eden/mononoke/config_structs/loadshedding/limits.thrift
Original file line number Diff line number Diff line change
@@ -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<string, double> datacenter_prefix_capacity;

// limits per hostprefix
3: map<string, MononokeThrottleLimit> 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;
}
24 changes: 24 additions & 0 deletions eden/mononoke/config_structs/pushredirect/enable.thrift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// @generated SignedSource<<f75a44381e363ff1cd746a251219735b>>
// 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<RepoId, PushRedirectEnableState> per_repo;
}