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

coder_app breaks when command = "..." and subdomain = true #343

Open
ElioDiNino opened this issue Jul 27, 2023 · 5 comments
Open

coder_app breaks when command = "..." and subdomain = true #343

ElioDiNino opened this issue Jul 27, 2023 · 5 comments
Labels
good first issue Good for newcomers

Comments

@ElioDiNino
Copy link

Version: v0.27.1+65583ec

If you create a coder_app like the following, you get a 500 error from Coder.

Either support for subdomains with commands should be added or the Terraform provider should complain that subdomain = true isn't allowed when command is set. When setting the subdomain key to false (or removing it entirely) things work fine (apart from the URL not being a subdomain).

resource "coder_app" "keeper-commander" {
  agent_id     = coder_agent.main.id
  slug         = "keeper-commander"
  display_name = "Keeper CLI"
  icon         = "https://www.keepersecurity.com/assets/branding/android-icon-192x192.png"
  command      = "keeper shell"
  subdomain    = true
  share        = "owner"
}
Screenshot 2023-07-26 at 6 18 37 PM
@sreya
Copy link
Collaborator

sreya commented Jul 27, 2023

@ElioDiNino would you mind adding the corresponding server log with the 500 error?

@ElioDiNino
Copy link
Author

@ElioDiNino would you mind adding the corresponding server log with the 500 error?

2023-07-27 22:18:09.838 [warn]  coderd.workspaceapps: workspace app auth server error: get app details from database  request_id=7fd69c50-2b9e-4996-b749-ec4c27b5d3d5  username_or_id=redacted  workspace_and_agent=""  workspace_name_or_id=broken  agent_name_or_id=main  app_name_or_port=keeper-commander ...
    error= app URL is not valid:
               github.com/coder/coder/coderd/workspaceapps.Request.getDatabase
                   /home/runner/actions-runner/_work/coder/coder/coderd/workspaceapps/request.go:293
2023-07-27 22:18:09.839 [warn]  coderd: GET  host=keeper-commander--main--broken--redacted.coder.redacted.local  path=/  proto=HTTP/2.0  remote_addr=240.15.124.128  took=10.503439ms  status_code=500  latency_ms=10  request_id=7fd69c50-2b9e-4996-b749-ec4c27b5d3d5 ...
    response_body= ">Back to site</a>
                         </div>
                       </div>
                     </body>
                   </html>
2023-07-27 22:18:09.870 [warn]  coderd.workspaceapps: workspace app auth server error: get app details from database  request_id=8815e9a8-1171-4064-ac5e-80903525fa5b  username_or_id=redacted  workspace_and_agent=""  workspace_name_or_id=broken  agent_name_or_id=main  app_name_or_port=keeper-commander ...
    error= app URL is not valid:
               github.com/coder/coder/coderd/workspaceapps.Request.getDatabase
                   /home/runner/actions-runner/_work/coder/coder/coderd/workspaceapps/request.go:293
2023-07-27 22:18:09.870 [warn]  coderd: GET  host=keeper-commander--main--broken--redacted.coder.redacted.local  path=/favicon.ico  proto=HTTP/2.0  remote_addr=240.15.124.128  took=10.124058ms  status_code=500  latency_ms=10  request_id=8815e9a8-1171-4064-ac5e-80903525fa5b ...
    response_body= ">Back to site</a>
                         </div>
                       </div>
                     </body>
                   </html>

@bpmct
Copy link
Member

bpmct commented Aug 7, 2023

Thanks for reporting. We should change the Terraform provider to not support subdomain=true and command properties.

@matifali
Copy link
Member

matifali commented Nov 8, 2023

@bpmct and @sreya, why the command can not work when subdomain=true? Is there a technical limitation?

@kylecarbs kylecarbs changed the title Coder App Breaks With Command & Subdomain coder_app breaks when command = "..." and subdomain = true Apr 26, 2024
@matifali matifali transferred this issue from coder/coder Feb 12, 2025
@matifali
Copy link
Member

We should add a mutually exclusive condition for subdomain=true and command to ensure failure at the workspace build stage.

@matifali matifali added the good first issue Good for newcomers label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants