Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Rob Findley d901d01b12 internal/postgres: add a fast(er) search
A new method is added to postgres.DB, optimistically named 'FastSearch',
that implements search hedging. Each FastSearch concurrently queries
both all packages as well as popular subsets of packages, so that
results can be returned quicker when they consist entirely of popular
packages.

Additionallly SearchResult.Rank is renamed to 'Score', to differentiate
it from ts_rank.

The old 'Search' method is kept for now, although 'log' is corrected to
'ln' (this should have little effect on the ordering of results). In a
subsequent CL we will switch the default search method to FastSearch,
and implement the 'of many' qualifier in the search result summary.

Updates b/141182438

Change-Id: I73c6700e09288f3a8bfdb5fa57d0899606e452d2
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/558516
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2020-03-27 16:46:44 -04:00
Rob Findley 366285d878 internal/auth: add auth.Header
Change-Id: Ieee6bee0f2616ff7cacd813cade4d56721791270
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/550835
CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27 16:46:43 -04:00
Rob Findley 8d037932f3 discovery: tidy go.mod and gitignore credentials.json
Change-Id: Ic80bf7b0cfc6f36262f71a4fab535d405e6ee22e
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/547470
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27 16:46:43 -04:00
Rob Findley 61455eeb4b discovery: add my environment file to .gitignore
Change-Id: I816cfd190d7ea13c1d41f1c97b05c6e2579af177
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/491877
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27 16:46:38 -04:00
Rob Findley c8c0b754c5 discovery: add tags to .gitignore
Change-Id: Ia89d1ddd1b438425279c135556f5d949ddedf078
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/491259
Reviewed-by: Julie Qiu <julieqiu@google.com>
2020-03-27 16:46:38 -04:00
Julie Qiu af92eba8d4 discovery: add go.sum files for testdata to .gitignore
When IntelliJ starts up, it adds go.sum files to
internal/proxy/testdata/modproxy/modules. These are added to the
.gitignore.

Change-Id: I487973eb2f3844b29528f2d947d058c6cbd1c557
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/489913
Reviewed-by: Robert Findley <rfindley@google.com>
2020-03-27 16:46:38 -04:00
Julie Qiu 23e1fd27ba .gitignore: add GCP files to .gitignore
Change-Id: Ic5819d4dc2af207c0fcad9d038095adad71a0770
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/447918
Reviewed-by: Robert Findley <rfindley@google.com>
2020-03-27 16:46:35 -04:00
Julie Qiu effbce9ef1 discovery: add .idea directory to .gitignore
IntelliJ creates a .idea ignore in the repository root, which is now
ignored by git.

Change-Id: Ieda599bbc0865649e91bb4bee82b001d615a1026
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/447072
Reviewed-by: Robert Findley <rfindley@google.com>
2020-03-27 16:46:35 -04:00
Julie Qiu 1a323c51c5 discovery: add GCP service account JSON file to .gitignore
Change-Id: I8d7fa5e13d67af93e5ab9208ad9084598bb8a091
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/441335
Reviewed-by: Channing Kimble-Brown <ckimblebrown@google.com>
2020-03-27 16:46:34 -04:00
Julie Qiu 9a2b4c5599 internal/proxy: add zip files to .gitignore
Zip files are now ignored by git, since the binary files created are
different depending on the machine.

Change-Id: I1d21482f9d8b6cfee6c8cf60c5419da260527ba0
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/436919
Reviewed-by: Channing Kimble-Brown <ckimblebrown@google.com>
2020-03-27 16:46:34 -04:00
Julie Qiu dc7cd4ceb0 discovery: change replace directive for sos.googlesource.com/sos
The replace directive for sos.googlesource.com/sos is moved to
the root of the discovery repo to fix a build error when deploying GAE.

Fixes b/128783757.

Change-Id: I02d290f2f98e161e992b8191d9f74a8fc2d54531
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/435776
Reviewed-by: Channing Kimble-Brown <ckimblebrown@google.com>
2020-03-27 16:46:33 -04:00
Julie Qiu f0bb052bb4 discovery: create proxy for testing; add .DS_Store to .gitignore
Implemented a proxy that runs on localhost:8080 following the Module
proxy protocol.

It supports the modules and versions:

- my/module (v1.0.0, v1.1.0, v1.1.1)
- my/module/v2 (v2.0.0)

A GET request can be made to:

- GET $GOPROXY/<module>/@v/list
- GET $GOPROXY/<module>/@v/<version>.info
- GET $GOPROXY/<module>/@v/<version>.mod
- GET $GOPROXY/<module>/@v/<version>.zip

All the zip files contain only an empty README.md.

Change-Id: If7d547eb94a9a24608fafccdfd39330da9849a0e
Reviewed-on: https://team-review.git.corp.google.com/c/412883
Reviewed-by: Andrew Bonventre <andybons@google.com>
2020-03-27 16:46:33 -04:00
Julie Qiu 1514fd1542 discovery: initialize go.mod, create .gitignore, initial terraform setup
terraform main.tf creates:
- frontend (app engine standard)
- discovery database (cloud sql for postgres)
- source storage (GCS bucket)
- pub/sub

Change-Id: I5fc6d9f849a85aa281ca5bcbbc9fe32d45f8e89c
Reviewed-on: https://team-review.git.corp.google.com/c/409073
Reviewed-by: Andrew Bonventre <andybons@google.com>
2019-02-04 19:10:52 +00:00