Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wildcard stack for command pack buildpack package #1379

Closed
fg-j opened this issue Mar 3, 2022 · 6 comments
Closed

Support wildcard stack for command pack buildpack package #1379

fg-j opened this issue Mar 3, 2022 · 6 comments
Labels
good first issue A good first issue to get started with. status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Milestone

Comments

@fg-j
Copy link

fg-j commented Mar 3, 2022

Summary

When attempting to use pack buildpack package to package a composite buildpack that contains a buildpack whose [[stacks]] only contains one entry -- id = '*' and a buildpack that contains non-wildcard stacks, packaging fails with a stack incompatibility error

ERROR: no compatible stacks among provided buildpacks

despite the buildpacks actually being compatible.


Reproduction

Steps
  1. Clone my fork of the buildpacks samples repo and checkout the package-repro branch

  2. Using pack v0.24, run

 pack buildpack package my-buildpack --config ./package.toml
Current behavior

Packaging step fails with:

ERROR: saving image: no compatible stacks among provided buildpacks
Expected behavior

Expected packaging to succeed because the git buildpack specifies stack wildcard
and since * is an allowed stack id.


Environment

pack info
 pack report
Pack:
  Version:  0.24.0+git-79a40b7.build-3148
  OS/Arch:  darwin/amd64

Default Lifecycle Version:  0.13.3

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8

Config:
  default-builder-image = "[REDACTED]"
  experimental = true

  [[trusted-builders]]
    name = "[REDACTED]"
docker info
docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.7.1)
  compose: Docker Compose (Docker Inc., v2.2.3)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 4
  Running: 0
  Paused: 0
  Stopped: 4
 Images: 50
 Server Version: 20.10.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc version: v1.0.2-0-g52b36a2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.76-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 6
 Total Memory: 1.939GiB
 Name: docker-desktop
 ID: R35P:PIQ5:I7KO:2RSM:Y42L:OKP2:FUI4:PGQN:WGD4:YMJL:B55D:ND7S
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false
@fg-j fg-j added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Mar 3, 2022
@natalieparellano natalieparellano added status/ready Issue ready to be worked on. and removed status/triage Issue or PR that requires contributor attention. labels Mar 15, 2022
@natalieparellano natalieparellano added this to the 0.25.0 milestone Mar 15, 2022
@jromero jromero added type/enhancement Issue that requests a new feature or improvement. and removed type/bug Issue that reports an unexpected behaviour. labels Mar 23, 2022
@jromero jromero changed the title pack buildpack package fails with 'no compatible stacks' on wildcard stack Support wildcard stack for command pack buildpack package Mar 23, 2022
@jromero
Copy link
Member

jromero commented Mar 23, 2022

Converting this into a feature since it's technically a bug but more of a missing feature given that the buildpack API changed after the initial implementation.

We're happy to take any contributions for these changes. I believe they should be a "good first issue".

@jromero jromero added the good first issue A good first issue to get started with. label Mar 23, 2022
@sambhav
Copy link
Member

sambhav commented Apr 1, 2022

@jromero I think this would still be a bug fix given that #1234 added support for it. Would you be open to releasing a patch version of pack with this and a bunch of other wildcard stack fixes? This is currently blocking some work on our side. Happy to do the leg work to get the PRs out.

@jromero
Copy link
Member

jromero commented Apr 1, 2022

I'd be happy to support a patch if it's pressing and we can get a PR up from the latest released commit.

I say all this as long as there's no push back from @dfreilich ☺️

@sambhav
Copy link
Member

sambhav commented Apr 1, 2022

Created two PRs - one for main and one cherrypicked to release/0.24 branch. LMK if there's anything else I can do to move this forward.

@sambhav
Copy link
Member

sambhav commented Apr 2, 2022

This has been fixed and released in 0.24.1

@edmorley
Copy link
Contributor

edmorley commented Apr 4, 2022

This issue can be closed, since it was fixed by #1406. The milestone will also need changing back to 0.24.1 rather than 0.25.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with. status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants