Repository navigation
feat: support explicit published port selection - #539
Closed
ntltsrs-scout wants to merge 1 commit into
Closed
ntltsrs-scout wants to merge 1 commit into
ntltsrs-scout wants to merge 1 commit into
Conversation
Allow gateway-only workloads to publish only the emulator API port and explicitly requested TCP ports. Preserve the selection across service configuration changes and validate fixed bindings before container creation. Signed-off-by: Natallia Tserashchuk <natallia.tserashchuk_ext@scout24.com>
[Medium impact] The PR appears safe to merge; no actionable issues were found.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gateway-only workloads currently publish ports for every enabled service, including unused database proxy ranges. Add
withPublishedPorts(Integer...)so callers can keep only the emulator API port and the additional TCP ports their workload needs:The explicit selection survives subsequent service configuration calls and is enforced before container creation. Duplicate ports are removed, invalid selections are rejected without replacing the previous selection, and conflicting fixed bindings fail before creation. Services and their listening ports are configured independently. Callers that omit the method retain automatic port selection.
The implementation lives in the shared core, with an AWS fluent override, usage documentation, unit coverage and a Docker-backed regression test that verifies the actual gateway-only bindings, an S3 round trip and container removal.
Related issue
No public issue linked. This addresses unnecessary port publications and their Docker setup/cleanup cost for workloads that only use the emulator gateway.
Type of change
fix:commit)feat:commit)feat!:commit orBREAKING CHANGE:footer)Validation
Validated the exact source files on a Linux Docker agent with Corretto 21 and Maven 3.9.11:
Checklist
mvn verifypasses locally (requires Docker)feat:,fix:,chore:, etc.)The local full-verification checkbox remains unchecked because the Docker-backed validation above ran on a separate agent and selected the new integration test.