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

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

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

sfllaw opened this issue Sep 23, 2021 · 4 comments

Comments

@sfllaw
Copy link

@sfllaw 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 removed this from the Unreleased milestone Sep 23, 2021
@jamalc jamalc added this to the pkgsite/unplanned milestone Sep 23, 2021
@jamalc jamalc assigned jamalc and unassigned jamalc Sep 23, 2021
@sfllaw
Copy link
Author

@sfllaw sfllaw commented Sep 24, 2021

This is related to #39602.

@sfllaw
Copy link
Author

@sfllaw 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 jba commented Sep 29, 2021

This is reasonable.

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 29, 2021

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants