Commit graph

8684 commits

Author SHA1 Message Date
Matthew Jaffee
34c64fbaba
Merge pull request #1865 from molecula/wrapping-etcd-retry
add wrapping to differentiate etcd errors
2022-01-14 15:58:56 -06:00
Matthew Jaffee
555d185929 add wrapping to differentiate etcd errors
we had a CI job fail in an interesting way, but can't tell if the
etcd retrying stuff is working, so adding in this wrapping so we can
better differentiate the errors if we see it again.

Job is here: https://gitlab.com/molecula/featurebase/-/jobs/1977060827

Failure is:

```
=== RUN   TestClusterStuff
    cluster_test.go:36: creating index: against http://pilosa2:10101/index/testidx 404 Not Found: 'creating index: sending CreateIndex message: executing request: against http://pilosa3:10101/internal/cluster/message 500 Internal Server Error: 'processing message: getting index: testidx: etcdserver: request timed out
        ''
--- FAIL: TestClusterStuff (8.85s)
```
2022-01-14 14:01:37 -06:00
reese
605da1e074
Merge pull request #1861 from molecula/bearer-conversion-squashed
[fb-998] [fb-1131] [fb-1129] addresses multiple authn/z tickets
2022-01-14 13:52:24 -06:00
reesporte
89567b791b Merge branch 'master' into bearer-conversion-squashed 2022-01-14 12:34:22 -06:00
Matthew Jaffee
b2afe7ad3b
Merge pull request #1863 from molecula/moar-cicd-clustertests
add clustertests to gitlab CI
2022-01-14 12:32:40 -06:00
reesporte
9f37cf7b48 Merge branch 'master' into bearer-conversion-squashed 2022-01-14 12:32:06 -06:00
reesporte
cf2410fea6 addresses multiple authn/z tickets
* fb-998 - authn/z enabled in handlers (kitchen-sink ticket)
    - authorization is enabled through the use of a bearer token (using header "Authorization")
    - authorization may occur through the use of an "Authorization" header or "molecula-chip" cookie
    - ui is updated for changes to handler
* fb-1131 - protect grpc endpoints
    - GRPC endpoints now check authorization if auth is enabled
* fb-1129 - inter-node communication
    - the following endpoints use the secretKey for authentication:
        - /internal/cluster/message: POST
        - /internal/translate/data: GET, POST

* added test to api_test.go (TestAuth_MultiNode) testing various auth/permissions stuff on a multi-node cluster

not included:
    - fb-1130 - filter response of endpoints
    - fb-1109 - improved audit logging

@jaffee [are you not entertained](https://www.youtube.com/watch?v=mutgotxrcqg)

Co-authored-by: souhailanoor <90720110+souhailanoor@users.noreply.github.com>
Co-authored-by: tgruben <tgruben@gmail.com>
Co-authored-by: 54mir <48686912+54mir@users.noreply.github.com>
Co-authored-by: kcrodgers24 <49999391+kcrodgers24@users.noreply.github.com>
2022-01-14 12:31:32 -06:00
Matthew Jaffee
2f30bcda45 add clustertests to gitlab CI
had to install some dependencies and things on the runner which are
detailed in a comment.
2022-01-14 11:05:41 -06:00
pokeeffe-molecula
f6c458b093
Merge pull request #1862 from molecula/cicd-smoketest
Now with working integration testting
2022-01-13 15:27:17 -06:00
pokeeffe-molecula
0b9d108626
Merge branch 'master' into cicd-smoketest 2022-01-13 14:52:24 -06:00
pokeeffe-molecula
dcc295b25d fixed broken shell script 2022-01-13 14:24:44 -06:00
Matthew Jaffee
5048c8712f
Merge pull request #1859 from molecula/fieldView
[SUP-132] track field directly in view to prevent deadlocks
2022-01-13 13:50:33 -06:00
pokeeffe-molecula
ff16924a0a fixed path typo 2022-01-13 13:31:41 -06:00
Matthew Jaffee
dad244e0d3 skip sometimes-failing test of experimental code
this is killing us in CI for no good reason
2022-01-13 13:16:57 -06:00
Seebs
6fba8aba8b track field directly in view to prevent deadlocks
The central reason this exists:

**sync.RWMutex can block read locks even when no write lock is yet held.**

If a write lock is *requested*, this can block future read locks. In
particular, this means that recursive read locks are unsafe. But there's
additional problems.

The specific case that bit us involves not two, but *three* things
running at once.

Thing #1: executor doing AvailableShards. This RLocks the index, and
then each field, and then each view. To complete, it must be able to
obtain a read lock on each view in turn.

Thing #2: DeleteField. This Locks the index. Even if it is stuck
waiting for the lock (which it will be until AvailableShards completes),
it can prevent *additional* RLocks of the index.

Thing #3: CreateFragment. This Locks a view, then RLocks the index in
order to look up a field.

CreateFragment can't proceed until DeleteField completes. DeleteField
can't proceed until AvailableShards completes. And AvailableShards
can't proceed until CreateFragment completes.

Solution: Cache the *Field in the view, so we don't need a read lock
on the field or index to complete a CreateFragment.
2022-01-13 13:16:57 -06:00
pokeeffe-molecula
f4d28b840a stop gauntlet from running every build 2022-01-13 13:00:02 -06:00
pokeeffe-molecula
da3cabe642 Merge branch 'master' into cicd-smoketest 2022-01-13 12:57:42 -06:00
pokeeffe-molecula
04a2df3036 added basic integration tests 2022-01-13 12:57:26 -06:00
Matthew Jaffee
4a1e53421e
Merge pull request #1858 from molecula/retryEtcd
[SUP-130] handle ErrTimeout in etcd embed "retryClient"
2022-01-13 12:54:10 -06:00
Seebs
84adefe6a5 handle ErrTimeout in etcd embed "retryClient"
This tries to be more correct/careful about retries (checking against
the actual exported errors from etcdserver, not just the string
representations), and also supports retrying on timeouts, not just
on client changes. It can also retry more than once, mostly in case
we hit one of each of those.

For timeout errors, we mostly use the fact that it's a timeout to
give us a reasonable backoff, but then delay a fraction of a second
longer just to give it a moment to recover if the ErrTimeout is
masking something else that took longer.
2022-01-13 11:47:57 -06:00
Bruce Baranowski
c60bed21c3
Merge pull request #1840 from molecula/IO-47
added tags to sg terraform
2022-01-12 19:18:04 -05:00
bruce-b-molecula
ef5736c73e added tags to sg terraform 2022-01-12 18:59:28 -05:00
Ben Johnson
24c38cd6b9
Merge pull request #1848 from molecula/fb-828
[FB-828] Fix RBF WAL size check
2022-01-12 09:59:01 -07:00
Ben Johnson
a49a14652f Fix RBF WAL size check
This commit changes the max WAL size calculation to double the
number of bitmap pages in the WAL as they require an extra header
page. Previously, this was causing the WAL to be overrun and
references to those pages were outside the mmap range and caused a
panic.
2022-01-12 08:26:14 -07:00
pokeeffe-molecula
5f5caff30d
Merge pull request #1855 from molecula/cicd-smoketest
Really get gauntlet to run in master
2022-01-11 18:42:02 -06:00
pokeeffe-molecula
24a963ef52
Merge branch 'master' into cicd-smoketest 2022-01-11 18:27:22 -06:00
pokeeffe-molecula
d896953af4 stop gauntlet from running on push 2022-01-11 18:08:14 -06:00
pokeeffe-molecula
8919d9d5d3 change the way we call ssh 2022-01-11 15:51:18 -06:00
Matthew Jaffee
afc1cd62b7
Merge pull request #1853 from molecula/fb-1115-rip-rowcache
FB-1115 rip out rowcache
2022-01-11 14:10:05 -06:00
Matthew Jaffee
34393dee09 rip out rowcache
not strictly backward compatible... hopefully no one is actually using
the rowcache config option
2022-01-11 13:49:09 -06:00
pokeeffe-molecula
c647c0c079
Merge pull request #1851 from molecula/cicd-smoketest
Cicd smoketest
2022-01-11 12:56:07 -06:00
pokeeffe-molecula
7e8d217208 so much fail... 2022-01-11 12:21:38 -06:00
pokeeffe-molecula
5056a8ea4d Update .gitlab-ci.yml 2022-01-11 11:39:45 -06:00
pokeeffe-molecula
562d665014
Merge branch 'master' into cicd-smoketest 2022-01-11 11:37:23 -06:00
Matthew Jaffee
951368acea
Merge pull request #1852 from molecula/fb-1118-commented-prints
remove a bunch of commented print statements and unecessary prints
2022-01-11 11:08:48 -06:00
pokeeffe-molecula
130c2265ca
Merge branch 'master' into cicd-smoketest 2022-01-11 11:00:58 -06:00
Matthew Jaffee
df88b5a78c remove a bunch of commented print statements and unecessary prints 2022-01-11 10:42:44 -06:00
Matthew Jaffee
888e68f884
Merge pull request #1847 from molecula/1147-slow-int-import
FB-1147 FB-1149 add sorting for ints/mutex in batch importer
2022-01-11 10:41:45 -06:00
pokeeffe-molecula
994ba6f597 ignore in sonarcloud 2022-01-11 10:30:28 -06:00
Matthew Jaffee
48b4169cb5 refactor client batch tests to reduce duplication
also use a single cluster with each test creating a different index
rather than each test creating a whole new cluster.

runtime went from 38s to 30s in my informal tests
2022-01-11 10:17:43 -06:00
Matthew Jaffee
db87a3c4f7 fix vet shadow issue 2022-01-11 10:15:58 -06:00
Matthew Jaffee
7fbd371038 get some of the client tests to actually *run*
discovered that client tests weren't running due to integration build
tag. Fixed the file I needed to get through SonarCloud and documented
rest of what needs to be done in FB-1152 https://molecula.atlassian.net/browse/FB-1152
2022-01-11 10:15:58 -06:00
Matthew Jaffee
131f891f75 fix up error messages in client batch test 2022-01-11 10:15:58 -06:00
Matthew Jaffee
6335b9c801 disable retryablehttp logger because *wow* that's a lot of output 2022-01-11 10:15:58 -06:00
Matthew Jaffee
16161025f2 trying to get sonar coverage reporting working
looks like test-report.out and coverage.out aren't about the same
tests. I'm unclear on how sonar uses tests.reportPaths vs
coverage.reportPaths, but figured I'd try at least generating them
from the same run to see if that helped.
2022-01-11 10:15:58 -06:00
Matthew Jaffee
55a385ed2d add sorting for ints/mutex in batch importer
fixes pathological case where imports with randomly ordered IDs which
spanned multiple shards and included ints or mutex fields could be
incredibly slow due to making 1000s of requests.
2022-01-11 10:15:58 -06:00
reese
ce8b5fa323
Merge pull request #1849 from molecula/fb-1148
distinct on timestamps can reduce now
2022-01-11 09:52:52 -06:00
pokeeffe-molecula
4bcdb817a5 Merge branch 'master' into cicd-smoketest 2022-01-11 08:49:03 -06:00
pokeeffe-molecula
394a6e9854 switching gauntlet to scheduled 2022-01-11 08:47:02 -06:00
pokeeffe-molecula
4b192ee8bf added progress reporting 2022-01-10 18:02:45 -06:00