Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 BUG]: Default value support for RR config env variables #1522

Closed
1 task done
benalf opened this issue Apr 5, 2023 · 0 comments · Fixed by roadrunner-server/config#32
Closed
1 task done

[🐛 BUG]: Default value support for RR config env variables #1522

benalf opened this issue Apr 5, 2023 · 0 comments · Fixed by roadrunner-server/config#32
Assignees
Labels
B-bug Bug: bug, exception beta-nominated Nominated for backporting to the RR in the beta channel.
Milestone

Comments

@benalf
Copy link

benalf commented Apr 5, 2023

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

Setting a default value for a RR value via envvar substitution in the RR config seems to break the value and it becomes an empty string instead.

Version (rr --version)

rr version 2.12.3 (build time: 2023-02-16T13:08:41+0000, go1.20), OS: linux, arch: amd64

How to reproduce the issue?

E.g.

.rr.yaml
______
version: '2.7'
rpc:
  listen: tcp://127.0.0.1:${RPC_PORT:-6001}
 
or

version: '2.7'
rpc:
  listen: tcp://127.0.0.1:${RPC_PORT:6001}
______
./rr serve
rpc         	plugin was started	{"address": "tcp://127.0.0.1:"    <----- missing port
______
RPC_PORT=6666 ./rr serve
rpc         	plugin was started	{"address": "tcp://127.0.0.1:"    <----- missing port

The port is missing completely in both cases.

Env variables without a default work fine:

.rr.yaml
______
version: '2.7'
rpc:
  listen: tcp://127.0.0.1:${RPC_PORT}
______
./rr serve
rpc         	plugin was started	{"address": "tcp://127.0.0.1:"      <----- missing port as expected
______
RPC_PORT=6666 ./rr serve
rpc         	plugin was started	{"address": "tcp://127.0.0.1:6666"  <----- port is set as expected

Relevant log output

No response

@benalf benalf added B-bug Bug: bug, exception F-need-verification labels Apr 5, 2023
@rustatian rustatian added this to General Apr 5, 2023
@github-project-automation github-project-automation bot moved this to Backlog in General Apr 5, 2023
@rustatian rustatian added this to the v2023.1.0 milestone Apr 5, 2023
@rustatian rustatian moved this from Backlog to Todo in General Apr 5, 2023
@rustatian rustatian moved this from Todo to In Progress in General Apr 5, 2023
@rustatian rustatian added beta-nominated Nominated for backporting to the RR in the beta channel. and removed F-need-verification labels Apr 5, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Unreleased in General Apr 5, 2023
@rustatian rustatian moved this from Unreleased to Done in General Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception beta-nominated Nominated for backporting to the RR in the beta channel.
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants