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

feat(vscode-web): support hosting on a subpath with subdomain=false #288

Merged
merged 18 commits into from
Oct 21, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Aug 29, 2024

@Emyrk Emyrk requested a review from matifali August 29, 2024 17:32
Copy link
Contributor

@stirby stirby left a comment

Choose a reason for hiding this comment

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

We should probably allow all these to be customizable

@stirby stirby self-requested a review August 29, 2024 18:00
stirby
stirby previously requested changes Aug 29, 2024
Copy link
Contributor

@stirby stirby left a comment

Choose a reason for hiding this comment

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

Breaks in my testing

@@ -160,7 +169,7 @@ resource "coder_app" "vscode-web" {
display_name = var.display_name
url = var.folder == "" ? "http://localhost:${var.port}" : "http://localhost:${var.port}?folder=${var.folder}"
icon = "/icon/code.svg"
subdomain = true
subdomain = var.subdomain
Copy link
Contributor

Choose a reason for hiding this comment

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

Setting subdomain to false breaks the app. I think you'll have to chang the URL format when it's set.

@Emyrk Emyrk marked this pull request as draft August 29, 2024 20:17
@matifali matifali changed the title chore: add subdomain option to terraform module feat(vscode-web): support hosting on a subpath with subdomain=false Aug 30, 2024
@matifali
Copy link
Member

@Emyrk Do you plan to come back to this? A similar approach is used in #316 and #320.

@Emyrk
Copy link
Member Author

Emyrk commented Oct 16, 2024

@matifali I think this has be done for it to work
coder/coder#14483

I see the Juypter accomplishing this by setting the url to the full path, but I thought I tried that and it did not work for this.

@matifali
Copy link
Member

@Emyrk A Community member successfully ran Jupyter on a subpath by setting the full URL. See #313

@Emyrk
Copy link
Member Author

Emyrk commented Oct 17, 2024

@Emyrk A Community member successfully ran Jupyter on a subpath by setting the full URL. See #313

I do see that. I think it depends on how urls are constructed within the app. I am pretty sure I tried this with VSCode and it did not. Using the exact same technique.

If someone has more time to try it, please do.

@matifali matifali self-assigned this Oct 21, 2024
@matifali matifali requested review from stirby and code-asher October 21, 2024 07:57
@matifali
Copy link
Member

@code-asher @Emyrk I tested with both subdomain=true|false and it works.
Also, I have noticed that skipping the coder_agent's name auto updates the URL with the correct agent_name, so it is not necessary.

We can drop agent_name from all modules that support subdomain=false.

@matifali matifali marked this pull request as ready for review October 21, 2024 08:45
@@ -47,6 +47,7 @@ You can test a module locally by updating the source as follows
```tf
module "example" {
source = "git::https://github.com/<USERNAME>/<REPO>.git//<MODULE-NAME>?ref=<BRANCH-NAME>"
# You may need to remove the 'version' field, it is incompatible with some sources.
Copy link
Member

Choose a reason for hiding this comment

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

Version is into valid when pulling for a terraform module registry confirming to the terraform module protocol.

Copy link
Member

Choose a reason for hiding this comment

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

So I would just remove this line as no version is required for modules testing from GitHub branches.

vscode-web/main.tf Outdated Show resolved Hide resolved
@matifali matifali merged commit ce5a5b3 into main Oct 21, 2024
2 checks passed
@matifali matifali deleted the stevenmasley/subdomain_vscode branch October 21, 2024 08:46
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