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

Port can be defined by env var #244

Closed
wants to merge 1 commit into from
Closed

Port can be defined by env var #244

wants to merge 1 commit into from

Conversation

AdrK
Copy link
Contributor

@AdrK AdrK commented Jun 18, 2021

No description provided.

@AdrK AdrK requested a review from petethepig June 18, 2021 13:12
@github-actions github-actions bot requested a review from Rperry2174 June 18, 2021 13:12
@codecov
Copy link

codecov bot commented Jun 18, 2021

Codecov Report

Merging #244 (4a0577c) into main (4a429df) will increase coverage by 0.01%.
The diff coverage is 20.00%.

❗ Current head 4a0577c differs from pull request most recent head b4eed16. Consider uploading reports for the commit b4eed16 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
+ Coverage   54.79%   54.80%   +0.01%     
==========================================
  Files          86       86              
  Lines        3581     3586       +5     
==========================================
+ Hits         1962     1965       +3     
- Misses       1415     1416       +1     
- Partials      204      205       +1     
Impacted Files Coverage Δ
pkg/cli/cli.go 59.71% <20.00%> (-1.53%) ⬇️
pkg/agent/session.go 63.20% <0.00%> (ø)
pkg/agent/upstream/remote/remote.go 65.22% <0.00%> (+2.90%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a429df...b4eed16. Read the comment docs.

pkg/cli/cli.go Outdated
Comment on lines 54 to 61
port := os.Getenv("PORT")
if port != "" {
cfg.Server.APIBindAddr = fmt.Sprintf(":%s", port)
cfg.Agent.ServerAddress = fmt.Sprintf("http://localhost:%s", port)
cfg.Exec.ServerAddress = fmt.Sprintf("http://localhost:%s", port)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some points for your consideration:

To be very honest, I'm not 100% sure this option is required indeed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the useful remarks. I wasn't aware of ffcli. I guess we need a decision if this is needed at all here. There might be cases when we need to have port configurable.

@petethepig
Copy link
Member

Let's not merge this, you can use PYROSCOPE_API_BIND_ADDR to set the address on the server side, and PYROSCOPE_ SERVER_ADDRESS to set it on clients.

@AdrK AdrK closed this Jun 18, 2021
@petethepig petethepig deleted the port_from_env branch June 18, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants