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

melange build fails with "413 Request Entity Too Large" #964

Open
EirikAskheim opened this issue Jan 29, 2024 · 1 comment
Open

melange build fails with "413 Request Entity Too Large" #964

EirikAskheim opened this issue Jan 29, 2024 · 1 comment

Comments

@EirikAskheim
Copy link

EirikAskheim commented Jan 29, 2024

Not sure why it is failing with Request Entity Too Large. The application binary size is 7MiB.

ℹ️  x86_64    | pushing build image (336 MB) to [ttl.sh/melange@sha256:1ad1922ac8ff36abe5dd8ffd5cdb301c91c23a2cf985eb7caf79966d7d9a4579](http://ttl.sh/melange@sha256:1ad1922ac8ff36abe5dd8ffd5cdb301c91c23a2cf985eb7caf79966d7d9a4579)
ℹ️  x86_64    | error publishing build image: PATCH [https://ttl.sh/v2/melange/blobs/uploads/8fa98fe0-fa80-405b-a147-721005c1746f?_state=REDACTED:](https://ttl.sh/v2/melange/blobs/uploads/8fa98fe0-fa80-405b-a147-721005c1746f?_state=REDACTED) unexpected status code 413 Request Entity Too Large: <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
❌  x86_64    | ERROR: failed to build package. the build environment has been preserved:
ℹ️  x86_64    |   workspace dir: /tmp/melange-workspace-2706266495
ℹ️  x86_64    |   guest dir: /tmp/melange-guest-1008454417
ℹ️            | error during command execution: failed to build package: unable to build guest: PATCH [https://ttl.sh/v2/melange/blobs/uploads/8fa98fe0-fa80-405b-a147-721005c1746f?_state=REDACTED:](https://ttl.sh/v2/melange/blobs/uploads/8fa98fe0-fa80-405b-a147-721005c1746f?_state=REDACTED) unexpected status code 413 Request Entity Too Large: <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>cloudflare</center>
</body>
</html>

melange.yaml

package:
  name: application
  version: 0.2.4
  description: Description here
  target-architecture:
    - all
  copyright:
    - license: Apache-2.0
      paths:
        - "*"

environment:
  contents:
    repositories:
      - https://dl-cdn.alpinelinux.org/alpine/edge/main
      - https://dl-cdn.alpinelinux.org/alpine/edge/community
    packages:
      - alpine-baselayout-data
      - busybox
      - ca-certificates-bundle
      - cargo

pipeline:
  - name: Build Rust application
    runs: |
      TARGETDIR="$(mktemp -d)"
      cargo build --release --target-dir "${TARGETDIR}"
      mkdir -p "${{targets.destdir}}/usr/bin"
      mv "${TARGETDIR}/release/application" "${{targets.destdir}}/usr/bin"

The build runs on Kubernetes using the chainguard melange image.

melange build melange.yaml --runner kubernetes \
                           --arch amd64 \
                           --signing-key melange.rsa \
                           --apk-cache-dir=.apk-cache
@vaikas
Copy link
Member

vaikas commented Feb 1, 2024

I think this is because the ttl.sh has a size limit. You would have to push to a different registry, maybe like gcr.io? Or since you're running on k8s you can create a local registry.

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

No branches or pull requests

2 participants