Commit graph

8762 commits

Author SHA1 Message Date
pokeeffe-molecula
5241bd4ce4
Merge branch 'master' into cicd-will-it-never-end 2022-01-21 18:07:19 -06:00
reese
6d2f95e3fb
Merge pull request #1884 from molecula/fb1164
add test coverage
2022-01-21 14:29:46 -06:00
reesporte
836df379ac add test coverage
for the following auth related packages:
* authn
* http
* server

fix minor bugs, do some cleaning up, etc in `authn/authenticate.go` and `http/handler.go`
2022-01-21 13:57:47 -06:00
Ben Johnson
c7208cf5e3
Merge pull request #1882 from molecula/go-mod-v3
Upgrade go.mod to featurebase/v3
2022-01-21 12:53:09 -07:00
Ben Johnson
9ebf0e2119 Upgrade go.mod to featurebase/v3 2022-01-21 10:57:05 -07:00
seebs
4e578b8a65
Merge pull request #1879 from molecula/slowCI
bump test timeouts ridiculously
2022-01-21 11:52:54 -06:00
Seebs
03a18e9beb for leasedkv tests, don't use default etcd config
The default etcd config means that if two of this test run around the
same time, we end up with one of them failing because it can't bind.
Elsewhere, we resolve this by binding to ephemeral ports and fixing
up the config to use them, so we duplicate that here.

This includes duplicating the existing listenerWithURL from test/,
because that package has to import us, so we can't import it, and
I don't really want to make a separate package for one trivial
function.
2022-01-21 11:12:10 -06:00
Seebs
096c44884a fix typo in doc comment 2022-01-21 11:12:10 -06:00
Seebs
375aaf8fbc don't hardcode local port for backup and restore pprof service
If we hardcode a port, we can't run on a crowded machine, like in
CI. If we use :0, we can print the value actually picked.
2022-01-21 11:12:10 -06:00
Seebs
d50065a16f bump timeouts on single-writer RBF Tx test
There's no correct timeout value here, really, but the intent
of this is that we first want to be sure that a second tx doesn't
successfully start before the first exits, and then that the second
*does* successfully start *after* the first exits.

Unfortunately, there's no guarantees on timely processing, and in
reality, CI can break us by waiting more than 10ms before we get
enough CPU time to do something. More generally, there's no way to
make a test like this work correctly -- no matter how long you wait
for the second Tx to start before closing the first one, it's always
possible that it *would* have started just a millisecond later even
without you closing the first one. And similarly, no matter how long
you give it to start when it's *supposed* to, it could always take
longer.

We could in principle just set this to wait for the second Tx to start
and rely on the test timeout killing us if it doesn't, but then we
don't get a useful message.

Let's optimistically hope that 10 seconds is long enough for a trivial
rollback to happen, since that doesn't need to imply writes. And I
think 50ms is a better bet for the first test, although that does
make this test close to 5x slower on non-CI hardware.
2022-01-21 11:12:10 -06:00
Seebs
b40c86c278 retry etcd leader on "etcdserver: leader changed"
This should always be etcdserver.ErrLeaderChanged, but actually
apparently it's not always:

	non-retryable error: etcdserver: leader changed

The "non-retryable" comes from our code. The "leader changed"
message appears to come from etcdserver, but there appear to be
circumstances where it has a suffix, or it could get wrapped,
so we check for the string being contained in an error. This is
not pretty.
2022-01-21 11:12:10 -06:00
Seebs
b5fb9aad84 bump test timeouts ridiculously
gitlab CI runs as much as 5x slower sometimes during business hours,
resulting in tests failing due to 10-11 minute timeouts that would
succeed in under 2-3 minutes outside of business hours. to allow us
to do anything at all, let's just set that to half an hour, and 90
minutes for `go test -race`.

Concern: It's possible there's a timeout that's a gitlab CI configuration
thing involved too, because we see some go test timeout panics, but we
also see some weird messages about SIGQUIT at 11 minutes, which isn't
the go test timeout, so we may need to address that too.

Note that we're changing the Makefile, and also the config for the
gitlab CI passes, which don't use the Makefile. The Makefile changes
are just to be careful and avoid retriggering this later. We may
want to revert these if we get the other issues fixed.
2022-01-21 11:12:10 -06:00
Garrison Davis
71b03d8b85
Merge pull request #1883 from molecula/remove-go-caching
Remove go caching
2022-01-21 10:02:48 -07:00
garrison.davis@molecula.com
a93c3f2f71 Remove go caching
This will likely return when it's done in S3.
2022-01-21 09:55:23 -07:00
hphamMolecula
a179b15300
Merge pull request #1873 from molecula/ui-fixes
UI bug fixes
2022-01-21 09:55:04 -06:00
hphamMolecula
239832668b
Merge branch 'master' into ui-fixes 2022-01-20 17:09:37 -06:00
reese
d47ffdf5d7
Merge pull request #1880 from molecula/grpc-logging
grpc logging
2022-01-20 16:59:24 -06:00
hphamMolecula
0891f27a6a
Merge branch 'master' into ui-fixes 2022-01-20 16:38:34 -06:00
reese
647d62c8e7
Merge branch 'master' into grpc-logging 2022-01-20 15:51:21 -06:00
reese
efb5be8a67
Merge pull request #1878 from molecula/redirect-url
add a redirect-base-url config option
2022-01-20 15:51:00 -06:00
reesporte
81fcd9c228 fix merge conflicts 2022-01-20 14:14:25 -06:00
reesporte
9371212697 Merge branch 'master' into grpc-logging 2022-01-20 14:06:05 -06:00
reesporte
399a11223f use aws to run these jobs 2022-01-20 13:58:18 -06:00
reese
2e0aaa27a9
Merge branch 'master' into redirect-url 2022-01-20 13:08:16 -06:00
hphamMolecula
1d618a36ce
Merge branch 'master' into ui-fixes 2022-01-20 12:21:15 -06:00
Samir Patel
164c69bdf2
Merge pull request #1874 from molecula/keygen
update keygen subcommand
2022-01-20 13:19:09 -05:00
reesporte
87bbca938c add a redirect-base-url config option
this allows the user to configure a url for their IDP to redirect to, rather
than relying on the bind address of the featurebase server itself
2022-01-20 12:09:18 -06:00
hphamMolecula
ac54607a2c
Merge branch 'master' into ui-fixes 2022-01-20 09:42:01 -06:00
Samir Patel
dcdc90b961
Merge branch 'master' into keygen 2022-01-20 01:12:45 -05:00
reesporte
592fcbb05b one logger to rule them all
unify logging method, actually log query for streaming and unary requests
2022-01-19 21:20:08 -06:00
reese
06ed22ef93
Merge pull request #1877 from molecula/fb1167
fix bug with nil elements in protobuf indexes
2022-01-19 21:13:03 -06:00
reese
35343db29a
Merge branch 'master' into fb1167 2022-01-19 19:08:11 -06:00
seebs
ffbf55ee40
Merge pull request #1860 from molecula/rbfPages
RBF page/cursor management improvements
2022-01-19 18:27:52 -06:00
Seebs
fb11895985 oops handle nil 2022-01-19 17:09:57 -06:00
Seebs
749dcd6970 retry on etcd timeout errors 2022-01-19 16:57:47 -06:00
Samir Patel
16eff203ec
Merge branch 'master' into keygen 2022-01-19 16:38:31 -05:00
Seebs
2dce518a24 retry other etcd ErrTimeout variants
etcd can return more detailed ErrTimeout variants in rare cases, and we
want to retry on those too.
2022-01-19 15:19:45 -06:00
Seebs
37507db4ac use array containers instead of individual bitwise adds
This affects TestTx_Remove, TestTx_DeallocateToFreeList, and
TestTx_RecreateBitmap, all of which were adding hundreds of thousands
of individual bits, or more, and all of which work just as well and
produce the same behavior using largeish containers.

This reduces race-detector-test runtime from about 20 minutes to
a couple.
2022-01-19 15:19:45 -06:00
Seebs
719a30e128 shorten MultiTx test
The MultiTx test runs for a fairly long time but doesn't add much
value running that much longer, and there's no reason it should take
more than half the time we spend on this entire directory.
2022-01-19 15:19:45 -06:00
Seebs
112abcb549 use stable cursor for freelist operations
The Cursor datatype is quite large, and allocating them constantly for
ops is extremely expensive. To avoid this, we create a single stable cursor
that lives in the DB, and can be used for freelist modifications. Since the
freelist is only ever modified once at a time, this should be safe. We also
don't fully zero it between operations, we just reset the relevant parts.
2022-01-19 15:19:45 -06:00
Seebs
adcd5adb02 improve the sync.Pool used for pages, avoid excess page allocations for WAL
Several changes. One is, we don't provide a `New` for pagePool, which
allows allocPage to check whether a page was returned, and thus, zero
pages which were found in the pool, or make new pages, but never zero
pages it just created with make. We then also make many more things
which were making pages use the pool.

Reuse the same page allocation for multiple header pages dumped into
the WAL; the bitmap header pages aren't stashed in our page map,
they're only written to the disk, so we don't need to make a new page
each time, we can just make one new page for the whole batch.

Internally in the pool, we pool pointers to [PageSize]byte, rather
than slices. sync.Pool needs pointer-like things. To store a pointer
to a slice, you have to heap-allocate the slice, also. So, instead
of heap-allocating copies of these slices, we just use pointers to
the raw data.
2022-01-19 15:19:45 -06:00
hphamMolecula
b7e85db4b3
Merge branch 'master' into ui-fixes 2022-01-19 15:16:05 -06:00
reesporte
a162322fc9 fix bug with nil elements in protobuf indexes
we were allocating space we weren't using smh my head
2022-01-19 14:53:35 -06:00
reese
49972939ec
Merge pull request #1876 from molecula/fb1166
fix bug where drop table wasn't being authorized
2022-01-19 14:26:04 -06:00
reesporte
61ef1aee4e fix older tests 2022-01-19 12:55:07 -06:00
reesporte
e7552a76a7 fix bug where drop table wasn't being authorized
also fixes bug in GetAuthorizedIndexList where perms weren't being properly compared
2022-01-19 12:08:05 -06:00
pokeeffe-molecula
27f1fcbf45
Merge branch 'master' into cicd-will-it-never-end 2022-01-19 11:59:34 -06:00
pokeeffe-molecula
c2c140aad4 print out the url of the binary we are trying to get 2022-01-19 11:26:40 -06:00
Samir Patel
e1d7389893
Update ctl/keygen.go
Co-authored-by: reese <45641995+reesporte@users.noreply.github.com>
2022-01-19 11:23:02 -05:00
pokeeffe-molecula
bc589ee4eb when it fails, it should fail 2022-01-19 10:13:11 -06:00