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

fix(container): limit to platforms supported by github.com/buildpacks/lifecycle #3806

Conversation

iamleot
Copy link
Contributor

@iamleot iamleot commented May 9, 2024

"deploy" commands needs github.com/buildpacks/lifecycle and github.com/buildpacks/lifecycle/path is currently supported only by darwin, linux and windows.

Adjust the logic to only consider those 3 platforms instead of excluding only wasm and freebsd.


Noticed while building scw on NetBSD (but should affects all platforms that are not WASM, FreeBSD, macOS and Linux (e.g. other BSDs, Solaris)).

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

Fix support to more Unix-like (non-macOS/Linux/FreeBSD) platforms by disabling `container namespace deploy` command where it is not supported.

…/lifecycle

"deploy" commands needs github.com/buildpacks/lifecycle and
github.com/buildpacks/lifecycle/path is currently supported only by
darwin, linux and windows.

Adjust the logic to only consider those 3 platforms instead of
excluding only wasm and freebsd.
@iamleot iamleot marked this pull request as ready for review May 9, 2024 20:32
@iamleot
Copy link
Contributor Author

iamleot commented May 9, 2024

Only for the record here transcript on how build failed on NetBSD:

go: downloading github.com/prometheus/common v0.44.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.4
package github.com/scaleway/scaleway-cli/v2/cmd/scw
        imports github.com/scaleway/scaleway-cli/v2/internal/namespaces
        imports github.com/scaleway/scaleway-cli/v2/internal/namespaces/container/v1beta1
        imports github.com/buildpacks/pack/pkg/client
        imports github.com/buildpacks/lifecycle/phase
        imports github.com/buildpacks/lifecycle/cache
        imports github.com/buildpacks/lifecycle/platform
        imports github.com/buildpacks/lifecycle/internal/path: build constraints exclude all Go files in .../pkgsrc/wip/scaleway-cli/work/.gopath/pkg/mod/github.com/buildpacks/lifecycle@v0.18.5/internal/path

@iamleot
Copy link
Contributor Author

iamleot commented May 9, 2024

Related to / should probably limit what was intended to limit in #3109.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.11%. Comparing base (5bf53e0) to head (4a6d430).
Report is 50 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3806      +/-   ##
==========================================
- Coverage   75.45%   73.11%   -2.35%     
==========================================
  Files         202      280      +78     
  Lines       44323    49606    +5283     
==========================================
+ Hits        33444    36268    +2824     
- Misses       9653    11851    +2198     
- Partials     1226     1487     +261     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iamleot
Copy link
Contributor Author

iamleot commented May 17, 2024

If you think it is worth to rebase this branch on latest master please let me know and I will do that!

Thank you!

@Codelax
Copy link
Member

Codelax commented May 20, 2024

Hi, thank you for your contribution. I'm glad to see more platforms supported

@Codelax Codelax added this pull request to the merge queue May 20, 2024
Merged via the queue into scaleway:master with commit 24086ca May 20, 2024
12 checks passed
@iamleot
Copy link
Contributor Author

iamleot commented May 20, 2024

Yeah and that was easy! :)

I have packaged and imported scaleway-cli in pkgsrc as net/scaleway-cli and I will try to pay attention to the bulk logs also for other platforms (pkgsrc is the NetBSD package system but it supports a lot of operating systems, not just NetBSD).

Thanks Jules!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants