cog
259c7a64 - feat: decouple container SDK version from CLI version (#2771)

Commit
18 days ago
feat: decouple container SDK version from CLI version (#2771) * chore: rename COG_WHEEL env var to COG_SDK_WHEEL * feat: remove ContainsCoglet escape hatch; use COGLET_WHEEL to override coglet * feat: add IsPreRelease and ValidateSDKVersion helpers to wheels package - Remove version-pinning from ResolveCogWheel/ResolveCogletWheel; both now default to latest PyPI (version pinning moves to build.sdk_version) - Add IsPreRelease(version) bool for PEP 440 and semver pre-release detection - Add MinimumSDKVersion constant (0.16.0) and ValidateSDKVersion helper - Add baseVersionRe to strip pre-release suffix before version comparison - Update doc comments and tests to reflect new unpinned defaults * feat: add build.sdk_version config stanza to pin cog SDK version - Add SDKVersion field to Build struct in config.go and config_file.go - Add sdk_version to JSON schema (additionalProperties: false requires it) - Wire sdk_version into Dockerfile generator with correct precedence: COG_SDK_WHEEL env var > build.sdk_version > auto-detect/latest PyPI - Add --pre flag to cog and coglet pip installs when sdk_version is a pre-release (PEP 440 or semver); coglet also gets --pre since a pre- release sdk implies a matching pre-release coglet - Validate sdk_version >= 0.16.0 at Dockerfile generation time - Update existing TestCOGWheelEnvPyPIWithVersion to use a valid version - Add tests: TestInstallCogWithSDKVersion, TestInstallCogWithPreReleaseSDKVersion, TestInstallCogSDKVersionBelowMinimum, TestCOGSDKWheelEnvVarOverridesSDKVersion - Add config tests: TestSDKVersionConfig, TestSDKVersionConfigEmpty, TestSDKVersionConfigPreRelease, TestSDKVersionConfigBelowMinimumExplodesInGenerator - Document sdk_version in docs/yaml.md; regenerate docs/llms.txt * fix: emit loud actionable warning when cog/coglet found in requirements Previously the warning was vague. Now it tells the user exactly what the build system is installing instead, and which mechanism to use to control the version (build.sdk_version / COG_SDK_WHEEL / COGLET_WHEEL). Also refactors wheel config resolution into resolveCogWheelConfigs() so the resolved configs are available to filterManagedPackages() when it emits warnings, and to installCog() for the actual install — resolved once, shared between both.
Author
Parents
Loading