diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-04-12 18:21:05 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-04-13 11:11:51 +0000 |
| commit | b6c709824c06f07477efdfa5bd2d5dc7ad76b0fa (patch) | |
| tree | df6e0ac0eca38b69f5f30fea349d0c72cc4190e2 /internal/postgres/unit.go | |
| parent | b0d7b43aac22485c636bd144e0232b3f9b42453e (diff) | |
| download | go-x-pkgsite-b6c709824c06f07477efdfa5bd2d5dc7ad76b0fa.tar.xz | |
many: remove "retractions" experiment
For golang/go#43265
Change-Id: Iac39814ce532adf5846bb768802a46ad7a77fa84
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/309609
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres/unit.go')
| -rw-r--r-- | internal/postgres/unit.go | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/internal/postgres/unit.go b/internal/postgres/unit.go index 5d48ebef..5cac3e2a 100644 --- a/internal/postgres/unit.go +++ b/internal/postgres/unit.go @@ -124,21 +124,19 @@ func (db *DB) getUnitMetaWithKnownLatestVersion(ctx context.Context, fullPath, m } um.Licenses = lics - if experiment.IsActive(ctx, internal.ExperimentRetractions) { - // If we don't have the latest version information, try to get it. - // We can be here if there is really no info (in which case we are repeating - // some work, but it's fast), or if we are ignoring the info (for instance, - // if all versions were retracted). - if lmv == nil { - lmv, err = db.GetLatestModuleVersions(ctx, um.ModulePath) - if err != nil { - return nil, err - } - } - if lmv != nil { - lmv.PopulateModuleInfo(&um.ModuleInfo) + // If we don't have the latest version information, try to get it. + // We can be here if there is really no info (in which case we are repeating + // some work, but it's fast), or if we are ignoring the info (for instance, + // if all versions were retracted). + if lmv == nil { + lmv, err = db.GetLatestModuleVersions(ctx, um.ModulePath) + if err != nil { + return nil, err } } + if lmv != nil { + lmv.PopulateModuleInfo(&um.ModuleInfo) + } return &um, nil } |
