Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed May 2, 2024
1 parent bff101b commit 9ee89ce
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 22 deletions.
5 changes: 5 additions & 0 deletions dev/managedservicesplatform/operationdocs/BUILD.bazel
Expand Up @@ -6,6 +6,7 @@ go_library(
srcs = [
"index.go",
"links.go",
"notion.go",
"operationdocs.go",
],
importpath = "github.com/sourcegraph/sourcegraph/dev/managedservicesplatform/operationdocs",
Expand All @@ -16,6 +17,8 @@ go_library(
"//dev/managedservicesplatform/spec",
"//lib/errors",
"//lib/pointers",
"@com_github_sourcegraph_notionreposync//markdown:go_default_library",
"@com_github_sourcegraph_notionreposync//renderer:go_default_library",
"@com_github_vvakame_gcplogurl//:gcplogurl",
"@org_golang_x_exp//maps",
],
Expand All @@ -34,6 +37,8 @@ go_test(
"//dev/managedservicesplatform/spec",
"//lib/pointers",
"@com_github_hexops_autogold_v2//:autogold",
"@com_github_sourcegraph_notionreposync//renderer/renderertest:go_default_library",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)
Expand Up @@ -9,7 +9,10 @@ go_library(
],
importpath = "github.com/sourcegraph/sourcegraph/dev/managedservicesplatform/operationdocs/internal/markdown",
visibility = ["//dev/managedservicesplatform/operationdocs:__subpackages__"],
deps = ["@com_github_olekukonko_tablewriter//:tablewriter"],
deps = [
"//dev/managedservicesplatform/operationdocs/internal/markdown/headings",
"@com_github_olekukonko_tablewriter//:tablewriter",
],
)

go_test(
Expand Down
@@ -0,0 +1,8 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "headings",
srcs = ["headings.go"],
importpath = "github.com/sourcegraph/sourcegraph/dev/managedservicesplatform/operationdocs/internal/markdown/headings",
visibility = ["//dev/managedservicesplatform/operationdocs:__subpackages__"],
)
8 changes: 2 additions & 6 deletions dev/managedservicesplatform/operationdocs/operationdocs.go
Expand Up @@ -303,12 +303,8 @@ You may want to check your service environment's TFC workspaces if a Terraform a
markdown.Link(markdown.Code("sourcegraph/managed-services"), "https://github.com/sourcegraph/managed-services"))

md.Admonitionf(markdown.AdmonitionNote, `If you are looking for service logs, see the %s section instead. In general:
%s`,
cloudRunSectionLink, markdown.List([]string{
fmt.Sprintf("check service logs (%s) if your service has gone down or is misbehaving", cloudRunSectionLink),
"check TFC workspaces for infrastructure provisioning or configuration issues",
}))
check service logs if your service has gone down or is misbehaving, and check TFC workspaces for infrastructure provisioning or configuration issues.`,
cloudRunSectionLink)

md.Paragraphf(`To access this environment's Terraform Cloud workspaces, you will need to [log in to Terraform Cloud](https://app.terraform.io/app/sourcegraph) and then [request Entitle access to membership in the "Managed Services Platform Operator" TFC team](https://app.entitle.io/request?data=eyJkdXJhdGlvbiI6IjM2MDAiLCJqdXN0aWZpY2F0aW9uIjoiSlVTVElGSUNBVElPTiBIRVJFIiwicm9sZUlkcyI6W3siaWQiOiJiMzg3MzJjYy04OTUyLTQ2Y2QtYmIxZS1lZjI2ODUwNzIyNmIiLCJ0aHJvdWdoIjoiYjM4NzMyY2MtODk1Mi00NmNkLWJiMWUtZWYyNjg1MDcyMjZiIiwidHlwZSI6InJvbGUifV19).
The "Managed Services Platform Operator" team has access to all MSP TFC workspaces.`)
Expand Down
Expand Up @@ -72,9 +72,7 @@ You may want to check your service environment's TFC workspaces if a Terraform a

> [!NOTE]
> If you are looking for service logs, see the [test Cloud Run](#test-cloud-run) section instead. In general:
>
> - check service logs ([test Cloud Run](#test-cloud-run)) if your service has gone down or is misbehaving
> - check TFC workspaces for infrastructure provisioning or configuration issues
> check service logs if your service has gone down or is misbehaving, and check TFC workspaces for infrastructure provisioning or configuration issues.

To access this environment's Terraform Cloud workspaces, you will need to [log in to Terraform Cloud](https://app.terraform.io/app/sourcegraph) and then [request Entitle access to membership in the "Managed Services Platform Operator" TFC team](https://app.entitle.io/request?data=eyJkdXJhdGlvbiI6IjM2MDAiLCJqdXN0aWZpY2F0aW9uIjoiSlVTVElGSUNBVElPTiBIRVJFIiwicm9sZUlkcyI6W3siaWQiOiJiMzg3MzJjYy04OTUyLTQ2Y2QtYmIxZS1lZjI2ODUwNzIyNmIiLCJ0aHJvdWdoIjoiYjM4NzMyY2MtODk1Mi00NmNkLWJiMWUtZWYyNjg1MDcyMjZiIiwidHlwZSI6InJvbGUifV19).
The "Managed Services Platform Operator" team has access to all MSP TFC workspaces.
Expand Down
Expand Up @@ -75,9 +75,7 @@ You may want to check your service environment's TFC workspaces if a Terraform a

> [!NOTE]
> If you are looking for service logs, see the [test Cloud Run](#test-cloud-run) section instead. In general:
>
> - check service logs ([test Cloud Run](#test-cloud-run)) if your service has gone down or is misbehaving
> - check TFC workspaces for infrastructure provisioning or configuration issues
> check service logs if your service has gone down or is misbehaving, and check TFC workspaces for infrastructure provisioning or configuration issues.

To access this environment's Terraform Cloud workspaces, you will need to [log in to Terraform Cloud](https://app.terraform.io/app/sourcegraph) and then [request Entitle access to membership in the "Managed Services Platform Operator" TFC team](https://app.entitle.io/request?data=eyJkdXJhdGlvbiI6IjM2MDAiLCJqdXN0aWZpY2F0aW9uIjoiSlVTVElGSUNBVElPTiBIRVJFIiwicm9sZUlkcyI6W3siaWQiOiJiMzg3MzJjYy04OTUyLTQ2Y2QtYmIxZS1lZjI2ODUwNzIyNmIiLCJ0aHJvdWdoIjoiYjM4NzMyY2MtODk1Mi00NmNkLWJiMWUtZWYyNjg1MDcyMjZiIiwidHlwZSI6InJvbGUifV19).
The "Managed Services Platform Operator" team has access to all MSP TFC workspaces.
Expand Down Expand Up @@ -136,9 +134,7 @@ You may want to check your service environment's TFC workspaces if a Terraform a

> [!NOTE]
> If you are looking for service logs, see the [robert Cloud Run](#robert-cloud-run) section instead. In general:
>
> - check service logs ([robert Cloud Run](#robert-cloud-run)) if your service has gone down or is misbehaving
> - check TFC workspaces for infrastructure provisioning or configuration issues
> check service logs if your service has gone down or is misbehaving, and check TFC workspaces for infrastructure provisioning or configuration issues.

To access this environment's Terraform Cloud workspaces, you will need to [log in to Terraform Cloud](https://app.terraform.io/app/sourcegraph) and then [request Entitle access to membership in the "Managed Services Platform Operator" TFC team](https://app.entitle.io/request?data=eyJkdXJhdGlvbiI6IjM2MDAiLCJqdXN0aWZpY2F0aW9uIjoiSlVTVElGSUNBVElPTiBIRVJFIiwicm9sZUlkcyI6W3siaWQiOiJiMzg3MzJjYy04OTUyLTQ2Y2QtYmIxZS1lZjI2ODUwNzIyNmIiLCJ0aHJvdWdoIjoiYjM4NzMyY2MtODk1Mi00NmNkLWJiMWUtZWYyNjg1MDcyMjZiIiwidHlwZSI6InJvbGUifV19).
The "Managed Services Platform Operator" team has access to all MSP TFC workspaces.
Expand Down
Expand Up @@ -98,9 +98,7 @@ You may want to check your service environment's TFC workspaces if a Terraform a

> [!NOTE]
> If you are looking for service logs, see the [test Cloud Run](#test-cloud-run) section instead. In general:
>
> - check service logs ([test Cloud Run](#test-cloud-run)) if your service has gone down or is misbehaving
> - check TFC workspaces for infrastructure provisioning or configuration issues
> check service logs if your service has gone down or is misbehaving, and check TFC workspaces for infrastructure provisioning or configuration issues.

To access this environment's Terraform Cloud workspaces, you will need to [log in to Terraform Cloud](https://app.terraform.io/app/sourcegraph) and then [request Entitle access to membership in the "Managed Services Platform Operator" TFC team](https://app.entitle.io/request?data=eyJkdXJhdGlvbiI6IjM2MDAiLCJqdXN0aWZpY2F0aW9uIjoiSlVTVElGSUNBVElPTiBIRVJFIiwicm9sZUlkcyI6W3siaWQiOiJiMzg3MzJjYy04OTUyLTQ2Y2QtYmIxZS1lZjI2ODUwNzIyNmIiLCJ0aHJvdWdoIjoiYjM4NzMyY2MtODk1Mi00NmNkLWJiMWUtZWYyNjg1MDcyMjZiIiwidHlwZSI6InJvbGUifV19).
The "Managed Services Platform Operator" team has access to all MSP TFC workspaces.
Expand Down
Expand Up @@ -73,9 +73,7 @@ You may want to check your service environment's TFC workspaces if a Terraform a

> [!NOTE]
> If you are looking for service logs, see the [test Cloud Run](#test-cloud-run) section instead. In general:
>
> - check service logs ([test Cloud Run](#test-cloud-run)) if your service has gone down or is misbehaving
> - check TFC workspaces for infrastructure provisioning or configuration issues
> check service logs if your service has gone down or is misbehaving, and check TFC workspaces for infrastructure provisioning or configuration issues.

To access this environment's Terraform Cloud workspaces, you will need to [log in to Terraform Cloud](https://app.terraform.io/app/sourcegraph) and then [request Entitle access to membership in the "Managed Services Platform Operator" TFC team](https://app.entitle.io/request?data=eyJkdXJhdGlvbiI6IjM2MDAiLCJqdXN0aWZpY2F0aW9uIjoiSlVTVElGSUNBVElPTiBIRVJFIiwicm9sZUlkcyI6W3siaWQiOiJiMzg3MzJjYy04OTUyLTQ2Y2QtYmIxZS1lZjI2ODUwNzIyNmIiLCJ0aHJvdWdoIjoiYjM4NzMyY2MtODk1Mi00NmNkLWJiMWUtZWYyNjg1MDcyMjZiIiwidHlwZSI6InJvbGUifV19).
The "Managed Services Platform Operator" team has access to all MSP TFC workspaces.
Expand Down
5 changes: 5 additions & 0 deletions dev/sg/msp/BUILD.bazel
Expand Up @@ -5,6 +5,7 @@ go_library(
name = "msp",
srcs = [
"helpers.go",
"notion.go",
"sg_msp.go",
],
importpath = "github.com/sourcegraph/sourcegraph/dev/sg/msp",
Expand Down Expand Up @@ -32,9 +33,13 @@ go_library(
"//lib/errors",
"//lib/output",
"//lib/pointers",
"@com_github_jomei_notionapi//:go_default_library",
"@com_github_sourcegraph_conc//pool",
"@com_github_sourcegraph_notionreposync//notion:go_default_library",
"@com_github_sourcegraph_run//:run",
"@com_github_urfave_cli_v2//:cli",
"@org_golang_x_exp//maps",
"@org_uber_go_atomic//:atomic",
],
)

Expand Down

0 comments on commit 9ee89ce

Please sign in to comment.