aboutsummaryrefslogtreecommitdiff
path: root/internal/testing/integration
AgeCommit message (Collapse)Author
2026-02-25internal/queue: move InMemory queue to its own packageJean Barkhuysen
Currently, InMemory queue sits in queue, and is instantiated in gcpqueue for convenience. In preparation for a third queue type (Postgres), this CL separates the two more cleanly, making it more ergonomic for the new queue type to slot in next to the existing two. This CL doesn't change any logic: it just exists to make the next CL smaller and easier to review. I also took the liberty of adding some tests specific to the InMemory queue, since I didn't find any. Let me know if it's tested in another place, though, and if you'd prefer me to remove it. Updates golang/go#74027. Change-Id: I44bd92129f33bc7975fcd138c905e0b7ab49d257 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/747881 kokoro-CI: kokoro <noreply+kokoro@google.com> Auto-Submit: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ethan Lee <ethanalee@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2025-06-24Revert "internal/frontend: recycle database connections every 5m"Robert Findley
This reverts commit 4b544d88ef33b543889e92d50bcc7b02d4b95ff0. Reason for revert: From slack, this causes the following error: 2025/06/23 21:17:14 Error: middleware.Panic: sql: Register called twice for driver ocWrapper-pgx Change-Id: I7caf80f4e13ca341e2f29d20c4b5b9ed963695b2 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/683635 Auto-Submit: Robert Findley <rfindley@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2025-06-23internal/frontend: recycle database connections every 5mRob Findley
In order to avoid imbalance between pkgsite's two database instances, recycle connections every 5 minutes. Change-Id: I9ca1e686a90f8c61619fd76454ec66163e501ee1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/680175 kokoro-CI: kokoro <noreply+kokoro@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2023-11-15internal/testing/htmlcheck: replace use of cascadia in InMichael Matloob
This cl implements the :nth-child() and :nth-of-type() pseudoclasses for the css selector query function, allowing it to be used for htmlcheck.In. It also replaces the single use of a a child combinator '>' in a test with a descendant combinator ' ' so that we don't need to implement the child combinator. The test should have the same behavior. For golang/go#61399 Change-Id: I09d9b8fbcd0eafd37aceb5994515687c85244ef8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/542058 kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2023-08-29internal/source: inject *http.Client into source.NewClientMichael Matloob
This removes the dependency from package source onto ochttp. The users of source.NewClient that want an ochttp.Transport can set the transport on the *http.Client. For golang/go#61399 Change-Id: Ifb7126c482f664ee5a359f594d9324f0fd90f8b2 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/523510 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> kokoro-CI: kokoro <noreply+kokoro@google.com>
2023-08-21internal/frontend: move fetchserver and versions to their own packagesMichael Matloob
Moving fetchserver to its own package will allow us to to move the fetch logic, which isn't used by cmd/pkgsite because it doesn't have a postgres database, out of the frontend and pkgsite. The tests, which depend on a postgres database are moved out too, removing a few users of the postgres database in the tests. The versions code is moved into its own package as well so it can be used by the fetchserver code without depending on the frontend package. Most of server_test.go, which was testing features that are provided by what is now the FetchServer has been moved to the fetchserver package. To ensure that git properly realizes it as a move, the rest of server_test has been moved to frontend_test. In some cases I made copies of functions (absoluteTime, insertTestModules) instead of creating intermediate packages to contain them. For golang/go#61399 Change-Id: Ic94419f9d75f766e289cc3fb9a1521173cefb4d1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/519335 Reviewed-by: Robert Findley <rfindley@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org>
2023-08-21internal/frontend: separate fetch and 404 logic into fetchserverMichael Matloob
ServeFetch and ServePathNotFoundPage only work when a postgres database is present. Separate them out into a different fetchserver type which can be moved into a different package (in a followup cl). This will allow their behavior, which is not used by cmd/pkgsite, to be removed from that server. More importantly, their tests, which depend on a real postgres database can be separated from the tests of package internal/frontend. For golang/go#61399 Change-Id: I73677fd06750fd48580071b8a895b322d9e3ac5d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/518817 kokoro-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
2023-08-04internal/frontend: add an interface for creating request cachesMichael Matloob
This change adds a new Cacher interface that is used to create middlewares for caching requests. This abstracts away the use of redis so that the frontend doesn't depend on redis. The tests still depend on redis for the 404 page testing logic, but the 404 page logic will be moved out into a different package so those tests will go too. The Expirer and Middleware interfaces are not present on the Cache function so that the interface can be defined in package internal/frontend without needing the dependency on the Middleware package. For golang/go#61399 Change-Id: I6518b2ed1d772cb4deda3308c4190f0f1b8a35a0 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/514518 kokoro-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org>
2023-07-10internal: add build tags guarding code that doesn't build on plan9Michael Matloob
This is intended to get the misc-compile-plan9 builder passing. internal/static adds a stub for plan9 that panics since the esbuild module it uses doesn't build on plan9. A bunch of tests that use miniredis are build tagged since miniredis doesn't build on plan9 The setup of testDB in server_test.go is moved to its own file frontend_test so it can be used by other test files in the package while allowing us to disable server_test which uses miniredis. For #61209 Change-Id: Iacb39180459e31c946d02b62e8c03e91368c087a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/508448 TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Run-TryBot: Michael Matloob <matloob@google.com>
2022-06-17many: re-enable staticcheck and fix problemsJonathan Amsterdam
Most of the checks were about io/ioutil. There were a couple of other minor ones. I didn't address the check for strings.Title; instead, I turned off that check globally with a staticcheck.conf file. Change-Id: I286a6894fb1fd891818ab9e451c891f52a3828fc Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/412675 Reviewed-by: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-11-16internal/frontend: add debug handlersJonathan Amsterdam
Add handlers that: - serve basic info about the Cloud Run revision and instance - serve pprof information, so we can track memory leaks These are only live if the "debug" experiment is active, so we can turn them on and off dynamically. Change-Id: I71a14f3893066d44432cd26b0a327deddb2040d9 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/364354 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-10-28many: cmd/pkgsite embeds static assetsJonathan Amsterdam
The `pkgsite` command now embeds all the static assets it needs, so it need not be told the location of the static/ directory with a flag. The binary is self-contained and can be placed and invoked from anywhere. This required embedding the static/ and third_party/ directories. Since //go:embed cannot reference files outside the containing package's tree, we had to add trivial Go packages in static/ and third_party/ to construct `embed.FS`s for those directories. Also, the frontend needed to accept `fs.FS` values where it previously took paths, and `template.TrustedFS` values where it previously used `template.TrustedSources`. We ended up clumsily requiring four separate config values: - A TrustedFS to load templates. - Two fs.FSs, one for static and one for third_party, to load other assets. - The path to the static directory as a string, solely to support dynamic loading in dev mode. For golang/go#48410 Change-Id: I9eeb351b1c6f23444b9e65b60f2a1d3905d59ef9 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/359395 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-09-07internal/fetch: get source info from module getterJonathan Amsterdam
Make it the ModuleGetter's responsibility to provide links to source files, instead of passing around a separate source.Client. This will allow getters that fetch from disk to serve those local files. For golang/go#47982 Change-Id: I6c7cd7890b03ad61d9410850a510c1c9a63f1c9a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347749 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>
2021-09-01internal: change m=json to content=jsonJulie Qiu
The m=json query param that is allowed when serve stats is enabled to changed to content=json, to avoid clashing with the m=package or m=symbol param on the search page. Change-Id: I5037da00323e1c721485347c6616418edb1c64fe Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/346410 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-09-01internal/{worker/fetch}: include DB activity in load-sheddingJonathan Amsterdam
Move the load-shedding logic to the worker and have it span both the fetch and processing of the module (as previously) as well as inserting it into the database. This is a more accurate estimation of load, since running a lot of concurrent queries definitely slows down processing. Most of the time this won't make much difference, but under high load, such as when processing multiple large modules, it will reduce DB contention and should result in greater throughput. For golang/go#48010 Change-Id: I7d0922e02d00182e867fd3b29fc284c32ecab5ee Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/346749 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>
2021-08-23static,internal: remove new-unit-layout experimentJamal Carvalho
Change-Id: Ib7d3a51fdc427cabcbec998130c6973497c1a750 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/344394 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
2021-08-23internal/fetch: use fs.FSJonathan Amsterdam
Rewrite fetch code to use fs.FS instead of zip.Reader. For golang/go#47834 Change-Id: Iefdd16b367218690c4e5bea2a4688bea10a94be1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/343952 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>
2021-08-20internal,tests: delete symbol history experimentsJulie Qiu
Change-Id: If780b7339dfb415c2060dc1fc9f020a5af57665d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/343709 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-08-18internal/proxy/proxytest: proxy test codeJonathan Amsterdam
Most of the code in internal/proxy was only for testing. Move it to a separate package for clarity. Change-Id: Ie9d241bc8a12923b579a7dd69ae7b36aaa1fd42a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/343209 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>
2021-08-06all: delete redis HA clientsJulie Qiu
The redis HA was used by search autocomplete and is no longer used by anything. Change-Id: I39a2c81c47da53823d7b668a980159c4726c6b13 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/340393 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-08-05tests/api,internal/frontend: add compare scriptJulie Qiu
The tests/api/main.go script is updated to compare the frontend symbol history data with data in tests/api/testdata. For golang/go#37102 Change-Id: I5eb5fc367343ce386c7a2d2d7a53c0d3fad9da4f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/339490 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-07-30internal: delete ReadSymbolHistory experimentJulie Qiu
The ReadSymbolHistory is deleted, since the symbol_history table has been fully populated. When either ExperimentSymbolHistoryMainPage or ExperimentSymbolHistoryVersionsPage is active, data is now always read from symbol_history instead of a JOIN on package_symbols and documentation_symbols. For golang/go#37102 Change-Id: I8ca0aece399217b804a9a6c55bbfec5efe5b3a18 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/338450 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-07-19internal/postgres: change experiment for documentation_symbols upsertJulie Qiu
Data is now inserted into documentation_symbols if the insert-symbol-search-documents experiment is on, as opposed to if skip-insert-symbols is off. This table is needed for the symbol search design, but it's unnecessary to insert into that table unless we are also inserting into symbol search documents. The experiment is added to various symbol history tests, since it uses data from that table as a check against data in the symbol_history table. For golang/go#44142 Change-Id: I24f1689a9456e555274bf1c6725e917a8e9a8d45 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/335266 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-06-12internal: switch static reads from content/static to staticJamal Carvalho
Change-Id: Icec167d645b9178375b959491206277e13b455cf Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327283 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
2021-06-11internal/queue: fix race conditionJonathan Amsterdam
InMemory.WaitForTesting was waiting for the set of workers to be empty, but that's not quite the same as the queue being empty: all the workers can finish momentarily before a new one starts up. Wait for the queue itself to be empty. Change-Id: Icf0e970fdb2f45aa30c358c9d4af1083442a0293 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327109 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>
2021-06-09internal: update references to dochtmlJamal Carvalho
Change-Id: I853d07d59330cd9d86361167449862f3a4d4a7de Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326057 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-17internal: delete ExperimentInsertSymbolHistoryJulie Qiu
Change-Id: I801cf927c9500589f6460927aaf6c9cb61b98207 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/320450 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-05-06internal/frontend: support displaying multiple of same typeJulie Qiu
Previously on the versions page, we were not handling the case when different identifiers are added for the same type for different build contexts, and which build context was surfaced was based on chance. To support this case, it is now possible to show multiple of the same type at the same version. For example, https://pkg.go.dev/internal/poll?tab=versions at go1.10 will show: ``` type FD — windows/amd64 + func (fd *FD) ReadMsg(p []byte, oob []byte) (int, int, int, syscall.Sockaddr, error) + func (fd *FD) WriteMsg(p []byte, oob []byte, sa syscall.Sockaddr) (int, int, error) type FD — darwin/amd64, linux/amd64 + func (fd *FD) SetBlocking() error + func (fd *FD) WriteOnce(p []byte) (int, error) ``` For golang/go#37102 Change-Id: I19e6ef12f1f8f9c412aab7cea2782409eecf29f9 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317489 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-05internal/testing/integration: add test for duplicate symbolsJulie Qiu
An integration test is added for these cases: - A symbol changes across different build contexts - A symbol is introduced at different versions for different build contexts - The package symbol for a symbol changes because its parent changes, but the name and synopsis are the same For golang/go#37102 Change-Id: Ieca17042e11b2fd583e2133a3064ab6043a29858 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/316969 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-05internal: change CompareAPIVersions to use SymbolHistoryJulie Qiu
For golang/go#37102 Change-Id: I6e7ab9dc242df2909f7c18593b8c95154f8d38f4 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317015 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-05content: use helpers/_versions.tmplJulie Qiu
The new versions template is now always used, even if the symbol history experiment is not active. For golang/go#37102 Change-Id: I78c0bcb1f8a49e832318919bb6fb97f9d382b901 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/317190 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-05-04internal/frontend: change symbol history logicJulie Qiu
The frontend now displays different synopsis for the same symbol, if they change based on build context. For golang/go#37102 Change-Id: Id0887efbcc263434e5d25b9149e480c005d09f2d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/316549 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-30internal/fronted: update symbol link for multi GOOSJulie Qiu
When a symbol is introduced for a specific GOOS/GOARCH at a version, linking to an unspecified GOOS/GOARCH page might not take the user to the symbol. Instead, link to one of the supported build contexts. For golang/go#37102 Change-Id: I2b4edc6c7bd12e148d6560b0e84c005f6511a0d3 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315429 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-29internal: add integration test for v3 module for symbolsJulie Qiu
For golang/go#37102 Change-Id: Idf5b5ace37e2373874069e65b2e0dfd859b5eda9 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/314539 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-29internal/testing/integration: add TestSymbolsJulie Qiu
An integration test is added which fetches all versions of a module from the proxy, parses the frontend details page, and compares that output to a golden dataset in internal/symbol/testdata. For golang/go#37102 Change-Id: Ie1507534bb6db65031d1e69f91f22287fb52415c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/314538 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-28internal/testing/integration: enable tests for new symbol history logicJulie Qiu
Integration tests for symbols now test both the package symbols logic and the new symbol_history table data. For golang/go#37102 Change-Id: I710f7bb86a7ddc061fbc11cec7c29c2cfd9fd793 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/313599 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-28internal/symbol: fix IntroducedHistory logic for multi GOOSJulie Qiu
It's possible for a symbol to be introduced at different versions for different build contexts. Previously, when a symbol was introduced at an earlier build context, but added for all of our supported build contexts at a later version, IntroducedHistory reported that all build contexts were added at that later version. Now, only the relevant build context is returned. For golang/go#37102 Change-Id: Ia9f0181a8e9e5cca43e738548e3d0043ec5ff447 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/313598 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-21internal/postgres: remove do-not-insert-new-documentationJulie Qiu
Change-Id: I4b5e4b4e6556f6f724dd01c08b7014c30b10a2b3 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310313 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-20internal: add do-not-insert-new-documentation to testsJulie Qiu
All tests that affect the documentation table are updated so that experiment do-not-insert-new-documentation is active. Change-Id: I3672a7b18e50bc1cbe4820efe0e6e13ff9687596 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310811 Reviewed-by: Jonathan Amsterdam <jba@google.com> Trust: Julie Qiu <julie@golang.org>
2021-04-16internal/postgres: delete insert-symbolsJulie Qiu
Change-Id: I654b4b6186d49a9a8a83874747ab5ee9d909fe9a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/310380 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-04-13many: remove "retractions" experimentJonathan Amsterdam
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>
2021-04-08internal/postgres,etc: finish MustInsertModule cleanupJonathan Amsterdam
Now that there are no callers of MustInsertModule, rename MustInsertModuleLatest to MustInsertModule. We can also remove MustInsertModuleLMV. Change-Id: Ieb554ee32696c168be4cc0a14ecece9f4c6b91b4 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/308271 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
2021-04-08internal/frontend,testing: MustInsertModule -> MustInsertModuleLatestJonathan Amsterdam
Update more calls to MustInsertModule to also insert latest-version information. Change-Id: Ie05212e8f33a6e22fa0ddd87faf393625c4f8b6e Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/308070 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>
2021-04-05internal,content: remove sticky-header experimentJamal Carvalho
Change-Id: Icc26f100891db74d6ab19062bad0420a03a52fb6 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/307349 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org>
2021-03-19internal/postgres: insert into new_documentationJulie Qiu
Data is now inserted into the new_documentation table, which will replace the documentation table once reprocessing is done. The documentation_id rows for documentation_symbols now reference new_documentation. Tests for symbols which were deleted in CL 303116 are added back. TestFrontendMainPage/main_page_hello_-_multi_GOOS_JS_page is flaky and will be added back in a future CL. Change-Id: I8d7aed2092b3d19c45c14be5f9a0986dfe224aeb Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303115 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-03-19content/static: copy unit header staticJamal Carvalho
Copies unit header html and styles into legacy files in anticipation of updates to the header. Change-Id: I5921537da5f1e94a9c3bc30a2b279a9e6b5bf975 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303411 Trust: Jamal Carvalho <jamal@golang.org> Run-TryBot: Jamal Carvalho <jamal@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Julie Qiu <julie@golang.org>
2021-03-19internal: delete symbols testsJulie Qiu
Tests for symbols are temporarily deleted so that tests pass when we change around primary keys. Change-Id: I3afaf84ad76bbc75bfe37ef7c16b4dc60e3abbc1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/303116 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-03-17content,internal/frontend: style minor versionsJulie Qiu
Minor versions on the versions page are now have the Versions-minor class. Thse versions will be bolded in upcoming UXD designs. Change-Id: I7ee7d2a05573bdbfc1a61f79d8d9bc314bb0ddd2 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/301457 Reviewed-by: Jonathan Amsterdam <jba@google.com> Trust: Julie Qiu <julie@golang.org>
2021-03-15content/internal/frontend: update versions page designJulie Qiu
The versions page is updated according to new UXD designs. https://photos.app.goo.gl/NuQFWTn9DEeCuoqU8 Change-Id: I5130447bef3c1687162cb202e346d3f3ffc4f9d6 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/301456 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-03-15content,internal/frontend: present since_version to main pageJulie Qiu
Information about when a symbol is added to the package is now presented on the main unit page behind a feature flag. For golang/go#37102 Change-Id: I21fc3aa7c6569b07d5b42409f6cb7db0e22dbf96 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/300673 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>