mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 19:32:55 -05:00
## 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
test `TestIsPortExposed`.
- `postgres.NewConfigFromEnv`
(`tools/ods/internal/postgres/postgres.go`). Callers now use
`NewConfigFromEnvironment(env)`. The two `NewConfigFromEnv` tests now
call `NewConfigFromEnvironment`, so the tests for the default values and
for reading the environment stay.
## How Has This Been Tested?
- `go vet` and `go test ./internal/docker ./internal/postgres`
- `GOOS=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
<!-- This is an auto-generated description by cubic. -->
---
## 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 use
`NewConfigFromEnvironment(os.Environ())`.
<sup>Written for commit 0a2c413df7.
Summary will update on new commits.</sup>
<a
href="https://cubic.dev/pr/onyx-dot-app/onyx/pull/16263?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/onyx-dot-app/onyx/16263?returnTo=https%3A%2F%2Fgithub.com%2Fonyx-dot-app%2Fonyx%2Fpull%2F16263&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## 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.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>