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: devtools/cmd/seeddb -bypass_license_check #48566

Closed
sfllaw opened this issue Sep 23, 2021 · 4 comments
Closed

x/pkgsite: devtools/cmd/seeddb -bypass_license_check #48566

sfllaw opened this issue Sep 23, 2021 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@sfllaw
Copy link
Contributor

sfllaw commented Sep 23, 2021

What are you trying to do?

We are running a private instance of Pkg.go.dev against our internal GitHub Enterprise Server. Like most companies, we do not bother to write LICENSE files, but would still like to see the documentation for our projects. This is why we run cmd/frontend -bypass_license_check.

What do you expect?

We also would like to run devtools/cmd/seeddb periodically to pull the most up-to-date documentation. However, this tool is hardcoded to always do the license check.

I suggest that we add the following flag to devtools/cmd/seeddb/main.go:

var bypassLicenseCheck = flag.Bool("bypass_license_check", false, "insert all data into the DB, even for non-redistributable paths")

In order to respect this flag, main.run needs to be changed so that:

	f := &worker.Fetcher{
		ProxyClient:  proxyClient,
		SourceClient: sourceClient,
	}

	if *bypassLicenseCheck {
		f.DB = postgres.NewBypassingLicenseCheck(db)
	} else {
		f.DB = postgres.New(db)
	}
@gopherbot gopherbot added this to the Unreleased milestone Sep 23, 2021
@jamalc jamalc modified the milestones: Unreleased, pkgsite/unplanned Sep 23, 2021
@jamalc jamalc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 23, 2021
@jamalc jamalc assigned jamalc and unassigned jamalc Sep 23, 2021
@sfllaw
Copy link
Contributor Author

sfllaw commented Sep 24, 2021

This is related to #39602.

@sfllaw
Copy link
Contributor Author

sfllaw commented Sep 29, 2021

@jba: I couldn’t convince you to look into this one too, could I? 🙂

@jba jba self-assigned this Sep 29, 2021
@jba
Copy link
Contributor

jba commented Sep 29, 2021

This is reasonable.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/352900 mentions this issue: devtools/cmd/seeddb: support bypassing the license check

gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 29, 2021
For golang/go#48566

Change-Id: Ia775d7a37924ec509a782227c099055fe5ebfc0c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/352900
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
@sfllaw sfllaw closed this as completed Nov 5, 2021
@rsc rsc unassigned jba Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants