Sida Chen
43f3ea87d8
pgsql: Move batch queries to corresponding modules
2019-03-12 22:23:30 -04:00
Sida Chen
a33050637b
pgsql: Move extra logic in pgsql.go to util folder
...
- pgsql/util/error.go contains error handling logic
- pgsql/page/page.go contains the page struct
- pgsql/monitoring contains the prometheus logic
- pgsql/pgsession contains the pgsession struct
2019-03-12 22:23:30 -04:00
Sida Chen
8bebea3643
pgsql: Split testutil.go into multiple files
...
- assertion.go assertions used in pgsql tests
- data.go contains go representation of data.sql
- testdb.go contains test db/tx creation logic
- testutil.go contains misc other things
2019-03-12 22:23:30 -04:00
Sida Chen
3fafb73c4f
database: Split models.go into different files each contains one model
2019-03-12 21:55:26 -04:00
Jimmy Zelinskie
a2d6508730
Merge pull request #735 from jzelinskie/fix-sweet32
...
pkg/grpcutil: use cockroachdb cipher suite
2019-03-08 14:49:56 -05:00
Jimmy Zelinskie
c4a32543e8
pkg/grpcutil: use cockroachdb cipher suite
2019-03-08 14:37:43 -05:00
Sida Chen
a689f1f1dc
Merge pull request #722 from Allda/feature_ns
...
featuturefmt: Extract PotentialNamespace
2019-03-08 13:10:00 -05:00
Ales Raszka
d77dc0f0ae
Use struct as a map key instead of string
...
String was used when Feature contains PotentialNamespace. Since it was
moved to LayerFeature we can use struct as map key instead of string.
2019-03-08 09:51:40 +01:00
Ales Raszka
a8a91379d9
Add test for potential namespace
...
Test verifies that potential namespace is stored in database and it can
be loaded back to structure.
The commit also fixes few typos and bugs.
2019-03-08 09:51:19 +01:00
Ales Raszka
60b0bd27fa
Add namespace_id as constraints to layer_feature
...
If layer contains more than one potential namespace, features will be
created for each namespace. Layer_feature table now has to contains one
more constrains (namespace_id).
2019-03-07 11:22:54 +01:00
Ales Raszka
60ef726677
Move PotentialNamespace to LayerFeature
...
PotentialNamespace should be in LayerFeature instead of Feature struct.
Feature extractors were updated to return LayerFeature instead of
Feature.
2019-03-07 11:22:54 +01:00
Ales Raszka
44c4a6f3ce
Store PotentialNamespace in database
...
PotentialNamespace is part of layer_feature table and it is also stored
in namespace table.
2019-03-07 11:22:32 +01:00
Ales Raszka
34c2d96b36
featurefmt: Extract PotentialNamespace
...
PotentialNamespace is feature namespace extracted while detecting
features in layer. It will server for special feature detector. The
current detectors return empty namespace.
2019-03-07 11:22:32 +01:00
Sida Chen
b3fe95e152
Merge pull request #724 from KeyboardNerd/ref
...
database: move db logic to dbutil
2019-03-06 15:25:04 -05:00
Sida Chen
1b9ed99646
database: Move db logic to dbutil
...
Move all transaction related logic to dbutil to simplify and later unify
the db interface.
2019-03-06 15:22:21 -05:00
Sida Chen
1f0bc1ea5f
Merge pull request #728 from KeyboardNerd/fix
...
pgsql: Fix failed tests
2019-03-06 14:04:10 -05:00
Sida Chen
58f014c297
Merge pull request #727 from KeyboardNerd/master
...
pgsql: Fix pgsql test
2019-03-06 13:44:47 -05:00
Sida Chen
b03f1bc3a6
pgsql: Fix failed tests
2019-03-06 13:44:23 -05:00
Sida Chen
ed9c6baf4f
pgsql: Fix pgsql test
2019-03-06 11:32:25 -05:00
Sida Chen
f6759b2a15
Merge pull request #725 from KeyboardNerd/license_test
...
Add license check test
2019-03-05 12:10:02 -05:00
Sida Chen
046b0e49d1
Add missing licenses
2019-03-05 11:42:59 -05:00
Sida Chen
07a97e30c6
Add license header check test
2019-03-05 11:42:54 -05:00
Jimmy Zelinskie
4fa03d1c78
Merge pull request #723 from jzelinskie/lock-tx
...
database: make locks SOI & add Extend method
2019-02-28 15:59:58 -05:00
Jimmy Zelinskie
961c7d4680
database: add test for lock expiration
2019-02-28 15:54:57 -05:00
Jimmy Zelinskie
a4e7873d14
database: make locks SOI & add Extend method
2019-02-28 15:46:31 -05:00
Sida Chen
fb209d32a0
Merge pull request #720 from KeyboardNerd/update_ns
...
clair: Fix namespace update logic
2019-02-28 15:12:36 -05:00
Sida Chen
c6497dda0a
clair: Fix namespace update logic
...
Only when a namespace's version is updated, we understand and replace
the namespace instead of using detector as the indicator.
2019-02-27 17:02:36 -05:00
Sida Chen
f7e54c1a28
Merge pull request #695 from saromanov/fix-unchecked-error
...
pgsql: fix unchecked error
2019-02-27 13:05:52 -05:00
Sida Chen
76081864c9
Merge pull request #712 from KeyboardNerd/builder
...
clair: Ancestry Builder
2019-02-26 12:05:44 -05:00
Sida Chen
5bf8365f7b
pgsql: Prevent inserting invalid entry to database
2019-02-26 10:26:49 -05:00
Sida Chen
465687fa94
clair: Add more logging on ancestry cache hit
2019-02-26 10:26:49 -05:00
Sida Chen
8aae73f1c8
pgsql: Remove unnecessary logs
2019-02-26 10:26:49 -05:00
Sida Chen
5b2376498b
clair: Use builder pattern for constructing ancestry
...
- Add Ancestry builder
- Change RPC to use the ancestry builder
2019-02-26 10:26:49 -05:00
Sida Chen
891ce1697d
imagefmt: Move layer blob download logic to blob.go
2019-02-22 11:31:47 -05:00
Sida Chen
dd239762f6
v3: Move services to top of the file
2019-02-22 11:31:47 -05:00
Sida Chen
73bc2bc36b
Merge pull request #672 from KeyboardNerd/source_package/feature_type
...
Implement Feature types
2019-02-20 15:58:50 -05:00
Sida Chen
5a94499fdb
update according to comments
2019-02-19 17:57:38 -05:00
Sida Chen
32b11e54eb
api/v3: Add feature type to API feature
...
API now returns every feature found by the detectors and also indicates
the type of feature.
2019-02-19 17:03:44 -05:00
Sida Chen
870e812376
Travis: Drop support for postgres 9.4
...
postgres 9.4 doesn't support ON CONFLICT, which is required in our
implementation.
2019-02-19 16:48:42 -05:00
Sida Chen
23ccd9b53b
worker: Fix tests for feature_type
2019-02-19 16:48:42 -05:00
Sida Chen
79af05e67d
pgsql: Fix postgres queries for feature_type
2019-02-19 16:48:42 -05:00
Sida Chen
5fa1ac89b9
database: Add StorageError type
2019-02-19 16:48:42 -05:00
Sida Chen
073c685c5b
pgsql: Add proper tests for database migration
2019-02-19 16:48:42 -05:00
Sida Chen
f61675355e
database: Update feature model
...
Remove source name/version fields
Add Type field to indicate if it's binary package or source package
2019-02-19 16:48:42 -05:00
Sida Chen
0e0d8b38bb
featurefmt: Extract source packages and binary packages
...
The featurefmt now extracts both binary packages and source packages
from the package manager infos.
2019-02-19 16:48:42 -05:00
Sida Chen
7dd989c0f2
database: Rename affected Type to feature type
2019-02-19 16:48:42 -05:00
Sida Chen
00eed77b45
database: Add feature_type database model
2019-02-19 16:48:42 -05:00
Sida Chen
c6c8fce39a
pgsql: Add feature_type to initial schema
...
feature_type is for differentiating the binary packages and source
packages.
2019-02-19 16:43:35 -05:00
Jimmy Zelinskie
cafe0976a4
Merge pull request #685 from jzelinskie/updater-cleanup
...
updater: remove FindLock(), use errgroup to avoid races
2019-02-14 14:57:59 -05:00
Jimmy Zelinskie
dd91597f19
database: remove FindLock from mock
2019-02-14 14:27:29 -05:00