pack icon indicating copy to clipboard operation
pack copied to clipboard

Removing validation of deprecated io.buildpacks.stack.id

Open pglushko opened this issue 10 months ago • 3 comments

Summary

Replaces the error with a warning.

Output

Warning: No schema version declared in project.toml, defaulting to schema version 0.1 latest: Pulling from paketobuildpacks/builder-jammy-base Digest: sha256:9bb4d01f8d42ccb9aa3b6b10a5876c8913e3ba9709882f18c9bd8c54f46d862b Status: Image is up to date for paketobuildpacks/builder-jammy-base:latest latest: Pulling from buildpacks/builder/php Digest: sha256:91065e07a53b1c048fcaf8e49936a9d19c388b2dfdf2e7e589885aab2f5aae79 Status: Image is up to date for gcr.io/buildpacks/builder/php:latest Warning: deprecated usage of stack

Before

Error message that interrupted build process

After

Warning message, build continues

Documentation

https://buildpacks.io/docs/for-app-developers/concepts/base-images/stack/

  • Should this change be documented?
    • [ ] Yes, see #___
    • [ x] No, already documented in docs

Related

#2104

Resolves #2104

pglushko avatar Apr 07 '24 18:04 pglushko

@natalieparellano I've changed validation to warning, and build process continues, but now there is error on next step. I am new to pack and it would be great if someone familiar with the project would assist me

After change I tried to executed command mentioned in issue got nil pointer dereference

./out/pack build stack-validation --builder paketobuildpacks/builder-jammy-base --run-image gcr.io/buildpacks/builder/php:latest

Warning: No schema version declared in project.toml, defaulting to schema version 0.1 latest: Pulling from paketobuildpacks/builder-jammy-base Digest: sha256:9bb4d01f8d42ccb9aa3b6b10a5876c8913e3ba9709882f18c9bd8c54f46d862b Status: Image is up to date for paketobuildpacks/builder-jammy-base:latest latest: Pulling from buildpacks/builder/php Digest: sha256:91065e07a53b1c048fcaf8e49936a9d19c388b2dfdf2e7e589885aab2f5aae79 Status: Image is up to date for gcr.io/buildpacks/builder/php:latest Warning: deprecated usage of stack panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x6d133f] goroutine 1 [running]: github.com/buildpacks/pack/pkg/dist.GetLabel({0x0?, 0x0?}, {0x12c9046, 0x1a}, {0x1097760, 0xc0002409c0}) github.com/buildpacks/pack/pkg/dist/image.go:31 +0x3f github.com/buildpacks/pack/pkg/client.(*Client).Build(, {, _}, {{0x0, 0x0}, {0x7fff85335d27, 0x10}, {0x7fff85335d42, 0x23}, {0x0, ...}, ...}) github.com/buildpacks/pack/pkg/client/build.go:374 +0x111d github.com/buildpacks/pack/internal/commands.Build.func1(0xc000526900, {0xc0000caaa0?, 0x0?, 0x0?}) github.com/buildpacks/pack/internal/commands/build.go:157 +0x12f8 github.com/buildpacks/pack/internal/commands.Build.logError.func3(0xc000492600?, {0xc0000caaa0?, 0x4?, 0x12ac3b2?}) github.com/buildpacks/pack/internal/commands/commands.go:58 +0x44 github.com/spf13/cobra.(*Command).execute(0xc000526900, {0xc0000caa50, 0x5, 0x5}) github.com/spf13/[email protected]/command.go:983 +0xabc github.com/spf13/cobra.(*Command).ExecuteC(0xc000526600) github.com/spf13/[email protected]/command.go:1115 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/[email protected]/command.go:1039 github.com/spf13/cobra.(*Command).ExecuteContext(0x14930c0?, {0x148ad98?, 0xc0000ca960?}) github.com/spf13/[email protected]/command.go:1032 +0x47 main.main() github.com/buildpacks/pack/cmd/pack/main.go:26 +0xd5

pglushko avatar Apr 07 '24 18:04 pglushko

@pglushko thanks for making the changes. I think we now need to update the acceptance test here: https://github.com/buildpacks/pack/blob/12b7d24b06505e4915c679c58e4819c769217eaf/acceptance/acceptance_test.go#L1823 to expect a warning instead of a failure.

natalieparellano avatar Apr 26 '24 16:04 natalieparellano

@pglushko any further updates here? Are you able to update the acceptance test? It would be nice to land this in the next pack version.

natalieparellano avatar Jul 01 '24 19:07 natalieparellano