mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
codex: fix CI failure on PR #19761
This commit is contained in:
@@ -55,6 +55,7 @@ jobs:
|
||||
python3 ./scripts/stage_npm_packages.py \
|
||||
--release-version "$CODEX_VERSION" \
|
||||
--workflow-url "$WORKFLOW_URL" \
|
||||
--skip-native-component devicecheck-probe \
|
||||
--package codex \
|
||||
--output-dir "$OUTPUT_DIR"
|
||||
PACK_OUTPUT="${OUTPUT_DIR}/codex-npm-${CODEX_VERSION}.tgz"
|
||||
|
||||
@@ -138,6 +138,17 @@ def parse_args() -> argparse.Namespace:
|
||||
type=Path,
|
||||
help="Directory containing pre-installed native binaries to bundle (vendor root).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-native-component",
|
||||
dest="skip_native_components",
|
||||
action="append",
|
||||
default=[],
|
||||
choices=tuple(COMPONENT_DEST_DIR),
|
||||
help=(
|
||||
"Skip one native component while staging. May be repeated. "
|
||||
"Intended for historical-artifact smoke tests only."
|
||||
),
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@@ -161,7 +172,11 @@ def main() -> int:
|
||||
stage_sources(staging_dir, version, package)
|
||||
|
||||
vendor_src = args.vendor_src.resolve() if args.vendor_src else None
|
||||
native_components = PACKAGE_NATIVE_COMPONENTS.get(package, [])
|
||||
native_components = [
|
||||
component
|
||||
for component in PACKAGE_NATIVE_COMPONENTS.get(package, [])
|
||||
if component not in args.skip_native_components
|
||||
]
|
||||
target_filter = PACKAGE_TARGET_FILTERS.get(package)
|
||||
|
||||
if native_components:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use super::AttestationPurpose;
|
||||
use super::AttestationPurpose;
|
||||
use super::AuthRequestTelemetryContext;
|
||||
use super::ModelClient;
|
||||
use super::PendingUnauthorizedRetry;
|
||||
|
||||
@@ -58,14 +58,24 @@ def parse_args() -> argparse.Namespace:
|
||||
action="store_true",
|
||||
help="Retain temporary staging directories instead of deleting them.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-native-component",
|
||||
dest="skip_native_components",
|
||||
action="append",
|
||||
default=[],
|
||||
help=(
|
||||
"Skip one native component while staging. May be repeated. "
|
||||
"Intended for historical-artifact smoke tests only."
|
||||
),
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def collect_native_components(packages: list[str]) -> set[str]:
|
||||
def collect_native_components(packages: list[str], skipped_components: set[str]) -> set[str]:
|
||||
components: set[str] = set()
|
||||
for package in packages:
|
||||
components.update(PACKAGE_NATIVE_COMPONENTS.get(package, []))
|
||||
return components
|
||||
return components - skipped_components
|
||||
|
||||
|
||||
def expand_packages(packages: list[str]) -> list[str]:
|
||||
@@ -146,7 +156,8 @@ def main() -> int:
|
||||
runner_temp = Path(os.environ.get("RUNNER_TEMP", tempfile.gettempdir()))
|
||||
|
||||
packages = expand_packages(list(args.packages))
|
||||
native_components = collect_native_components(packages)
|
||||
skipped_components = set(args.skip_native_components)
|
||||
native_components = collect_native_components(packages, skipped_components)
|
||||
|
||||
vendor_temp_root: Path | None = None
|
||||
vendor_src: Path | None = None
|
||||
@@ -184,6 +195,8 @@ def main() -> int:
|
||||
|
||||
if vendor_src is not None:
|
||||
cmd.extend(["--vendor-src", str(vendor_src)])
|
||||
for component in sorted(skipped_components):
|
||||
cmd.extend(["--skip-native-component", component])
|
||||
|
||||
try:
|
||||
run_command(cmd)
|
||||
|
||||
Reference in New Issue
Block a user