Thanks to visit codestin.com
Credit goes to github.com

Skip to content

support updatable templates #7098

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

Closed
matifali opened this issue Apr 12, 2023 · 5 comments
Closed

support updatable templates #7098

matifali opened this issue Apr 12, 2023 · 5 comments

Comments

@matifali
Copy link
Member

matifali commented Apr 12, 2023

Feature

Support importing templates from an upstream git repo that prompts for an update or auto upadtes when the upstream source of the template updates.

Motivation

I had this idea for a long time but was still determining how it would be implemented. Recently, I came across an example where Railway is doing something very similar.
https://blog.railway.app/p/updatable-starters

Possible Implementation

This can be implemented by authenticating a Coder GitHub OAuth app to monitor changes in the source code, trigger a new build, or prompt the user that an update is available.

  1. User specifies the source repo and subdirectory of the template.
  2. Coder imports and builds the template
  3. Coder periodically or on every login checks for updates to the source repo and then prompts the user to update the template.
  4. (Optionally) Asynchronously try to update the template and notify the users of the result of the update via a notification(we do not have them yet)

Thoughts are welcome: @ammario @bpmct @deansheather @kylecarbs

@matifali matifali changed the title support public templates support updatable public templates Apr 12, 2023
@deansheather
Copy link
Member

The main issue I think we'll run into is that apps have difficulty doing read operations on stuff they haven't been approved to access, even if the repos are public. I've hit this problem in other situations before when trying to contribute to public repos from inside Coder with SSH key auth.

Another issue would be that any deployments that don't setup a GitHub app wouldn't be able to access this convenience feature.

It'd be great if we could move our starter templates out of coder though and make coder pull them from GitHub though.

@deansheather
Copy link
Member

An alternative would be that Coder could host some sort of caching proxy for downloading templates from org/repo on GitHub. We'd manage the GitHub API auth (probably via user PATs to get around app restrictions) and any Coder deployment could just reach out to our proxy to download a repo or check for updates.

@ehfd
Copy link

ehfd commented May 2, 2023

Additional feature request:

  • A normal non-admin user may customize the terraform template (at least the image, a range of CPU/RAM, and others) and use it arbitrarilly (as long as there are adequate privilege restrictions, no CAPS or other privileges for example in Docker or Kubernetes)
  • A normal non-admin user may paste in a link to an arbitrary template repository and use its templates (as long as there are adequate privilege restrictions, no CAPS or etc for example in Docker or Kubernetes)

@ehfd
Copy link

ehfd commented May 2, 2023

Also relevant:

Coder equivalent of:

Automatic Configuration
If your GitHub repositories does not have a manifest to make a stack, Gitpod will attempt to make a stack based on what it understood about your codebase. However, for popular projects, a central repository on GitHub exists to configure a workspace automatically for them without the manifest file to be present.

@matifali
Copy link
Member Author

matifali commented May 2, 2023

Also relevant:

Coder equivalent of:

Automatic Configuration
If your GitHub repositories does not have a manifest to make a stack, Gitpod will attempt to make a stack based on what it understood about your codebase. However, for popular projects, a central repository on GitHub exists to configure a workspace automatically for them without the manifest file to be present.

Something similar to this is already on Coder's roadmap. See: #5559

Also, check discussion on #3981 and specifically the comment #3981 (comment)

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 31, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
@matifali matifali reopened this Nov 7, 2023
@matifali matifali removed the stale This issue is like stale bread. label Nov 7, 2023
@matifali matifali changed the title support updatable public templates support updatable templates Jan 8, 2024
@sreya sreya closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
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

No branches or pull requests

4 participants