From 9fa0af4ab789eb296c09a7d55f03158f22d25dde Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Sat, 29 Aug 2026 21:36:20 -0700 Subject: [PATCH] Change default sidecar usage policy to disallow embedded fallback. PiperOrigin-RevId: 973308566 --- runsc/config/config.go | 4 ++-- runsc/config/flags.go | 2 +- test/compatibility/defs.bzl | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/runsc/config/config.go b/runsc/config/config.go index 0fbf02739a6..03b67b80418 100644 --- a/runsc/config/config.go +++ b/runsc/config/config.go @@ -1491,9 +1491,9 @@ func (p SidecarUsagePolicy) String() string { // if the on-disk sidecar binaries are not found. func (p SidecarUsagePolicy) AllowEmbeddedFallback() bool { switch p { - case SidecarUsageStrict: + case SidecarUsageDefault, SidecarUsageStrict: return false - case SidecarUsageDefault, SidecarUsageLegacyEmbedded: + case SidecarUsageLegacyEmbedded: return true default: panic(fmt.Sprintf("invalid sidecar usage policy: %q", p)) diff --git a/runsc/config/flags.go b/runsc/config/flags.go index f4852a70b0f..ecf3c4ef68b 100644 --- a/runsc/config/flags.go +++ b/runsc/config/flags.go @@ -118,7 +118,7 @@ func RegisterFlags(flagSet *flag.FlagSet) { flagSet.String("pod-init-config", "", "path to configuration file with additional steps to take during pod creation.") flagSet.Var(HostSettingsCheck.Ptr(), "host-settings", "how to handle non-optimal host kernel settings: check (default, advisory-only), ignore (do not check), adjust (best-effort auto-adjustment), or enforce (auto-adjustment must succeed).") flagSet.Var(SidecarReleaseIfReleaseBuild.Ptr(), "sidecar-release-enforcement-policy", "when spawned sidecar binaries must match runsc's release: NEVER, ALWAYS, or IF_RELEASE_BUILD. May be overridden by setting GVISOR_ENFORCE_RELEASE=SKIP as env var.") - flagSet.Var(SidecarUsageDefault.Ptr(), "sidecar-usage-policy", "policy for sidecar binaries: STRICT (sidecars must exist), LEGACY_DEPRECATED_SLOW_EMBEDDED_FALLBACK (use embedded fallbacks if sidecars are missing; will stop working after 2026-10). The DEFAULT policy will change to STRICT after 2026-09.") + flagSet.Var(SidecarUsageDefault.Ptr(), "sidecar-usage-policy", "policy for sidecar binaries: STRICT (sidecars must exist), LEGACY_DEPRECATED_SLOW_EMBEDDED_FALLBACK (use embedded fallbacks if sidecars are missing; will stop working after 2026-10).") flagSet.Var(RestoreSpecValidationEnforce.Ptr(), "restore-spec-validation", "how to handle spec validation during restore.") flagSet.Bool("systrap-disable-syscall-patching", false, "disables syscall patching when using the Systrap platform. May be necessary to use in case the workload uses the GS register, or uses ptrace within gVisor. Has significant performance implications and is only recommended when the sandbox is known to run otherwise-incompatible workloads. Only relevant for x86.") flagSet.Bool("systrap-disable-fast-path", false, "unconditionally disables the Systrap fast path.") diff --git a/test/compatibility/defs.bzl b/test/compatibility/defs.bzl index bfdd70ad6ed..98a626cfabf 100644 --- a/test/compatibility/defs.bzl +++ b/test/compatibility/defs.bzl @@ -32,8 +32,7 @@ def compatibility_test(name, srcs, deps = [], data = [], tags = [], size = "larg for suffix, runtime in _RUNTIMES: target_data = list(data) if runtime != "runc": - # runsc is needed to invalidate the bazel cache on any code change. - target_data = target_data + ["//runsc"] + target_data = target_data + ["//:release"] go_test( name = name + "_" + suffix, srcs = srcs,