Skip to content

Commit

Permalink
Re-sync with internal repository (#277)
Browse files Browse the repository at this point in the history
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
  • Loading branch information
facebook-github-bot authored Feb 5, 2025
1 parent 2bcd7c8 commit cb43109
Show file tree
Hide file tree
Showing 40 changed files with 117 additions and 117 deletions.
4 changes: 2 additions & 2 deletions antlir/BUCK
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @oss-disable:
# @oss-disable
load("//antlir/bzl:build_defs.bzl", "buck_sh_binary", "export_file", "python_binary", "python_library", "rust_binary", "rust_library", "third_party")
load("//antlir/rust:defs.bzl", "antlir_rust_extension")

Expand Down Expand Up @@ -89,7 +89,7 @@ rust_library(
"tempfile",
],
# Test relies on the repo which is not present on aarch64 RE
# @oss-disable:
# @oss-disable
visibility = ["PUBLIC"],
deps = [
"thiserror",
Expand Down
2 changes: 1 addition & 1 deletion antlir/antlir2/antlir2_compile/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rust_library(
name = "antlir2_compile",
srcs = glob([
"src/**/*.rs",
# @oss-disable:
# @oss-disable
]),
deps = [
"anyhow",
Expand Down
4 changes: 2 additions & 2 deletions antlir/antlir2/antlir2_isolate/isolate_unshare/BUCK
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @oss-disable:
# @oss-disable
load("//antlir/antlir2/bzl/feature:defs.bzl", "feature")
load("//antlir/antlir2/bzl/image:defs.bzl", "image")
load("//antlir/antlir2/testing:image_test.bzl", "image_rust_test")
Expand Down Expand Up @@ -77,7 +77,7 @@ image_rust_test(
"ovr_config//cpu:arm64": ["ovr_config//cpu:arm64"],
"ovr_config//cpu:x86_64": ["ovr_config//cpu:x86_64"],
}),
# @oss-disable:
# @oss-disable
layer = ":test-layer",
# execute the test with isolate_unshare not systemd-nspawn
rootless = True,
Expand Down
4 changes: 2 additions & 2 deletions antlir/antlir2/antlir2_receive/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ rust_binary(
deps = [
"anyhow",
"clap",
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
"tar",
"tempfile",
"thiserror",
Expand Down
26 changes: 13 additions & 13 deletions antlir/antlir2/antlir2_vm/bzl/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
load("@prelude//utils:selects.bzl", "selects")
load("//antlir/antlir2/bzl:platform.bzl", "arch_select", "rule_with_default_target_platform")
load("//antlir/antlir2/testing:image_test.bzl", "HIDE_TEST_LABELS")
load("//antlir/buck2/bzl:ensure_single_output.bzl", "ensure_single_output")
load("//antlir/bzl:build_defs.bzl", "add_test_framework_label", "buck_sh_test", "cpp_unittest", "python_unittest", "rust_unittest")
# @oss-disable:
# @oss-disable

load("//antlir/bzl:oss_shim.bzl", "NAMING_ROLLOUT_LABEL", "special_tags", "fully_qualified_test_name_rollout") # @oss-enable
load(":types.bzl", "VMHostInfo")
Expand All @@ -24,8 +24,8 @@ def _impl(ctx: AnalysisContext) -> list[Provider]:
]

# Extend tpx timeout to 100 minutes if we exceed the default 10 min plus buffer
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable

common_args = cmd_args(
cmd_args(ensure_single_output(ctx.attrs.vm_host[VMHostInfo].image), format = "--image={}"),
Expand Down Expand Up @@ -176,11 +176,11 @@ def _get_internal_labels(test_rule, run_as_bundle: bool) -> (list[str], list[str
wrapper_labels = add_test_framework_label(wrapper_labels, "test-framework=8:vmtest")

# never schedule any CI on this inner target
# @oss-disable:
# @oss-disable

# don't run dev mode for vmtests
ci_labels = []
# @oss-disable:
# @oss-disable

return inner_labels, wrapper_labels, ci_labels

Expand Down Expand Up @@ -222,11 +222,11 @@ def _implicit_vm_test(
wrapper_labels.extend(_add_outer_labels)
inner_labels = []

# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
labels = ["uses_sudo"]
# @oss-disable:
# @oss-disable

inner_test_name = name + "_vm_test_inner"
test_rule(
Expand All @@ -253,7 +253,7 @@ def _implicit_vm_test(
vm_cpp_test = partial(
_implicit_vm_test,
cpp_unittest,
# @oss-disable:
# @oss-disable
supports_static_listing = False,
)
vm_python_test = partial(_implicit_vm_test, python_unittest, supports_static_listing = False)
Expand Down
4 changes: 2 additions & 2 deletions antlir/antlir2/appliance_vm/impl/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ oncall("antlir")

git_fetch(
name = "kernel.git",
# @oss-disable:
# @oss-disable
repo = "https://github.com/torvalds/linux.git", # @oss-enable
# @oss-disable:
# @oss-disable
rev = "a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6", # @oss-enable
)

Expand Down
8 changes: 4 additions & 4 deletions antlir/antlir2/bzl/binaries_require_repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ _select_value = select({
# For unknown build modes, we don't know if the repo is
# required, so err on the side of caution and include it.
"DEFAULT": True,
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
})

def _binary_is_standalone(dep: Dependency) -> bool:
Expand Down
4 changes: 2 additions & 2 deletions antlir/antlir2/bzl/configured_alias.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load("//antlir/antlir2/antlir2_rootless:package.bzl", "get_antlir2_rootless")
load("//antlir/antlir2/bzl:platform.bzl", "rule_with_default_target_platform")
load("//antlir/antlir2/bzl:selects.bzl", "selects")
load("//antlir/antlir2/bzl/image:cfg.bzl", "cfg_attrs")
# @oss-disable:
# @oss-disable
load("//antlir/antlir2/cfg/systemd:defs.bzl", "systemd_cfg")
load("//antlir/antlir2/os:cfg.bzl", "os_transition", "os_transition_refs")
load("//antlir/bzl:build_defs.bzl", "get_visibility")
Expand Down Expand Up @@ -65,7 +65,7 @@ _transition = transition(
"arch.aarch64": "ovr_config//cpu/constraints:arm64",
"arch.x86_64": "ovr_config//cpu/constraints:x86_64",
} | (
# @oss-disable:
# @oss-disable
{} # @oss-enable
) | os_transition_refs() | rootless_cfg.refs | systemd_cfg.refs,
attrs = cfg_attrs().keys(),
Expand Down
6 changes: 3 additions & 3 deletions antlir/antlir2/bzl/dnf/reflink.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# LICENSE file in the root directory of this source tree.

REFLINK_FLAVORS = {
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
}

def rpm2extents(
Expand Down
16 changes: 8 additions & 8 deletions antlir/antlir2/bzl/feature/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
load("//antlir/antlir2/features/clone:clone.bzl", "clone")
load("//antlir/antlir2/features/ensure_dir_exists:ensure_dir_exists.bzl", "ensure_dirs_exist", "ensure_subdirs_exist")
load("//antlir/antlir2/features/extract:extract.bzl", "extract_buck_binary", "extract_from_layer")
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
load("//antlir/antlir2/features/genrule:genrule.bzl", "genrule")
load("//antlir/antlir2/features/group:group.bzl", "group_add")
load("//antlir/antlir2/features/hardlink:hardlink.bzl", "hardlink")
Expand Down Expand Up @@ -51,8 +51,8 @@ feature = struct(
usermod = usermod,
group_add = group_add,
standard_user = standard_user,
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
)
26 changes: 13 additions & 13 deletions antlir/antlir2/bzl/feature/feature.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ load("//antlir/antlir2/features/clone:clone.bzl", "clone_rule")
load("//antlir/antlir2/features/dot_meta:dot_meta.bzl", "dot_meta_rule")
load("//antlir/antlir2/features/ensure_dir_exists:ensure_dir_exists.bzl", "ensure_dir_exists_rule")
load("//antlir/antlir2/features/extract:extract.bzl", "extract_buck_binary_rule", "extract_from_layer_rule")
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
load("//antlir/antlir2/features/genrule:genrule.bzl", "genrule_rule")
load("//antlir/antlir2/features/group:group.bzl", "group_rule")
load("//antlir/antlir2/features/hardlink:hardlink.bzl", "hardlink_rule")
Expand Down Expand Up @@ -106,11 +106,11 @@ _anon_rules = {
"ensure_file_symlink": ensure_file_symlink_rule,
"extract_buck_binary": extract_buck_binary_rule,
"extract_from_layer": extract_from_layer_rule,
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable:
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
# @oss-disable
"genrule": genrule_rule,
"group": group_rule,
"hardlink": hardlink_rule,
Expand All @@ -124,7 +124,7 @@ _anon_rules = {
"user": user_rule,
"user_mod": usermod_rule,
}
# @oss-disable:
# @oss-disable

def _impl(ctx: AnalysisContext) -> list[Provider] | Promise:
# Merge inline features into a single JSON file
Expand Down Expand Up @@ -245,7 +245,7 @@ _nested_feature_type = attrs.option(
attrs.string(),
attrs.one_of(
attrs.dep(),
# @oss-disable:
# @oss-disable
),
doc = "ParseTimeFeature.deps",
),
Expand Down
4 changes: 2 additions & 2 deletions antlir/antlir2/bzl/flavor/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

load("//antlir/antlir2/bzl:platform.bzl", "rule_with_default_target_platform")
load("//antlir/antlir2/bzl:types.bzl", "BuildApplianceInfo", "FlavorDnfInfo", "FlavorInfo")
# @oss-disable:
# @oss-disable
load("//antlir/antlir2/package_managers/dnf/rules:repo.bzl", "RepoSetInfo")

_flavor_attrs = {
Expand Down Expand Up @@ -43,7 +43,7 @@ def _impl(ctx: AnalysisContext) -> list[Provider]:
"default_build_appliance": ctx.attrs.default_build_appliance.providers,
"default_versionlock": [DefaultInfo(ctx.attrs.default_dnf_versionlock)],
}),
# @oss-disable:
# @oss-disable
] # @oss-enable

_flavor = rule(
Expand Down
6 changes: 3 additions & 3 deletions antlir/antlir2/bzl/image/cfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ load("//antlir/antlir2/antlir2_rootless:cfg.bzl", "rootless_cfg")
load("//antlir/antlir2/bzl:types.bzl", "FlavorInfo")

load("//antlir/bzl:oss_shim.bzl", fb_cfg_attrs = "empty_dict", fb_refs = "empty_dict", fb_transition = "ret_none") # @oss-enable
# @oss-disable:
# @oss-disable
load("//antlir/antlir2/cfg/systemd:defs.bzl", "systemd_cfg")
load("//antlir/antlir2/os:cfg.bzl", "os_transition", "os_transition_refs")
load("//antlir/antlir2/os:oses.bzl", "OSES")
Expand All @@ -39,7 +39,7 @@ def cfg_attrs():
doc = "Underlying on-disk format for the layer build",
),
} | (
# @oss-disable:
# @oss-disable
{} # @oss-enable
) | rootless_cfg.attrs | systemd_cfg.attrs

Expand Down Expand Up @@ -127,7 +127,7 @@ layer_cfg = transition(
"working_format.btrfs": "antlir//antlir/antlir2/cfg:btrfs",
"working_format.overlayfs": "antlir//antlir/antlir2/cfg:overlayfs",
} | (
# @oss-disable:
# @oss-disable
{} # @oss-enable
) | os_transition_refs() | rootless_cfg.refs | systemd_cfg.refs,
attrs = cfg_attrs().keys(),
Expand Down
10 changes: 5 additions & 5 deletions antlir/antlir2/bzl/image/layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ load("//antlir/antlir2/bzl:types.bzl", "BuildApplianceInfo", "FeatureInfo", "Fla
load("//antlir/antlir2/bzl/feature:feature.bzl", "feature_attrs", "feature_rule", "reduce_features", "shared_features_attrs")

load("//antlir/bzl:oss_shim.bzl", all_fbpkg_mounts = "ret_empty_list") # @oss-enable
# @oss-disable:
# @oss-disable

load("//antlir/bzl:oss_shim.bzl", fb_defaults = "empty_dict") # @oss-enable
# @oss-disable:
# @oss-disable
load(
"//antlir/antlir2/features/mount:mount.bzl",
"DefaultMountpointInfo",
)
load("//antlir/antlir2/os:package.bzl", "get_default_os_for_package")
# @oss-disable:
# @oss-disable
load("//antlir/antlir2/package_managers/dnf/rules:repo.bzl", "RepoInfo", "RepoSetInfo")
load("//antlir/bzl:build_defs.bzl", "config", "get_visibility")
load("//antlir/bzl:constants.bzl", "REPO_CFG")
Expand Down Expand Up @@ -493,7 +493,7 @@ def _impl_with_features(features: ProviderCollection, *, ctx: AnalysisContext) -

parent_layer_info = ctx.attrs.parent_layer[LayerInfo] if ctx.attrs.parent_layer else None
mounts = all_mounts(features = all_features, parent_layer = parent_layer_info)
# @oss-disable:
# @oss-disable

sub_targets["debug"] = [DefaultInfo(sub_targets = debug_sub_targets)]

Expand Down Expand Up @@ -776,7 +776,7 @@ def layer(
name = name,
parent_layer = parent_layer,
default_os = default_os,
# @oss-disable:
# @oss-disable
rootless = rootless,
visibility = get_visibility(visibility),
target_compatible_with = target_compatible_with,
Expand Down
4 changes: 2 additions & 2 deletions antlir/antlir2/bzl/package/cfg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load("//antlir/antlir2/bzl:types.bzl", "LayerInfo")
load("//antlir/antlir2/bzl/image:cfg.bzl", _cfg_attrs = "cfg_attrs")

load("//antlir/bzl:oss_shim.bzl", fb_cfg_attrs = "empty_dict", fb_refs = "empty_dict", fb_transition = "ret_none") # @oss-enable
# @oss-disable:
# @oss-disable
load("//antlir/antlir2/cfg/systemd:defs.bzl", "systemd_cfg")
load("//antlir/antlir2/os:cfg.bzl", "os_transition", "os_transition_refs")
load("//antlir/bzl:internal_external.bzl", "is_facebook")
Expand Down Expand Up @@ -74,7 +74,7 @@ package_cfg = transition(
"arch.aarch64": "ovr_config//cpu/constraints:arm64",
"arch.x86_64": "ovr_config//cpu/constraints:x86_64",
} | (
# @oss-disable:
# @oss-disable
{} # @oss-enable
) | rootless_cfg.refs | systemd_cfg.refs,
attrs = cfg_attrs().keys(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _strip_configuration_transition = transition(
def _strip_configuration_impl(ctx: AnalysisContext) -> list[Provider]:
if ctx.label.package not in [
"antlir/antlir2/cfg/strip_configuration/tests",
# @oss-disable:
# @oss-disable
]:
fail("""
target is in {} which is not an allowed package.
Expand Down
2 changes: 1 addition & 1 deletion antlir/antlir2/features/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ load(
load("@prelude//rust:link_info.bzl", "RustLinkInfo")
load("@prelude//utils:selects.bzl", "selects")
load("//antlir/antlir2/bzl:platform.bzl", "rule_with_default_target_platform")
# @oss-disable:
# @oss-disable
load("//antlir/buck2/bzl:ensure_single_output.bzl", "ensure_single_output")
load("//antlir/bzl:build_defs.bzl", "rust_library")
load("//antlir/bzl:oss_shim.bzl", blocklist_deps_test = "ret_none") # @oss-enable
Expand Down
Loading

0 comments on commit cb43109

Please sign in to comment.