feat: Make server listening port configurable via WAVE_SERVER_PORT mn env var#1029
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Micronaut configuration so the Wave server listening port can be set explicitly via the WAVE_SERVER_PORT environment variable, rather than relying on Micronaut’s implicit env-var-to-property mapping.
Changes:
- Make
micronaut.server.portresolve fromWAVE_SERVER_PORTwith a9090default.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gavinelder
approved these changes
May 27, 2026
pditommaso
reviewed
May 27, 2026
| allowAnonymous: true | ||
| server: | ||
| url: "${WAVE_SERVER_URL:`http://localhost:9090`}" | ||
| url: "${WAVE_SERVER_URL:`http://localhost:${WAVE_SERVER_PORT:9090}`}" |
Collaborator
There was a problem hiding this comment.
I'm not really sure WAVE_SERVER_PORT within backtick is replaced by the variable
Member
Author
There was a problem hiding this comment.
Indeed. That's the reason tests are failing
…ig test
The nested placeholder `${WAVE_SERVER_PORT:9090}` inside backtick-quoted
default for wave.server.url is not supported by Micronaut, causing
MalformedURLException at runtime. Reverted wave.server.url to its original
static default since it represents the public-facing domain, not the
listening port. Added unit test for WAVE_SERVER_PORT configuration.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
The test environment config (application-test.yml) hardcodes port to -1, which overrides the placeholder from application.yml. Use deduceEnvironment(false) to test the main config in isolation. Co-Authored-By: Claude Opus 4.6 <[email protected]>
pditommaso
approved these changes
May 27, 2026
munishchouhan
approved these changes
May 27, 2026
Starting a full ApplicationContext without the test environment fails because beans require test-specific config. Instead, only start the Environment to test property placeholder resolution without instantiating any application beans. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Member
Author
|
Tests passing, I'll merge it |
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.
Allows users to configure the wave server listening port using the explicit variable
WAVE_SERVER_PORTinstead of using the implicit micronaut variableMICRONAUT_SERVER_PORT.