Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

CI now builds and runs cfug/httpbun from the feat/dio branch instead of pulling sharat87/httpbun from Docker Hub, ensuring tests run against the feature branch implementation.

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures
  • I have updated the CHANGELOG.md in the corresponding package

Additional context and info (if any)

Changes:

  • Set up Go (v1.21) for building httpbun binaries
  • Install task tool required by httpbun's build system
  • Clone cfug/httpbun (feat/dio branch) during workflow setup
  • Build httpbun binaries using task docker before Docker image creation
  • Build local Docker image httpbun:feat-dio from cloned repo with pre-built binaries
  • Run locally built image for tests
  • Remove --pull always flag (no longer needed)

Why these steps are needed:
The cfug/httpbun repository uses a FROM scratch Dockerfile that expects pre-built Go binaries to exist in the bin/ directory before building the Docker image. Without building these binaries first using the repository's Taskfile (task docker), the Docker build fails with "bin/httpbun-docker-amd64: not found" error.

# Set up Go and task tool for building httpbun binaries
- name: Set up Go for httpbun
  uses: actions/setup-go@v5
  with:
    go-version: '1.21'
- name: Install task for httpbun build
  run: |
    curl --silent --show-error --location 'https://github.com/go-task/task/releases/download/v3.29.1/task_linux_amd64.tar.gz' \
      | sudo tar -xzf - -C /usr/local/bin task

# Clone, build binaries, create Docker image, and run
- name: Start local httpbun
  run: |
    mkcert -install
    mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' httpbun.local
    echo '127.0.0.1 httpbun.local' | sudo tee --append /etc/hosts
    git clone --depth 1 --branch feat/dio https://github.com/cfug/httpbun.git /tmp/httpbun
    cd /tmp/httpbun
    task docker
    docker build -t httpbun:feat-dio /tmp/httpbun
    docker run \
      --name httpbun \
      --detach \
      --publish 443:443 \
      --volume /tmp:/tmp:ro \
      --env HTTPBUN_TLS_CERT=/tmp/cert.pem \
      --env HTTPBUN_TLS_KEY=/tmp/key.pem \
      httpbun:feat-dio
    sleep 1
    curl --fail --silent --show-error https://httpbun.local/any
Original prompt

Replace the docker run that pulls sharat87/httpbun in .github/workflows/tests.yml with steps that clone and build the cfug/httpbun repo from the feat/dio branch and run the built image locally for tests.

Change details:

  • File: .github/workflows/tests.yml
  • Goal: Instead of pulling sharat87/httpbun from Docker Hub, clone https://github.com/cfug/httpbun at branch feat/dio, build a local Docker image, and run that image for the CI test step. Keep the mkcert and host setup as-is.

Please update the file so the "Start local httpbun" step runs the following commands (preserve existing surrounding steps and the rest of the workflow):

  • name: Start local httpbun
    run: |
    mkcert -install
    mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' httpbun.local
    echo '127.0.0.1 httpbun.local' | sudo tee --append /etc/hosts

    Clone the cfug/httpbun repository and checkout the feat/dio branch

    git clone --depth 1 --branch feat/dio https://github.com/cfug/httpbun.git /tmp/httpbun

    Build a local Docker image named httpbun:feat-dio from the repo

    docker build -t httpbun:feat-dio /tmp/httpbun

    Run the built image instead of pulling from Docker Hub

    docker run
    --name httpbun
    --detach
    --publish 443:443
    --volume /tmp:/tmp:ro
    --env HTTPBUN_TLS_CERT=/tmp/cert.pem
    --env HTTPBUN_TLS_KEY=/tmp/key.pem
    httpbun:feat-dio
    sleep 1
    curl --fail --silent --show-error https://httpbun.local/any

Submit a pull request on branch: ci/use-httpbun-feat-dio (create this branch) targeting main with a clear commit message and PR title using the problem title above. The PR should include a single commit updating .github/workflows/tests.yml with the modified contents.

Provide a brief PR description explaining the change and why: builds and uses cfug/httpbun from feat/dio to ensure tests run against the feature branch implementation instead of pulling an external image.

This pull request was created as a result of the following prompt from Copilot chat.

Replace the docker run that pulls sharat87/httpbun in .github/workflows/tests.yml with steps that clone and build the cfug/httpbun repo from the feat/dio branch and run the built image locally for tests.

Change details:

  • File: .github/workflows/tests.yml
  • Goal: Instead of pulling sharat87/httpbun from Docker Hub, clone https://github.com/cfug/httpbun at branch feat/dio, build a local Docker image, and run that image for the CI test step. Keep the mkcert and host setup as-is.

Please update the file so the "Start local httpbun" step runs the following commands (preserve existing surrounding steps and the rest of the workflow):

  • name: Start local httpbun
    run: |
    mkcert -install
    mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' httpbun.local
    echo '127.0.0.1 httpbun.local' | sudo tee --append /etc/hosts

    Clone the cfug/httpbun repository and checkout the feat/dio branch

    git clone --depth 1 --branch feat/dio https://github.com/cfug/httpbun.git /tmp/httpbun

    Build a local Docker image named httpbun:feat-dio from the repo

    docker build -t httpbun:feat-dio /tmp/httpbun

    Run the built image instead of pulling from Docker Hub

    docker run
    --name httpbun
    --detach
    --publish 443:443
    --volume /tmp:/tmp:ro
    --env HTTPBUN_TLS_CERT=/tmp/cert.pem
    --env HTTPBUN_TLS_KEY=/tmp/key.pem
    httpbun:feat-dio
    sleep 1
    curl --fail --silent --show-error https://httpbun.local/any

Submit a pull request on branch: ci/use-httpbun-feat-dio (create this branch) targeting main with a clear commit message and PR title using the problem title above. The PR should include a single commit updating .github/workflows/tests.yml with the modified contents.

Provide a brief PR description explaining the change and why: builds and uses cfug/httpbun from feat/dio to ensure tests run against the feature branch implementation instead of pulling an external image.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 16, 2025
Copilot AI changed the title [WIP] Update tests.yml to clone and build cfug/httpbun Build cfug/httpbun:feat/dio locally instead of pulling sharat87/httpbun Nov 16, 2025
Copilot AI requested a review from AlexV525 November 16, 2025 05:38
@AlexV525
Copy link
Member

@copilot

#4 [1/1] ADD bin/httpbun-docker-amd64 /httpbun
#4 ERROR: failed to calculate checksum of ref 25309008-d3b6-4795-9b53-5704e2dd5a06::yzy2xlzznjdsjb59irw5euh4w: "/bin/httpbun-docker-amd64": not found
------
 > [1/1] ADD bin/httpbun-docker-amd64 /httpbun:
------
Dockerfile:4
--------------------
   2 |     
   3 |     ARG TARGETARCH
   4 | >>> ADD bin/httpbun-docker-$TARGETARCH /httpbun
   5 |     
   6 |     ENV PATH="___httpbun_unset_marker"
--------------------
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref 25309008-d3b6-4795-9b53-5704e2dd5a06::yzy2xlzznjdsjb59irw5euh4w: "/bin/httpbun-docker-amd64": not found
Error: Process completed with exit code 1.

Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot

...

Fixed in 780d6f3. The cfug/httpbun Dockerfile expects pre-built binaries that need to be created first. Added Go setup, task tool installation, and task docker command to build the required binaries before the Docker image is built.

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.

2 participants