Skip to content

engine plugins: password extras don't reach ReadyCheck or EnvVars on the docker backend #79

Description

@ikeikeikeike

Surfaced by the wave-2 retrospective /code-review sweep of PR #3 (redis) and PR #6 (docker backend for all 4 plugins).

UpReq.Extras carries redis.password / (for mysql) any extras key that passes through to MYSQL_<KEY> env vars, so dockerUp() can start a password-protected server. But neither ReadyCheckRequest nor EnvVarsReq carries Extras at all (plugins/engine/api/proto/*.proto), so:

  1. dockerReadyCheck() can never authenticate. redisPing() (plugins/engine/redis/docker.go) execs a bare redis-cli ping with no -a; mysqlAdminPing() (plugins/engine/mysql/docker.go) execs a bare mysqladmin ping with no -u root -p. Once extras.redis.password (or an extras key that maps to MYSQL_ROOT_PASSWORD) is set, the ready-probe gets NOAUTH/Access-Denied on every tick and bough create times out after the full ready_timeout_sec, even though the server has been healthy and correctly serving authenticated connections since shortly after start.

  2. EnvVars() can never surface the password. redis.go's EnvVars() renders BOUGH_REDIS_URL=redis://127.0.0.1:<port>/0 with no credential — EnvVarsReq structurally cannot carry one. Any application consuming that .env.local value gets NOAUTH Authentication required. on every command even though bough create reported the engine ready.

No test in plugins/engine/{redis,mysql}/*_test.go exercises the password path, so both are uncaught by CI.

Proper fix: extend ReadyCheckRequest and EnvVarsReq (proto regen required) to carry Extras (or at minimum the specific auth-relevant keys), and update redisPing/mysqlAdminPing/redis.go EnvVars() to use it. This is a wire-contract change affecting all four plugins' shared proto, so it needs design sign-off rather than a same-file patch.

Files

  • plugins/engine/api/proto/*.proto (ReadyCheckRequest, EnvVarsReq)
  • plugins/engine/redis/docker.go (redisPing), plugins/engine/redis/redis.go (EnvVars)
  • plugins/engine/mysql/docker.go (mysqlAdminPing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions