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

Display HTTP URL in /apps list #325

Merged
merged 5 commits into from Apr 27, 2022
Merged

Display HTTP URL in /apps list #325

merged 5 commits into from Apr 27, 2022

Conversation

levb
Copy link
Contributor

@levb levb commented Apr 25, 2022

Just as the title says, instead of http, display https:/x.y.z for installed HTTP apps

@levb levb added 2: Dev Review Requires review by a core committer QA Deferred Agreement with QA that these changes will be tested post-merge labels Apr 25, 2022
@levb levb added this to the v1.1.0 milestone Apr 25, 2022
Copy link
Member

@mickmister mickmister left a comment

Choose a reason for hiding this comment

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

Yes!!

@mickmister
Copy link
Member

Any security issues that may arise from this? Should end-users be able to know where the http server resides?

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2022

Codecov Report

Merging #325 (558da63) into master (95a20a4) will decrease coverage by 0.11%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
- Coverage   29.42%   29.31%   -0.12%     
==========================================
  Files          79       79              
  Lines        4676     4694      +18     
==========================================
  Hits         1376     1376              
- Misses       3155     3173      +18     
  Partials      145      145              
Impacted Files Coverage Δ
server/httpin/restapi/ux_get_ids.go 27.27% <0.00%> (ø)
server/proxy/call.go 42.85% <0.00%> (-3.81%) ⬇️
server/proxy/install.go 0.00% <0.00%> (ø)
server/proxy/list.go 0.00% <0.00%> (ø)
server/proxy/service.go 7.31% <ø> (ø)

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 95a20a4...558da63. Read the comment docs.

@levb
Copy link
Contributor Author

levb commented Apr 25, 2022

Sorry just pushed another update, please review again

@levb
Copy link
Contributor Author

levb commented Apr 25, 2022

Any security issues that may arise from this? Should end-users be able to know where the http server resides?

@mickmister no - it's a sysadmin-only command.

server/proxy/call.go Outdated Show resolved Hide resolved
// all ping requests must respond, unreachable respond with "".
reachableCh := make(chan apps.AppID)
for _, app := range all {
rr, cancel := p.timeoutRequest(r, pingAppTimeout)
Copy link
Member

Choose a reason for hiding this comment

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

Can we utilize this timeout logic when fetching bindings from all apps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, when the time for it comes? I am not sure we want to be timing out more aggressively than the default, yet, since the binding fetch should be in theory async to the user, right?

@levb levb added 4: Reviews Complete All reviewers have approved the pull request QA Deferred Agreement with QA that these changes will be tested post-merge and removed 2: Dev Review Requires review by a core committer QA Deferred Agreement with QA that these changes will be tested post-merge labels Apr 27, 2022
@levb levb merged commit b1972a6 into master Apr 27, 2022
@levb levb deleted the lev-info-improve branch April 27, 2022 00:57
Comment on lines +193 to +198
func (p *Proxy) timeoutRequest(r *incoming.Request, timeout time.Duration) (*incoming.Request, context.CancelFunc) {
r = r.Clone()
ctx, cancel := context.WithTimeout(r.Ctx(), timeout)
incoming.WithCtx(ctx)(r)
return r, cancel
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a method of incoming.Request? What does it have to do with Proxy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request QA Deferred Agreement with QA that these changes will be tested post-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants