Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simply running make bin is not sufficient when testing changes #1547

Closed as not planned
@mafredri

Description

@mafredri

OS Information

  • OS: macOS (Intel, amd64)
  • coder --version: Coder v0.0.0-devel+ba818b3 Wed May 18 00:07:20 UTC 2022 ba818b3

Steps to Reproduce

  1. Have coder repo in some fringe state with old builds and what not
  2. Run make bin
  3. Run coder server --dev ...
  4. Run coder templates create -d examples/docker-local
  5. Run coder create dev
  6. See error in Docker container: Syntax error: redirection unexpected (not reproducible after make build)

Expected

No error, or protection against serving an incompatible agent binary.

It seems coder server is serving an incompatible agent for the given architecture. I'm not entirely sure how my project ended up in that state, but it's something that could possibly trip up someone contributing to this project, or prefer to build it themselves.

Actual

Workspace creation fails:

  docker_container.workspace[0]: Creating...
  docker_container.workspace[0]: Creation errored after 1s
  Error: container exited immediately

✘ Starting workspace [5921ms]
exit status 1

(The lack of error information is already documented in #1544, this is not about that.)

If we view the docker log we simply see:

Syntax error: redirection unexpected

Indicating that the binary was incompatible with the target architecture (server macOS amd64, container linux amd64).

Notes

I've not dug into exactly what went wrong here, it could be that the issue sits between keyboard and chair.

Running make bin isn't perhaps the supported approach, but I imagine simply running go build -tags embed ./cmd/coder or make dev could have similar issues given the right circumstance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions