Tags: buildpacks/pack
Tags
Execution Environment RFC Implementation (#2324) * WIP - adding flag to set the CNB_EXEC_ENV Signed-off-by: Juan Bustamante <[email protected]> * adding . and - to the regular expression to validate and cnn exec env Signed-off-by: Juan Bustamante <[email protected]> * WIP - adding exec-env on project.toml schema verion 0.3, it is still in progress Signed-off-by: Juan Bustamante <[email protected]> * fixing some lint errors Signed-off-by: Juan Bustamante <[email protected]> * WIP - refacting test case Signed-off-by: Juan Bustamante <[email protected]> * adding more test cases Signed-off-by: Juan Bustamante <[email protected]> * adding exec-env to builder.toml Signed-off-by: Juan Bustamante <[email protected]> * adding exec-env to builder.toml Signed-off-by: Juan Bustamante <[email protected]> * Adding unit test for exec-env in buildpack.toml Signed-off-by: Juan Bustamante <[email protected]> * Removing for now the platform API version validation Signed-off-by: Juan Bustamante <[email protected]> * Fixing unit tests Signed-off-by: Juan Bustamante <[email protected]> * fixing some unit tests Signed-off-by: Juan Bustamante <[email protected]> * Fixing formatting issue Signed-off-by: Juan Bustamante <[email protected]> * Test Coverage Improvements Summary Changes Made: 1. internal/build/lifecycle_executor.go (2 lines added) - Added Platform API versions 0.14 and 0.15 to SupportedPlatformAPIVersions - This allows pack to support the new execution environment feature which requires Platform API 0.15 2. internal/build/phase_config_provider.go (1 line changed) - Updated the Platform API version check from 0.13 to 0.15 for the CNB_EXEC_ENV environment variable 3. internal/build/fakes/fake_builder.go (7 lines added) - Added WithExecutionEnvironment() helper function for tests - Allows tests to easily set the execution environment in lifecycle options 4. internal/build/phase_config_provider_test.go (41 lines added) - Added comprehensive tests for the execution environment feature: - ✅ Test that CNB_EXEC_ENV is set when Platform API >= 0.15 - ✅ Test that CNB_EXEC_ENV is NOT set when Platform API < 0.15 - Added import for "github.com/buildpacks/lifecycle/api" package Existing Test Coverage (Already in PR): 1. internal/commands/build_test.go - ✅ Tests that default exec-env is 'production' - ✅ Tests with valid characters (letters, numbers, dots, hyphens) - ✅ Tests with invalid characters (shows proper error) - ✅ Comprehensive validation tests for exec-env flag 2. builder/config_reader_test.go - ✅ Tests reading exec-env from builder configuration 3. pkg/project/project_test.go - ✅ Tests reading exec-env from project.toml (schema v0.3) - ✅ Tests for buildpack groups, pre-groups, and post-groups Test Results: - All phase config provider tests: PASSING ✅ - All build command tests: PASSING ✅ - Coverage for exec-env flag validation: COMPLETE ✅ - Coverage for CNB_EXEC_ENV environment variable: COMPLETE ✅ - Coverage for Platform API version gating: COMPLETE ✅ The test coverage for your ExecutionEnvironment feature is now comprehensive and covers: - Command-line flag validation - Environment variable setting based on Platform API version - Builder and project configuration reading - Edge cases and error conditions Signed-off-by: Juan Bustamante <[email protected]> * Fixing Acceptance Tests API Platform expected versions Signed-off-by: Juan Bustamante <[email protected]> * fix: add missing api import in phase_config_provider_test Add missing import for github.com/buildpacks/lifecycle/api package required by execution environment tests that use api.MustParse(). The tests added in this branch for CNB_EXEC_ENV functionality reference api.Version and api.MustParse() but the import was missing, causing compilation errors after merging latest changes from main. Co-Authored-By: Claude Sonnet 4.5 <[email protected]> Signed-off-by: Juan Bustamante <[email protected]> --------- Signed-off-by: Juan Bustamante <[email protected]> Co-authored-by: Claude Sonnet 4.5 <[email protected]>
fix: upgrade Go to 1.25.5 to address CVE-2025-61729 and CVE-2025-61727 ( #2501) This commit updates the Go version from 1.25.3 to 1.25.5 to fix two security vulnerabilities in the Go standard library. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Juan Bustamante <[email protected]> Co-authored-by: Claude Sonnet 4.5 <[email protected]>
fix: upgrade imgutil to fix containerd snapshotter issue (#2493) Upgrades imgutil from v0.0.0-20250814164739-4b1c8875ba7e to v0.0.0-20250909162057-9db16db815e3 to fix an issue where builder images created with Docker's containerd snapshotter storage driver had malformed manifests. The bug caused the first several base image layers to be replaced with empty blob references in the manifest, while the config retained correct diff_ids. This created invalid images that failed OCI spec validation with tools like skopeo. The fix was already merged in buildpacks/imgutil#297, which reverted the problematic "fast path" optimization commits. Resolves #2490 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Juan Bustamante <[email protected]> Co-authored-by: Claude <[email protected]>
fix: upgrade imgutil to fix containerd snapshotter issue (#2493) Upgrades imgutil from v0.0.0-20250814164739-4b1c8875ba7e to v0.0.0-20250909162057-9db16db815e3 to fix an issue where builder images created with Docker's containerd snapshotter storage driver had malformed manifests. The bug caused the first several base image layers to be replaced with empty blob references in the manifest, while the config retained correct diff_ids. This created invalid images that failed OCI spec validation with tools like skopeo. The fix was already merged in buildpacks/imgutil#297, which reverted the problematic "fast path" optimization commits. Resolves #2490 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Juan Bustamante <[email protected]> Co-authored-by: Claude <[email protected]>
fix: update lifecycle API validation for experimental flag solve issue … …#2414 (#2432) * fix: allow image extensions based on buildpack API Signed-off-by: vky5 <[email protected]> * Move extension validation to client layer and check Platform API version - Move validation from command layer (builder_create.go, create_builder.go) to client layer (pkg/client/create_builder.go) - Check Platform API version instead of lifecycle version to determine if extensions are stable (>= 0.13) or experimental (< 0.13) - Use lifecycle's LessThan() method for version comparison - Add comprehensive tests for Platform API validation scenarios: * Platform API >= 0.13 allows extensions without experimental flag * Platform API < 0.13 requires experimental flag for extensions * Builders without extensions work regardless of Platform API version - Create platform-0.13 test lifecycle data with Platform API 0.3-0.13 - Add prepareExtensions() test helper that configures both extensions and appropriate lifecycle for testing This fixes the issue where users get experimental extension errors even when using lifecycle with Platform API 0.13 where extensions are stable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Juan Bustamante <[email protected]> * Run make format to remove extra blank lines 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Juan Bustamante <[email protected]> * Fix linting errors by removing deprecated API usage - Remove fallback to deprecated descriptor.API.PlatformVersion - Use only descriptor.APIs.Platform.Supported (new API) - Skip validation if Platform API information is unavailable - Remove unused github.com/buildpacks/lifecycle/api import This fixes staticcheck SA1019 warnings about using deprecated API fields. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Juan Bustamante <[email protected]> --------- Signed-off-by: vky5 <[email protected]> Signed-off-by: Juan Bustamante <[email protected]> Co-authored-by: Juan Bustamante <[email protected]> Co-authored-by: Claude <[email protected]>
Fixing build-additional-arch for windows Signed-off-by: Juan Bustamante <[email protected]>
PreviousNext