Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: clean module versions from DB #45852

Closed
jba opened this issue Apr 29, 2021 · 5 comments
Closed

x/pkgsite: clean module versions from DB #45852

jba opened this issue Apr 29, 2021 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@jba
Copy link
Contributor

jba commented Apr 29, 2021

Remove old and unlikely-to-be-used modules from the DB. These include pseudo-versions that are not the latest version and haven't been fetched recently. Preserve versions that appear in search or are the current values of the "main" or "master" branch.

Any version can still be fetched explicitly by requesting it from pkg.go.dev.

@jba jba added the pkgsite label Apr 29, 2021
@jba jba added this to the pkgsite/unplanned milestone Apr 29, 2021
@jba jba self-assigned this Apr 29, 2021
@gopherbot
Copy link

Change https://golang.org/cl/315089 mentions this issue: internal/postgres: determine modules to clean

@gopherbot
Copy link

Change https://golang.org/cl/315090 mentions this issue: internal/postgres: add function to clean modules

@gopherbot
Copy link

Change https://golang.org/cl/315091 mentions this issue: internal/worker: add handler for cleaning

gopherbot pushed a commit to golang/pkgsite that referenced this issue Apr 29, 2021
Define a function that lists all the module versions
that are eligible for cleaning (removal, and omission from
subsequent reprocessing).

For golang/go#45852

Change-Id: Id02f1f82e16dc13a74dbda91e7ca5ab221145755
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315089
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Apr 29, 2021
Add CleanModuleVersions, which deletes module versions
and gives them Cleaned status in module_version_states.

For golang/go#45852

Change-Id: I26af0981f75e735aebbf3ca2606ce8261330ee7c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315090
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Apr 29, 2021
Add a handler for cleaning that will be hooked up to a Cloud Scheduler
job.

For golang/go#45852

Change-Id: I4ee0a2356ab9a63359d6713096cf903403475fcf
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315091
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/315829 mentions this issue: internal/worker: /clean endpoint supports a single module

gopherbot pushed a commit to golang/pkgsite that referenced this issue May 1, 2021
The /clean endpoint can be used to clean all versions of a given
module.

For golang/go#45852

Change-Id: Ie39d142c9c1049213eb5319d31196d77e3b7052f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315829
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>
@julieqiu julieqiu added the NeedsFix The path to resolution is known, but the work has not been done. label May 3, 2021
@jba
Copy link
Contributor Author

jba commented Jun 21, 2021

We're now doing this.

@jba jba closed this as completed Jun 21, 2021
@golang golang locked and limited conversation to collaborators Jun 21, 2022
@rsc rsc unassigned jba Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

3 participants