pack/pkg/client/testdata
Vaibhav Yadav e45b434cd4
fix: update lifecycle API validation for experimental flag solve issue #2414 (#2432)
* fix: allow image extensions based on buildpack API

Signed-off-by: vky5 <vky05@proton.me>

* 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 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>

* Run make format to remove extra blank lines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>

* 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 <noreply@anthropic.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>

---------

Signed-off-by: vky5 <vky05@proton.me>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
Co-authored-by: Juan Bustamante <bustamantejj@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-23 16:08:54 -05:00
..
buildpack
buildpack-api-0.4
buildpack-flatten
buildpack-multi-platform
buildpack-non-deterministic
buildpack2
docker-context
downloader/dirA
extension
extension-api-0.9
lifecycle
registry
some-app
builder.toml
empty-file
jar-file.jar
just-a-file.txt
non-zip-file
zip-file.zip