aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/insert_module.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2020-10-28 07:21:00 -0400
committerJonathan Amsterdam <jba@google.com>2020-10-28 14:53:59 +0000
commit2e8f155278c87ed6ad13dc759a1fea93d6686845 (patch)
treeebc6be90b6009a6675cc3d6527cc01ba81d551e9 /internal/postgres/insert_module.go
parenta4e29a5ffab0f9bdb021e8037e3a91915779c151 (diff)
downloadgo-x-pkgsite-2e8f155278c87ed6ad13dc759a1fea93d6686845.tar.xz
internal: remove insert-package-source experiment
It is at 100% in all environments. Change-Id: I4e2b859e9cd81df1ddfa9e677afe8d13d31b400f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/265878 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/insert_module.go')
-rw-r--r--internal/postgres/insert_module.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/internal/postgres/insert_module.go b/internal/postgres/insert_module.go
index 9d55a5b3..b01f3261 100644
--- a/internal/postgres/insert_module.go
+++ b/internal/postgres/insert_module.go
@@ -24,7 +24,6 @@ import (
"golang.org/x/pkgsite/internal"
"golang.org/x/pkgsite/internal/database"
"golang.org/x/pkgsite/internal/derrors"
- "golang.org/x/pkgsite/internal/experiment"
"golang.org/x/pkgsite/internal/log"
"golang.org/x/pkgsite/internal/stdlib"
"golang.org/x/pkgsite/internal/version"
@@ -315,7 +314,7 @@ func insertUnits(ctx context.Context, db *database.DB, m *internal.Module, modul
if d.Documentation != nil && d.Documentation.HTML.String() == internal.StringFieldMissing {
return errors.New("insertUnits: package missing Documentation.HTML")
}
- if d.Documentation != nil && experiment.IsActive(ctx, internal.ExperimentInsertPackageSource) {
+ if d.Documentation != nil {
if d.Documentation.Source == nil {
return fmt.Errorf("insertUnits: unit %q missing source files", d.Path)
}
@@ -394,16 +393,10 @@ func insertUnits(ctx context.Context, db *database.DB, m *internal.Module, modul
continue
}
id := pathToID[path]
- docValues = append(docValues, id, doc.GOOS, doc.GOARCH, doc.Synopsis, makeValidUnicode(doc.HTML.String()))
- if experiment.IsActive(ctx, internal.ExperimentInsertPackageSource) {
- docValues = append(docValues, doc.Source)
- }
+ docValues = append(docValues, id, doc.GOOS, doc.GOARCH, doc.Synopsis, makeValidUnicode(doc.HTML.String()), doc.Source)
}
uniqueCols := []string{"path_id", "goos", "goarch"}
- docCols := append(uniqueCols, "synopsis", "html")
- if experiment.IsActive(ctx, internal.ExperimentInsertPackageSource) {
- docCols = append(docCols, "source")
- }
+ docCols := append(uniqueCols, "synopsis", "html", "source")
if err := db.BulkUpsert(ctx, "documentation", docCols, docValues, uniqueCols); err != nil {
return err
}