René's URL Explorer Experiment


Title: Consolidate template-wide metadata · Issue #3531 · coder/coder · GitHub

Open Graph Title: Consolidate template-wide metadata · Issue #3531 · coder/coder

X Title: Consolidate template-wide metadata · Issue #3531 · coder/coder

Description: Problem statement We currently have template-wide metadata in 2 places and have a 3rd concept in Terraform (coder_metadata). When adding new features (e.g #2221) this makes things confusing. README.md: YAML is currently appended to templ...

Open Graph Description: Problem statement We currently have template-wide metadata in 2 places and have a 3rd concept in Terraform (coder_metadata). When adding new features (e.g #2221) this makes things confusing. README...

X Description: Problem statement We currently have template-wide metadata in 2 places and have a 3rd concept in Terraform (coder_metadata). When adding new features (e.g #2221) this makes things confusing. README...

Opengraph URL: https://github.com/coder/coder/issues/3531

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consolidate template-wide metadata","articleBody":"## Problem statement\r\n\r\nWe currently have template-wide metadata in 2 places and have a 3rd concept in Terraform (coder_metadata). When adding new features (e.g #2221) this makes things confusing.\r\n\r\n1) `README.md`: YAML is currently appended to template READMEs, for use with `coder templates init`. This is already in the product. Here is an example:\r\n    https://github.com/coder/coder/blob/4be61d9250512f85bc88ba9603928ca5ac706089/examples/templates/docker/README.md?plain=1#L1-L5\r\n\r\n2) `coder templates edit`: We also have a way to apply metadata to templates via `coder templates edit` for the description and schedule controls. This was apparently done so we could \"validate\" the values easier.\r\n\r\n    ```sh\r\n    ➜  ~ coder templates edit --help\r\n    Edit the metadata of a template by name.\r\n    \r\n    Usage:\r\n      coder templates edit \u003ctemplate> [flags]\r\n    \r\n    Flags:\r\n          --description string                Edit the template description\r\n      -h, --help                              help for edit\r\n          --max_ttl duration                  Edit the template maximum time before shutdown\r\n          --min_autostart_interval duration   Edit the template minimum autostart interval\r\n      -y, --yes                               Bypass prompts\r\n    ````\r\n\r\n3) `coder_metadata`: We have a way to attach metadata for specific resource blocks with [coder_metadata](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/metadata). The direct link to Terraform resources is necessary, hence it is done in the `.tf` file.\r\n\r\n    https://github.com/coder/coder/blob/4be61d9250512f85bc88ba9603928ca5ac706089/dogfood/main.tf#L52-L60\r\n    \r\n    \u003cimg width=\"380\" alt=\"Screen Shot 2022-08-17 at 9 15 19 AM\" src=\"https://user-images.githubusercontent.com/22407953/185157104-405344c6-c9dd-4c2b-aa97-0787530829f2.png\">\r\n\r\n\r\n## Definition of done\r\n\r\nTemplate-wide metadata is only in one place.\r\n\r\n## Ideas\r\n\r\n\u003cdetails>\r\n  \u003csummary>Postponed: use the upcoming `template.yaml` for all template-wide metadata. Use `coder_metadata` for workspace and resource-wide metadata.\r\n\u003c/summary>\r\n  \r\n---\r\n\r\nWe are considering a `template.yaml` file, which includes YAML-based metadata: #2987 \r\n\r\nThis would consolidate metadata from the `README.md` (1) and from `coder templates edit` (2). \r\n\r\n```yaml\r\nversion: 1\r\nname: dogfood\r\ndescription: \"Our standard dogfood image\"\r\nschedule:\r\n  max_ttl: 12h\r\n  min_autostart_interval: 24h\r\n# Some future knobs\r\ndeprecated_for: \"dogfood-ts\"\r\nallow:\r\n   - all\r\ndeny:\r\n   - dean@coder.com\r\nicon: /icons/dog.png\r\n```\r\n\r\n`coder_metadata` (3) can remain in the Terraform for workspace-scoped and resource-scoped metadata since it may rely on dynamic values from Terraform. However, it is not used for things in the template-wide or in the templates page (description, icon, TTL, etc):\r\n\r\n```diff\r\nresource \"coder_metadata\" \"template\" {\r\n-   resource_id = \"\"\r\n+   workspace_wide = true;\r\n item {\r\n    key = \"Workspace broken?\"\r\n    value = \"[Create Ticket](https://internal-support.com/tickets/new/?type=coder&workspaceid=${data.coder_workspace.me.id}\"\r\n }\r\n    quicklinks = \"Run workspaces on a Docker host using registry images\"\r\n }\r\n ```\r\n\u003c/details>\r\n\r\n✅ Solution discussed by @bpmct @BrunoQuaresma @kylecarbs: Manage metadata via CLI (`coder templates edit`) and \"Edit Template\" page in the dashboard. Remove metadata from README entirely. This follows the model of GitHub and Vercel where some properties are just \"editable\"\r\n\r\nResource and workspace metadata will be used by `coder_metadata`\r\n\r\n\u003cimg width=\"300\" alt=\"Screen Shot 2022-08-17 at 11 21 49 AM\" src=\"https://user-images.githubusercontent.com/22407953/185194667-1d7ffe7f-a9b8-4490-a5da-17b8f5443a57.png\">\r\n\u003cimg width=\"300\" alt=\"Screen Shot 2022-08-17 at 11 21 15 AM\" src=\"https://user-images.githubusercontent.com/22407953/185194669-a499006e-2e6f-4147-ba29-31c07f3e2729.png\">\r\n\r\nThis will make our dashboard more interactive and make these features feel more fun and easy to use. Down the road, `template.yaml` (#2987) can be used to \"disable\" manual editing by admins so that it's managed as a part of GitOps.","author":{"url":"https://github.com/bpmct","@type":"Person","name":"bpmct"},"datePublished":"2022-08-17T14:43:07Z","url":"https://github.com/coder/coder/issues/3531"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:10b57ae6-f94c-1547-534c-2b3e45a09ece
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAFFA:2AAD2E:21D670E:2D248E5:6B018D3E
html-safe-nonce141e0ebbf3174db8e745236148a78f9b42092e068bdc688c1e08489e0ae9625e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkZBOjJBQUQyRToyMUQ2NzBFOjJEMjQ4RTU6NkIwMThEM0UiLCJ2aXNpdG9yX2lkIjoiNDI2OTI5NDMwNjg3NzA4Mjk0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8a533a7443a3d9fb81469a1e4dd91175bf00c3e2cbf2df45db9e908c6233334f
hovercard-subject-tagissue:1341878708
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/3531/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a048c5740fca9ad9b14cbb5e37c72b042aaa2c8ce5c3ca5efd8cf44cb26f0513/coder/coder/issues/3531
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a048c5740fca9ad9b14cbb5e37c72b042aaa2c8ce5c3ca5efd8cf44cb26f0513/coder/coder/issues/3531
og:image:altProblem statement We currently have template-wide metadata in 2 places and have a 3rd concept in Terraform (coder_metadata). When adding new features (e.g #2221) this makes things confusing. README...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebpmct
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/3531#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F3531
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F3531
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/3531
Reloadhttps://github.com/coder/coder/issues/3531
Reloadhttps://github.com/coder/coder/issues/3531
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/3531
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/3531
Consolidate template-wide metadatahttps://github.com/coder/coder/issues/3531#top
needs decisionNeeds a higher-level decision to be unblocked.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on Aug 17, 2022https://github.com/coder/coder/issues/3531#issue-1341878708
#2221https://github.com/coder/coder/issues/2221
coder/examples/templates/docker/README.mdhttps://github.com/coder/coder/blob/4be61d9250512f85bc88ba9603928ca5ac706089/examples/templates/docker/README.md?plain=1#L1-L5
4be61d9https://github.com/coder/coder/commit/4be61d9250512f85bc88ba9603928ca5ac706089
coder_metadatahttps://registry.terraform.io/providers/coder/coder/latest/docs/resources/metadata
coder/dogfood/main.tfhttps://github.com/coder/coder/blob/4be61d9250512f85bc88ba9603928ca5ac706089/dogfood/main.tf#L52-L60
4be61d9https://github.com/coder/coder/commit/4be61d9250512f85bc88ba9603928ca5ac706089
https://user-images.githubusercontent.com/22407953/185157104-405344c6-c9dd-4c2b-aa97-0787530829f2.png
#2987https://github.com/coder/coder/issues/2987
@bpmcthttps://github.com/bpmct
@BrunoQuaresmahttps://github.com/BrunoQuaresma
@kylecarbshttps://github.com/kylecarbs
https://user-images.githubusercontent.com/22407953/185194667-1d7ffe7f-a9b8-4490-a5da-17b8f5443a57.png
https://user-images.githubusercontent.com/22407953/185194669-a499006e-2e6f-4147-ba29-31c07f3e2729.png
#2987https://github.com/coder/coder/issues/2987
coderhttps://github.com/coder
kylecarbshttps://github.com/kylecarbs
on Aug 17, 2022https://github.com/coder/coder/issues/3531#event-7207642459
https://github.com/phorcys420
phorcys420https://github.com/phorcys420
on Aug 18, 2022https://github.com/coder/coder/issues/3531#issuecomment-1219156655
https://github.com/ketang
ketanghttps://github.com/ketang
on Aug 18, 2022https://github.com/coder/coder/issues/3531#issuecomment-1219602227
https://github.com/ketang
ketanghttps://github.com/ketang
on Aug 18, 2022https://github.com/coder/coder/issues/3531#issuecomment-1219607585
#3536https://github.com/coder/coder/issues/3536
kylecarbshttps://github.com/kylecarbs
featurehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22feature%22
needs decisionNeeds a higher-level decision to be unblocked.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
on Aug 24, 2022https://github.com/coder/coder/issues/3531#event-7253197907
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on Sep 21, 2022https://github.com/coder/coder/issues/3531#issuecomment-1253188451
bpmcthttps://github.com/bpmct
not plannedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Sep 21, 2022https://github.com/coder/coder/issues/3531#event-7427282358
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/3531
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/3531
needs decisionNeeds a higher-level decision to be unblocked.https://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.