chore(ods): remove unused IsPortExposed and NewConfigFromEnv helpers
Merged
RO
3d ago+11+11+01234567890123456789-42-42-01234567890123456789
Description
This PR removes two ODS helpers. Their last production callers were removed in #16246.
docker.IsPortExposed(tools/ods/internal/docker/docker.go) and its testTestIsPortExposed.postgres.NewConfigFromEnv(tools/ods/internal/postgres/postgres.go). Callers now useNewConfigFromEnvironment(env). The twoNewConfigFromEnvtests now callNewConfigFromEnvironment, so the tests for the default values and for reading the environment stay.
How Has This Been Tested?
go vetandgo test ./internal/docker ./internal/postgresGOOS=windows go build ./...- Pre-commit hooks (
golangci-lint) on the changed files.
Additional Options
- [Optional] Please cherry-pick this PR to the latest release version.
Link to Devin session: https://app.devin.ai/sessions/88808bbde64f4f1ebe92163a49564dbe
Open in Devin Desktop: https://app.devin.ai/desktop/session/88808bbde64f4f1ebe92163a49564dbe?variant=devin
Summary by cubic
Removes two unused ODS helpers now that their last production callers were deleted in #16246. Deletes docker.IsPortExposed and its test, and drops postgres.NewConfigFromEnv; the tests for default values and environment reading now call NewConfigFromEnvironment directly.
Migration
- Code still calling
postgres.NewConfigFromEnv()should useNewConfigFromEnvironment(os.Environ()).
Summary by CodeRabbit
- Refactor
- Streamlined internal Docker and PostgreSQL utilities. PostgreSQL configuration checks now use explicitly supplied environment values rather than reading process settings directly.
- No end-user-facing behavior changes are included in this update.