coder
coder copied to clipboard
Feature: Sharable ports
Problem
Customers want to be able to expose arbitrary ports to other users at different levels of permissions for how those ports can be shared. 2-3 major customers are already making workarounds for this missing feature, so we should build something first class to fit this need.
RFC
https://www.notion.so/coderhq/Shareable-Ports-4140e809958c457ba99f53b3e9ae1673?pvs=4
Related
- https://github.com/coder/coder/issues/11201
- https://github.com/coder/coder/issues/10909
- ~~https://github.com/coder/coder/issues/8189~~ :: This is a coder config issue
- https://github.com/coder/coder/issues/8220
- https://github.com/coder/coder/issues/10266
- https://github.com/coder/coder/issues/10908
Action Items
Required
- [x] https://github.com/coder/coder/issues/11845
- [x] https://github.com/coder/coder/issues/11846
- [x] https://github.com/coder/coder/issues/11847
- [x] https://github.com/coder/coder/issues/11849
- [x] https://github.com/coder/coder/issues/11850
- [x] https://github.com/coder/coder/issues/11851
- [x] https://github.com/coder/coder/issues/11853
- [x] https://github.com/coder/coder/issues/11854
- [x] https://github.com/coder/coder/issues/11858
- [x] https://github.com/coder/coder/issues/12232
- [x] https://github.com/coder/coder/issues/12454
- [x] https://github.com/coder/coder/issues/12832
- [ ] https://github.com/coder/coder/issues/13058
- [ ] https://github.com/coder/coder/issues/13070
Reach
- [ ] https://github.com/coder/coder/issues/11855
- [ ] https://github.com/coder/coder/issues/11856
- [ ] https://github.com/coder/coder/issues/11857
- [x] #12651
- [x] #12722
adding this issue: https://github.com/coder/coder/issues/12232
Minor bug: I can specify port 0 ;p
"Application port 1 is not permitted. Coder reserves ports less than 9 for internal use." is our error.
It's not exactly clear to me why "Public" is greyed out here:
https://github.com/coder/coder/issues/12232 will be a requirement for this to make GA.
@kylecarbs the feature allows admins to restrict the maximum sharing level of ports in the template settings. If you're on our dev template the maximum sharing level is Authenticated.
We could add a tooltip if this is unclear.
Yup I was thinking a tooltip will fix that nicely
@kylecarbs the feature allows admins to restrict the maximum sharing level of ports in the template settings. If you're on our dev template the maximum sharing level is Authenticated.
Instead of the tooltip, we can also remove it from the dropdown if not allowed at the template level.
I added two items to the checklist since we're still in experimental. I think there are some other dependencies too related to listening ports. Can you add those in so we have a good sense of what is blocking us from making this GA?
@f0ssel @stirby
Added https://github.com/coder/coder/issues/12832 since these are intertwined from a UX perspective.
@bpmct the list is complete. Added docs and GA issues.
@kylecarbs the feature allows admins to restrict the maximum sharing level of ports in the template settings. If you're on our dev template the maximum sharing level is
Authenticated.We could add a tooltip if this is unclear.
@stirby What do you mean by "If you're on our dev template"?
I'm on an OSS deployment, upgraded from v2.10.2 to v2.11.0 today, and am seeing the same thing as @kylecarbs: "public" option is greyed out.
In the workspace settings, the "Public" option is pre-selected and unmodifiable, as expected.
The documentation on port forwarding says:
OSS deployments allow all workspaces to share ports at both the authenticated and public levels.
I can't seem to find a way to enable public port sharing via the port helper.
I'd also like to suggest a simplification of the port sharing helper UI. I believe it's currently more confusing than it could be.
From the docs:
I'd suggest merging the detected ports section into the shared ports section, by simply pre-populating the shared ports section with the detected ports, and with the sharing level set to "Owner" by default, and the protocol set to HTTP by default, as that is essentially what happens when clicking on a detected port anyway.
This solves a few UX issues:
- it's not obvious that the detected ports are clickable;
- if you click on a detected port, it always uses HTTP, and you have to type in the port, select HTTPS, and click on the small icon should you want to override that;
- the "new window" icon itself is not immediately noticeable and not clear as to what it does, and there is no tooltip;
- for the above reason, the Share button next to the first detected port can be construed as "share the port I just typed in above"
If you just automatically add the detected ports to the shared ports with "HTTP" and "Owner" settings as defaults, and perhaps with some indication/separation on which ones were autodetected, the entire "Listening Ports" section could just go away.
I'd also suggest adding "new window" icon next to the port numbers in the list, to make it more obvious that they are clickable.
Here's a rough mockup of how all this could look like, for inspiration:
@coder/ts @coder/pms some good feedback here ⬆️
@matifali do you think we should open a ticket for redesigning this UI? I think having a ticket can give us time to try different alternatives and solutions based on user feedback and the opportunity to think about it more deeply.
@matifali @BrunoQuaresma We considered a design quite similar to this is one in the past and I like the consolidation. I'd like to review the mockups before we make a decision.
@stirby Sure, I think the first decision we have to make is if we want to spend some time working on the design before jumping into a fix/improvement. If yes, which I think we all agree, the person who creates the designs can share them with the team, including you and other PMs, to collect feedback and get approval. Wdyt?
Sounds good, moved to new issue.
Awesome! Looking forward to it.
@stirby could you please elaborate on https://github.com/coder/coder/issues/11486#issuecomment-2101178378 ?
The observed behavior doesn't currently match what's stated in the docs...
Hey @pauliuspetk I can look into this behavior and get back to you, I think I understand from your description but want to investigate and see what is going on here to create this mismatch. Thanks for bringing this up.
@stirby a question about releases. When a feature is made GA in a release, which has a bug that is later fixed in main. Is it expected to backport the fix and patch the release?
For example, coder/coder#13259 fixes the port sharing level, which was made GA in v2.11.0, but it still needs to be released as a patch.
Ran into that bug as well.