Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: track usage of built-in example templates#15671

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugodutka merged 3 commits intomainfromhugodutka/track-example-templates
Nov 27, 2024

Conversation

hugodutka
Copy link
Contributor

@hugodutkahugodutka commentedNov 27, 2024
edited
Loading

Addresseshttps://github.com/coder/nexus/issues/99.

Changes:

  • Save the id of the built-in example template used to create a template version in the database
  • Include the example id in telemetry

@hugodutkahugodutka marked this pull request as ready for reviewNovember 27, 2024 13:01
Copy link
Member

@EmyrkEmyrk left a comment
edited
Loading

Choose a reason for hiding this comment

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

This just adds the ID column, it does not adduuid's to our built in templates yet right?

Are we going to adduuids to our builtins? Or should it be a string, eg:github.com/coder/templates/official/aws-linux

And do we need version control?

github.com/coder/templates/official/aws-linux@ad4efa53708e60a7094ef9687e7dfda0441aaec7?

@hugodutka
Copy link
ContributorAuthor

This just adds the ID column, it does not add uuid's to our built in templates yet right?

That's correct.

Are we going to add uuids to our builtins? Or should it be a string, eg: github.com/coder/templates/official/aws-linux

Hmm, I haven't heard anything about that before. Were there any plans?

And do we need version control?

In telemetry, we can infer the built-in template version from the deployment version. From my perspective we don't need additional version control.

Emyrk reacted with thumbs up emoji

@Emyrk
Copy link
Member

@hugodutka 👍

Hmm, I haven't heard anything about that before. Were there any plans?

This PR adds a column to track the built in template source by uuid correct? Do built ins have a consistent uuid across all deployments?

@hugodutka
Copy link
ContributorAuthor

This PR adds a column to track the built in template source by uuid correct? Do built ins have a consistent uuid across all deployments?

Built-in templates have consistent, human-readable ids. These correspond to folder names inhttps://github.com/coder/coder/tree/main/examples/templates.

The examples are embedded in the binary here:

var (
// Only some templates are embedded that we want to display inside the UI.
// The metadata in examples.gen.json is generated via scripts/examplegen.
//go:embed examples.gen.json
//go:embed templates/aws-devcontainer
//go:embed templates/aws-linux
//go:embed templates/aws-windows
//go:embed templates/azure-linux
//go:embed templates/do-linux
//go:embed templates/docker
//go:embed templates/devcontainer-docker
//go:embed templates/devcontainer-kubernetes
//go:embed templates/gcp-devcontainer
//go:embed templates/gcp-linux
//go:embed templates/gcp-vm-container
//go:embed templates/gcp-windows
//go:embed templates/kubernetes
//go:embed templates/nomad-docker
//go:embed templates/scratch
files embed.FS

So this PR tracks them by these human-readable ids.

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

👍 Got it, that tracks!

@hugodutkahugodutka merged commitb830c05 intomainNov 27, 2024
35 checks passed
@hugodutkahugodutka deleted the hugodutka/track-example-templates branchNovember 27, 2024 19:01
stirby pushed a commit that referenced this pull requestDec 2, 2024
Addressescoder/nexus#99.Changes:- Save the id of the built-in example template used to create a templateversion in the database- Include the example id in telemetry(cherry picked from commitb830c05)
stirby added a commit that referenced this pull requestDec 3, 2024
-#15589-#15683-#15671---------Co-authored-by: Hugo Dutka <hugo@coder.com>Co-authored-by: Sas Swart <sas.swart.cdk@gmail.com>Co-authored-by: Spike Curtis <spike@coder.com>Co-authored-by: Cian Johnston <cian@coder.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@hugodutkahugodutka

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hugodutka@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp