Skip to content

Commit ca4db17

Browse files
committed
Resync from internal repo
We recently changed ShipIt config to export BUCK files (which were renamed from TARGETS). Resync from the internal repo. Note: I cannot use the automated tool to create a PR because the job has consistently timed out / OOMed.
1 parent c65c861 commit ca4db17

File tree

708 files changed

+33557
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

708 files changed

+33557
-56
lines changed

addons/BUCK

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
load("@fbcode_macros//build_defs:native_rules.bzl", "buck_genrule")
2+
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")
3+
load("@fbsource//xplat/third-party/yarn:yarn_offline_mirror_helper.bzl", "yarn_offline_mirror_path")
4+
5+
oncall("scm_client_infra")
6+
7+
python_binary(
8+
name = "build-tar-script",
9+
main_function = ".build-tar.main",
10+
main_src = "build-tar.py",
11+
)
12+
13+
buck_genrule(
14+
name = "isl-tar",
15+
# While it may be tedious to maintain the list of srcs by hand, it ensures
16+
# that changes in the addons/ folder that are not part of ISL do not trigger
17+
# a rebuild.
18+
srcs = glob(
19+
[
20+
"eslint-rules/**",
21+
"isl/**",
22+
"isl-server/**",
23+
"shared/**",
24+
"components/**",
25+
],
26+
exclude = [
27+
"**/node_modules/**",
28+
"isl/build/**",
29+
"isl-server/dist/**",
30+
],
31+
) + [
32+
".eslintrc.js",
33+
".gitignore",
34+
"package.json",
35+
"prettier.config.cjs",
36+
"yarn.lock",
37+
],
38+
out = "isl-dist.tar.xz",
39+
cmd = '$(exe :build-tar-script) --yarn "$(exe fbsource//xplat/third-party/yarn:yarn)" --yarn-offline-mirror "{yarn_offline_mirror}" -o "$OUT" --src "$SRCDIR" --tmp "$TMP"'.format(yarn_offline_mirror = yarn_offline_mirror_path()),
40+
)

ci/BUCK

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")
2+
3+
oncall("scm_client_infra")
4+
5+
# This cannot live in the eden/oss/.github/workflows/ folder because the
6+
# ".github" in the path is incompatible with main_module.
7+
python_binary(
8+
name = "gen_workflows",
9+
srcs = [
10+
"gen_workflows.py",
11+
],
12+
main_function = "eden.oss.ci.gen_workflows.main",
13+
deps = [
14+
"fbsource//third-party/pypi/pyyaml:pyyaml",
15+
],
16+
)

common/fb303/cpp/BUCK

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
2+
3+
oncall("fboss_agent_push")
4+
5+
cpp_library(
6+
name = "fb303",
7+
srcs = glob(["*.cpp"]),
8+
headers = glob(["*.h"]),
9+
exported_deps = [
10+
"//common/fb303/if:fb303-cpp2-services",
11+
"//folly:small_vector",
12+
],
13+
exported_external_deps = [
14+
("glibc", None, "rt"),
15+
],
16+
)

common/fb303/if/BUCK

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
load("//common/automock:automock.bzl", "thrift_plugin_automock")
3+
4+
oncall("fboss_agent_push")
5+
6+
thrift_library(
7+
name = "fb303",
8+
languages = ["cpp2"],
9+
no_plugin_deps = [
10+
"//thrift/annotation:cpp",
11+
"//thrift/annotation:go",
12+
"//thrift/annotation:hack",
13+
"//thrift/annotation:java",
14+
"//thrift/annotation:python",
15+
"//thrift/annotation:thrift",
16+
"//thrift/facebook/erlang:annotations",
17+
],
18+
plugins = [thrift_plugin_automock],
19+
thrift_srcs = {
20+
"fb303.thrift": ["FacebookService"],
21+
},
22+
)

common/rust/shed/hostcaps/BUCK

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
2+
load("@fbcode_macros//build_defs:rust_binary.bzl", "rust_binary")
3+
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library")
4+
5+
oncall("autocargo")
6+
7+
rust_library(
8+
name = "hostcaps",
9+
srcs = glob(["src/**/*.rs"]),
10+
autocargo = {
11+
"cargo_toml_config": {
12+
"lints": {
13+
"rust": {
14+
"unexpected_cfgs": {
15+
"check-cfg": ["cfg(fbcode_build)"],
16+
"level": "warn",
17+
},
18+
},
19+
},
20+
},
21+
},
22+
crate_root = "src/lib.rs",
23+
deps = [
24+
"fbsource//third-party/rust:derive_more",
25+
"//common/rust/fbwhoami:fbwhoami",
26+
],
27+
)
28+
29+
cpp_library(
30+
name = "hostcaps_ffi",
31+
headers = ["hostcaps.h"],
32+
exported_deps = [
33+
":hostcaps",
34+
],
35+
)
36+
37+
rust_binary(
38+
name = "test-hostcaps",
39+
srcs = ["src/bin/test.rs"],
40+
crate_root = "src/bin/test.rs",
41+
deps = [":hostcaps"],
42+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "config",
7+
languages = [
8+
"py3",
9+
"rust",
10+
"python",
11+
],
12+
py3_namespace = "configerator",
13+
thrift_rust_options = "serde",
14+
thrift_srcs = {"hgclient.thrift": []},
15+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "blobimport_state",
7+
languages = ["py-deprecated"],
8+
no_plugin_deps = ["//thrift/annotation:all"],
9+
py_base_module = "configerator.blobimport_state",
10+
thrift_py_options = "json",
11+
thrift_srcs = {"state.thrift": None},
12+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "constants",
7+
languages = [
8+
"rust",
9+
"py-deprecated",
10+
],
11+
py_base_module = "configerator.mononoke",
12+
thrift_py_options = "json",
13+
thrift_rust_options = "serde",
14+
thrift_srcs = {"constants.thrift": None},
15+
deps = [
16+
"//configerator/structs/scm/mononoke/sharding:sharding",
17+
],
18+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "lfs_server_config",
7+
languages = [
8+
"rust",
9+
],
10+
thrift_rust_options = "serde",
11+
thrift_srcs = {"lfs_server.thrift": None},
12+
deps = [
13+
"//configerator/structs/scm/mononoke/ratelimiting:rate_limiting_config",
14+
"//thrift/annotation:rust",
15+
],
16+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "replication_lag_config",
7+
languages = [
8+
"rust",
9+
],
10+
thrift_rust_options = "serde",
11+
thrift_srcs = {"config.thrift": None},
12+
deps = [
13+
"//thrift/annotation:rust",
14+
],
15+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "observability_config",
7+
languages = [
8+
"py3",
9+
"rust",
10+
"cpp2",
11+
"python",
12+
],
13+
py3_namespace = "mononoke.observability",
14+
thrift_py_options = "json",
15+
thrift_rust_options = [
16+
"deprecated_default_enum_min_i32",
17+
"serde",
18+
],
19+
thrift_srcs = {"observability_config.thrift": None},
20+
deps = [
21+
"//thrift/annotation:rust",
22+
],
23+
)
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "qps_config",
7+
languages = [
8+
"py3",
9+
"rust",
10+
"cpp2",
11+
"python",
12+
],
13+
py3_namespace = "mononoke.qps",
14+
thrift_py_options = "json",
15+
thrift_rust_options = "serde",
16+
thrift_srcs = {"qps_config.thrift": None},
17+
deps = [
18+
"//thrift/annotation:rust",
19+
],
20+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "rate_limiting_config",
7+
languages = [
8+
"rust",
9+
],
10+
thrift_rust_options = [
11+
"deprecated_default_enum_min_i32",
12+
"serde",
13+
],
14+
thrift_srcs = {"ratelimits.thrift": None},
15+
deps = [
16+
"//thrift/annotation:cpp",
17+
"//thrift/annotation:rust",
18+
],
19+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "redaction_set",
7+
languages = [
8+
"rust",
9+
],
10+
thrift_py_options = "json",
11+
thrift_rust_options = "serde",
12+
thrift_srcs = {"redaction_set.thrift": None},
13+
deps = [
14+
"//thrift/annotation:rust",
15+
],
16+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "repos",
7+
languages = [
8+
"python",
9+
"rust",
10+
"py-deprecated",
11+
],
12+
py3_namespace = "mononoke.repos",
13+
py_base_module = "configerator.mononoke",
14+
rust_autocargo = {"cargo_toml_dir": "repos"},
15+
thrift_py_options = "json",
16+
thrift_rust_options = [
17+
"deprecated_default_enum_min_i32",
18+
"serde",
19+
],
20+
thrift_srcs = {"repos.thrift": None},
21+
deps = [
22+
"//thrift/annotation:rust",
23+
],
24+
)
25+
26+
thrift_library(
27+
name = "commitsync",
28+
languages = [
29+
"rust",
30+
"py-deprecated",
31+
],
32+
py_base_module = "configerator.mononoke",
33+
rust_autocargo = {"cargo_toml_dir": "commitsync"},
34+
thrift_py_options = "json",
35+
thrift_rust_options = "serde",
36+
thrift_srcs = {"commitsync.thrift": None},
37+
deps = [
38+
":repos",
39+
"//thrift/annotation:rust",
40+
],
41+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "sharding",
7+
languages = [
8+
"rust",
9+
"py-deprecated",
10+
],
11+
py_base_module = "configerator.mononoke",
12+
thrift_py_options = "json",
13+
thrift_rust_options = "serde",
14+
thrift_srcs = {"sharding.thrift": None},
15+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
2+
3+
oncall("source_control")
4+
5+
thrift_library(
6+
name = "xdb_gc_structs",
7+
languages = [
8+
"rust",
9+
"py-deprecated",
10+
],
11+
py_base_module = "configerator.mononoke",
12+
thrift_py_options = "json",
13+
thrift_rust_options = "serde",
14+
thrift_srcs = {"xdb_gc.thrift": None},
15+
deps = [
16+
"//thrift/annotation:rust",
17+
],
18+
)

0 commit comments

Comments
 (0)