Commit Graph

12 Commits

Author SHA1 Message Date
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
Juan Bustamante 9bf04afbc4
Adding unit tests for issue 2384 (#2391)
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
2025-05-31 19:04:09 -05:00
Rashad Sirajudeen e4460f0259
Support docker uri for lifecycle (#2112)
The lifecycle image can be specified as a Docker URI  in the `builder.toml` when creating a builder

---------

Signed-off-by: Rashad Sirajudeen <rashad.20@cse.mrt.ac.lk>
Signed-off-by: Rashad Sirajudeen <rashadsirajudeen@gmail.com>
Signed-off-by: Juan Bustamante <bustamantejj@gmail.com>
Co-authored-by: Juan Bustamante <bustamantejj@gmail.com>
2025-05-27 01:30:03 +00:00
Juan Bustamante 35cf9beabc
fixing some feedback from review
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2024-05-20 09:59:24 -05:00
Juan Bustamante bad37a994d
Implementation of the multi-platform RFC - 0128
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2024-05-20 09:59:03 -05:00
Juan Bustamante cafced7884
Exposing the logic for processing the Docker Context to be public
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2024-04-04 09:06:09 -05:00
Juan Bustamante 5e5eb0863a
adding test coverage for pack builder create with flatten option
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-04-26 16:56:03 -05:00
Juan Bustamante ed319e0658
Adding test coverage
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-01-20 18:35:53 -05:00
Natalie Arellano 3f152ca6f5 Add more tests
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-22 16:08:42 -04:00
Natalie Arellano c393817c56 Add validation for extensions
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-15 12:31:47 -04:00
Natalie Arellano 7798d96490 WIP
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-05 14:23:29 -04:00
Javier Romero 8d7dbb9167 wip: initial restructure
Signed-off-by: Javier Romero <rjavier@vmware.com>
2021-11-01 14:00:44 -05:00