From f1592fb9af21950ea8ec486b2dd7dc7bd5dfb80e Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Mon, 5 Dec 2022 10:51:57 +0100 Subject: [PATCH 1/6] chore: keep admin/prometheus.md if make target fails --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0aae5984cc342..10752072aa606 100644 --- a/Makefile +++ b/Makefile @@ -452,11 +452,8 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics go run scripts/metricsdocgen/main.go cd site -ifdef CI - yarn run format:check -else yarn run format:write -endif +.PRECIOUS: docs/admin/prometheus.md update-golden-files: cli/testdata/.gen-golden .PHONY: update-golden-files From 5be18b5d98579e4b6e607f72fcb5c75b7e120b25 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Mon, 5 Dec 2022 11:37:41 +0100 Subject: [PATCH 2/6] Address PR comments --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 10752072aa606..3877b63f6c1d5 100644 --- a/Makefile +++ b/Makefile @@ -452,8 +452,7 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics go run scripts/metricsdocgen/main.go cd site - yarn run format:write -.PRECIOUS: docs/admin/prometheus.md + yarn run format:write docs/admin/prometheus.md update-golden-files: cli/testdata/.gen-golden .PHONY: update-golden-files From 9117efa81db46a5709da01bd939b06f3ad0b4b73 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Mon, 5 Dec 2022 11:47:29 +0100 Subject: [PATCH 3/6] Formatted --- Makefile | 2 +- docs/admin/prometheus.md | 80 ++++++++++++++++++++-------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index 3877b63f6c1d5..596fb9d8ea5e8 100644 --- a/Makefile +++ b/Makefile @@ -452,7 +452,7 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk docs/admin/prometheus.md: scripts/metricsdocgen/main.go scripts/metricsdocgen/metrics go run scripts/metricsdocgen/main.go cd site - yarn run format:write docs/admin/prometheus.md + yarn run format:write ../docs/admin/prometheus.md update-golden-files: cli/testdata/.gen-golden .PHONY: update-golden-files diff --git a/docs/admin/prometheus.md b/docs/admin/prometheus.md index 91812880d443b..87f135b195f67 100644 --- a/docs/admin/prometheus.md +++ b/docs/admin/prometheus.md @@ -29,45 +29,45 @@ The environment variable `CODER_PROMETHEUS_ENABLE` will be enabled automatically -| Name | Type | Description | Labels | -| - | - | - | - | -| `coderd_api_active_users_duration_hour` | gauge | The number of users that have been active within the last hour. | | -| `coderd_api_concurrent_requests` | gauge | The number of concurrent API requests | | -| `coderd_api_concurrent_websockets` | gauge | The total number of concurrent API websockets | | -| `coderd_api_request_latencies_ms` | histogram | Latency distribution of requests in milliseconds | `method` `path` | -| `coderd_api_requests_processed_total` | counter | The total number of processed API requests | `code` `method` `path` | -| `coderd_api_websocket_durations_ms` | histogram | Websocket duration distribution of requests in milliseconds | `path` | -| `coderd_api_workspace_latest_build_total` | gauge | The latest workspace builds with a status. | `status` | -| `coderd_provisionerd_job_timings_ms` | histogram | The provisioner job time duration. | `provisioner` `status` | -| `coderd_provisionerd_jobs_current` | gauge | The number of currently running provisioner jobs. | `provisioner` | -| `go_gc_duration_seconds` | summary | A summary of the pause duration of garbage collection cycles. | | -| `go_goroutines` | gauge | Number of goroutines that currently exist. | | -| `go_info` | gauge | Information about the Go environment. | `version` | -| `go_memstats_alloc_bytes` | gauge | Number of bytes allocated and still in use. | | -| `go_memstats_alloc_bytes_total` | counter | Total number of bytes allocated, even if freed. | | -| `go_memstats_buck_hash_sys_bytes` | gauge | Number of bytes used by the profiling bucket hash table. | | -| `go_memstats_frees_total` | counter | Total number of frees. | | -| `go_memstats_gc_sys_bytes` | gauge | Number of bytes used for garbage collection system metadata. | | -| `go_memstats_heap_alloc_bytes` | gauge | Number of heap bytes allocated and still in use. | | -| `go_memstats_heap_idle_bytes` | gauge | Number of heap bytes waiting to be used. | | -| `go_memstats_heap_inuse_bytes` | gauge | Number of heap bytes that are in use. | | -| `go_memstats_heap_objects` | gauge | Number of allocated objects. | | -| `go_memstats_heap_released_bytes` | gauge | Number of heap bytes released to OS. | | -| `go_memstats_heap_sys_bytes` | gauge | Number of heap bytes obtained from system. | | -| `go_memstats_last_gc_time_seconds` | gauge | Number of seconds since 1970 of last garbage collection. | | -| `go_memstats_lookups_total` | counter | Total number of pointer lookups. | | -| `go_memstats_mallocs_total` | counter | Total number of mallocs. | | -| `go_memstats_mcache_inuse_bytes` | gauge | Number of bytes in use by mcache structures. | | -| `go_memstats_mcache_sys_bytes` | gauge | Number of bytes used for mcache structures obtained from system. | | -| `go_memstats_mspan_inuse_bytes` | gauge | Number of bytes in use by mspan structures. | | -| `go_memstats_mspan_sys_bytes` | gauge | Number of bytes used for mspan structures obtained from system. | | -| `go_memstats_next_gc_bytes` | gauge | Number of heap bytes when next garbage collection will take place. | | -| `go_memstats_other_sys_bytes` | gauge | Number of bytes used for other system allocations. | | -| `go_memstats_stack_inuse_bytes` | gauge | Number of bytes in use by the stack allocator. | | -| `go_memstats_stack_sys_bytes` | gauge | Number of bytes obtained from system for stack allocator. | | -| `go_memstats_sys_bytes` | gauge | Number of bytes obtained from system. | | -| `go_threads` | gauge | Number of OS threads created. | | -| `promhttp_metric_handler_requests_in_flight` | gauge | Current number of scrapes being served. | | -| `promhttp_metric_handler_requests_total` | counter | Total number of scrapes by HTTP status code. | `code` | +| Name | Type | Description | Labels | +| -------------------------------------------- | --------- | ------------------------------------------------------------------ | ---------------------- | +| `coderd_api_active_users_duration_hour` | gauge | The number of users that have been active within the last hour. | | +| `coderd_api_concurrent_requests` | gauge | The number of concurrent API requests | | +| `coderd_api_concurrent_websockets` | gauge | The total number of concurrent API websockets | | +| `coderd_api_request_latencies_ms` | histogram | Latency distribution of requests in milliseconds | `method` `path` | +| `coderd_api_requests_processed_total` | counter | The total number of processed API requests | `code` `method` `path` | +| `coderd_api_websocket_durations_ms` | histogram | Websocket duration distribution of requests in milliseconds | `path` | +| `coderd_api_workspace_latest_build_total` | gauge | The latest workspace builds with a status. | `status` | +| `coderd_provisionerd_job_timings_ms` | histogram | The provisioner job time duration. | `provisioner` `status` | +| `coderd_provisionerd_jobs_current` | gauge | The number of currently running provisioner jobs. | `provisioner` | +| `go_gc_duration_seconds` | summary | A summary of the pause duration of garbage collection cycles. | | +| `go_goroutines` | gauge | Number of goroutines that currently exist. | | +| `go_info` | gauge | Information about the Go environment. | `version` | +| `go_memstats_alloc_bytes` | gauge | Number of bytes allocated and still in use. | | +| `go_memstats_alloc_bytes_total` | counter | Total number of bytes allocated, even if freed. | | +| `go_memstats_buck_hash_sys_bytes` | gauge | Number of bytes used by the profiling bucket hash table. | | +| `go_memstats_frees_total` | counter | Total number of frees. | | +| `go_memstats_gc_sys_bytes` | gauge | Number of bytes used for garbage collection system metadata. | | +| `go_memstats_heap_alloc_bytes` | gauge | Number of heap bytes allocated and still in use. | | +| `go_memstats_heap_idle_bytes` | gauge | Number of heap bytes waiting to be used. | | +| `go_memstats_heap_inuse_bytes` | gauge | Number of heap bytes that are in use. | | +| `go_memstats_heap_objects` | gauge | Number of allocated objects. | | +| `go_memstats_heap_released_bytes` | gauge | Number of heap bytes released to OS. | | +| `go_memstats_heap_sys_bytes` | gauge | Number of heap bytes obtained from system. | | +| `go_memstats_last_gc_time_seconds` | gauge | Number of seconds since 1970 of last garbage collection. | | +| `go_memstats_lookups_total` | counter | Total number of pointer lookups. | | +| `go_memstats_mallocs_total` | counter | Total number of mallocs. | | +| `go_memstats_mcache_inuse_bytes` | gauge | Number of bytes in use by mcache structures. | | +| `go_memstats_mcache_sys_bytes` | gauge | Number of bytes used for mcache structures obtained from system. | | +| `go_memstats_mspan_inuse_bytes` | gauge | Number of bytes in use by mspan structures. | | +| `go_memstats_mspan_sys_bytes` | gauge | Number of bytes used for mspan structures obtained from system. | | +| `go_memstats_next_gc_bytes` | gauge | Number of heap bytes when next garbage collection will take place. | | +| `go_memstats_other_sys_bytes` | gauge | Number of bytes used for other system allocations. | | +| `go_memstats_stack_inuse_bytes` | gauge | Number of bytes in use by the stack allocator. | | +| `go_memstats_stack_sys_bytes` | gauge | Number of bytes obtained from system for stack allocator. | | +| `go_memstats_sys_bytes` | gauge | Number of bytes obtained from system. | | +| `go_threads` | gauge | Number of OS threads created. | | +| `promhttp_metric_handler_requests_in_flight` | gauge | Current number of scrapes being served. | | +| `promhttp_metric_handler_requests_total` | counter | Total number of scrapes by HTTP status code. | `code` | From 6e536282e5b54e87170d9c0ff6474238acff2aac Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Mon, 5 Dec 2022 12:00:54 +0100 Subject: [PATCH 4/6] fix: prettier misses docs --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0aae5984cc342..d054f5fee0f02 100644 --- a/Makefile +++ b/Makefile @@ -359,9 +359,9 @@ fmt/prettier: cd site # Avoid writing files in CI to reduce file write activity ifdef CI - yarn run format:check + yarn run format:check . ../docs else - yarn run format:write + yarn run format:write . ../docs endif .PHONY: fmt/prettier From 36e1041e69fc0d019c96ff5953d64aa12e33c21e Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Mon, 5 Dec 2022 12:01:26 +0100 Subject: [PATCH 5/6] make fmt --- docs/CONTRIBUTING.md | 3 +- docs/README.md | 2 +- docs/admin/git-providers.md | 2 +- docs/admin/groups.md | 1 - docs/admin/prometheus.md | 80 ++++++++++++------------ docs/admin/quotas.md | 12 ++-- docs/admin/telemetry.md | 2 +- docs/contributing/documentation.md | 32 +++++----- docs/dotfiles.md | 2 + docs/enterprise.md | 3 + docs/ides/web-ides.md | 1 - docs/manifest.json | 6 +- docs/quickstart/docker.md | 71 +++++++++++---------- docs/quickstart/google-cloud-platform.md | 40 ++++++------ docs/templates.md | 2 +- docs/templates/resource-persistence.md | 10 +-- docs/workspaces.md | 1 + 17 files changed, 134 insertions(+), 136 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 6a1543597d4a2..2f8b2713b293a 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -39,6 +39,7 @@ direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +HOST_PATH +IN_NIX_SHELL +LD +NIX_ ``` Alternatively if you do not want to use nix then you'll need to install the need the following tools by hand: + - Go 1.18+ - on macOS, run `brew install go` - Node 14+ @@ -63,7 +64,6 @@ Alternatively if you do not want to use nix then you'll need to install the need - [`pandoc`]() - on macOS, run `brew install pandocomatic` - ### Development workflow Use the following `make` commands and scripts in development: @@ -143,7 +143,6 @@ $ git ls-files v0.12.2 -- coderd/database/migrations/*.up.sql This helps in naming the dump (e.g. `000069` above). - ## Styling ### Documentation diff --git a/docs/README.md b/docs/README.md index 3ece092629e13..81e9924b8714b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -92,6 +92,6 @@ Azure, Google Cloud, Kubernetes, and more. - Coder is not a SaaS/fully-managed offering. You must host Coder on a cloud service (AWS, Azure, GCP) or your private data center. - ## Up next + - Learn about [Templates](./templates.md) diff --git a/docs/admin/git-providers.md b/docs/admin/git-providers.md index a457ac717ede9..0a930f6a20fec 100644 --- a/docs/admin/git-providers.md +++ b/docs/admin/git-providers.md @@ -4,7 +4,7 @@ Coder integrates with git providers so developers can authenticate with reposito ## How it works -When developers use `git` inside their workspace, they are first prompted to authenticate. After that, Coder will store/refresh tokens for future operations. +When developers use `git` inside their workspace, they are first prompted to authenticate. After that, Coder will store/refresh tokens for future operations.