Commit graph

133 commits

Author SHA1 Message Date
Travis Turner
969bf055b2
Rename some interfaces. Remove the ComputeAPI (#2333)
* Clean up dax service interfaces

Rename some of the `computer` interfaces and organize them in the
appropriate files.
Remove `dax/computer/alpha` package

* Remove ComputeAPI (it was replaced by batch.Importer)

* add nss-tools dependecy to smoke test
2022-12-07 09:02:39 -06:00
Travis Turner
f4385df2cf
Fix formatting in CLI results with custom SQLResonse.UnmarshalJSON (#2305)
* Fix formatting in CLI results with custom SQLResonse.UnmarshalJSON

When I started this, it was meant to be a quick fix to address the confusing
result formats we were seeing in the CLI. For example, all large integer values
were displayed in scientifc notation. This is because we were passing the result
types from JSON (in this case, float64) into pretty print. Similarly, `IDSets`
and `StringSets` where being printed using the default go Stringer for the types
[]int64 and []string respectively.

I started by writing a customer UnmarshalJSON() method for the `SQLResponse`
type. Part of this (the part which converts data types based on header types)
was already being used in dax tests, so this just formalizes that logic as part
of the `SQLResponse` type.

Then I realized that the sql3 tests (run against the `sql3` package) were
failing because sql3 is not actually returning the `IDSets` and `StringSets`
types. A future task is to formalize return types, define them, and modify sql3
to return them. Once that is done, we can remove the "typed" switch in the
`SQLResponse` json unmarshaller.

Another significant change is the modification to the `ExprDataType` interface:
```
type ExprDataType interface {
	exprDataType()
	TypeName() string
	TypeDescription() string
	TypeInfo() map[string]interface{}
}
```
I added two more methods in order to distinguish between a type (`DECIMAL`), its
description (`DECIMAL(2)`), and its type info (`"scale": int64(2)`). Currently,
the description can be used as the field definition in a CREATE TABLE statement,
but we may want to re-think that. Also, Decimal is the only type currently using
TypeInfo.

Finally, I tried to consilidate things around `dax.FieldType` instead of
comparing against parser types outside of sql3. We still have some sql3 parser
and planner types lurking about, but we can address those in future commits.

* Add some test coverage

* smoke test expected INT, now int

* minor fixes

* Introduce WireQueryResponse and related types

This also changes dax.FieldType to dax.BaseType.

* Populate WireQueryResponse correctly

Currently this is in the http handler, and in the queryer.

* Convert sql3 and dax tests to expect pilosa.WireQueryField in results

* fix PQL tests in the SQL defs

* Address a few of the skipped sql tests in dax
2022-11-21 18:43:53 -06:00
Garrison Davis
4d75eda557 Add back ability to make on-demand instances
Also addressed the couple TODOs I left behind in the terraform.
2022-11-18 12:12:09 -06:00
Garrison Davis
d028b6bc4b Make tflint and terraform fmt changes 2022-11-18 12:12:09 -06:00
Garrison Davis
3bfb65eb58 Make spot instance selection dynamic
The idea behind this is to give AWS more information about what
instances we can let it actually instantitate, rather than have it be
one fixed instance type.

e.g., in this case, we are okay with any Graviton instance with at least
2 vCPU and 8 GiB memory.

The easist way to do that is to instead use a launch template, with
ec2_fleets or spot fleets.

I took out the part where we even support on-demand instances. This can
be readded later if it is necessary.
2022-11-18 12:12:09 -06:00
Seebs
4104577f6d make smoketest setup check for empty strings
Apparently terraform can give us output saying that it succeded,
but give us an empty string for an IP address, which doesn't actually
let us use the IP address. Check for that case too in our overly
fancy setup.

This is a precursor to figuring out what's going wrong in a way
that lets us fix it more properly.

Also, request values, but don't instant-exit if they aren't present,
so we can actually do the retries.
2022-11-01 11:47:17 -05:00
Seebs
011174b631 make perf_able run at all, make it debug a bit better
switch perf-able to using same node type we use for other spot instances,
because otherwise it never finds any available capacity.

we switch the perf-able script to use the standard get_value function
instead of direct jq calls.

we try to grab server logs if the restore fails in the hopes of finding
out why the restore very occasionally fails.
2022-10-14 09:49:19 -05:00
Seebs
a6ef3dabe2 improve resilience of smoke test setup
We want to retry our terraform setup if it fails, so let's check whether
it worked and possibly retry.

This loop is awful because I'm trying to both check the exit status
and the reported IPs. Once I know whether the exit status predicts the
reported IPs that should go away.
2022-10-06 11:45:50 -05:00
Seebs
782faa3354 squash auth tests into regular smoke tests, improve smoke tests
This is a bit complicated and entangled, sorry.

First, we squash the auth-based smoke tests into the regular smoke
tests; we just run all the tests with auth on and that way we don't
need to spin up an entire separate cluster of machines just to run
a single query against them.

We improve the error detection, and standardize the jq-to-get-config
code. The purpose of this is to try to make sure that, if we actually
hit a failure and get "null" for a host name, we report *that*
as an error, rather than running ahead and producing 20+ separate
reports that ssh failed because it couldn't find a host named null.
2022-09-09 17:10:57 -05:00
pokeeffe-molecula
0a73abbbfe
Add a smoke test for the sql3 endpoint (#2214)
* turned on sql endpoint in smoke test; added a test to execute a simple sql statement

* add config to both configs

* fixed not enough arraying
2022-09-07 09:34:45 -05:00
Seebs
790d1bf3dc drop [postgres] config stanza
This might be breaking CI now that the postgres wire protocol support
has been dropped.
2022-09-02 11:40:37 -05:00
Garrison Davis
123b20d2f9
Upgrade Go to 1.19 (#2204)
Upgrade Go to 1.19

* Use go install to install statik for CI/CD

* Switch from stretch to buster for idk

The stretch release doesn't exist anymore for go 1.19 docker images.

buster is a newer version of Debian anyway (v10 vs v9)

Co-authored-by: Fletcher Haynes <fletcher.haynes@molecula.com>
2022-08-25 14:54:14 -06:00
souhailanoor
2bdf1f5081
FB-1597: unifying idk and featurebase (#2160)
* unifying idk and featurebase: first pass

* resolved conflict with master for gitignore & dockerignore

* deleted binaries that were accidentally pushed to git

* combined gitlab jobs for idk & featurebase

* run go fmt for idk

* updated ssh env variable, and made docker password variable in gitlab env variables

* fixed typo assigning variable name

* trying to fix docker login error

* trying a different solution for docker password

* pass registry

* fixed docker login

* updated paths for idk

* exclude idk tests from featurebase test run

* fix vendor error

* update certificates

* grpc needs to be in version 1.38
genproto, which is imported by big query updates the grpc version to 1.47.0
grpc 1.47.0 causes etcd to deadlock when calling etcd.Close()
the fix is to have a replace in go.mod to specify a specific grpc version

* run go mod tidy

* go mod

* run go mod tidy

* exclude bigquery since it is causing issues and undo grpc replace in go.mod

* fix grpc version

* fix formatting error

* update formatting

* attempt to fix formatting

* update path for code coverage

* update to use current branch binaries, not master

* fix for building idk - path updates

* udpate path for binaries

* update job dependecies

* update docker idk tests to use the current branch registry

* update stages for jobs

* updated job dependencies

* not allow idk s3 dump to fail since it is a dependency for integration tests

* update dependecy for idk tests

* update paths for idk build and code coverage

* download featurebase binary from s3

* pass branch name to all setup scripts

* change to current branch instead of master

* updated sonarcloud

* sonarcloud fix and branch name fix

* trying to speed up pipeline run time

* update stage

* branch name fix + sonar cloud

* sonarcloud
2022-07-28 17:23:16 -05:00
Bruce Baranowski
b7516eacc5
CICD: fix Cleanup_Build_Job inconsistent failures (#2098)
* add aws profile to cleanup job

* Split cleanup into bash script

* change spot instances to one-tme
2022-06-14 11:49:25 -04:00
Bruce Baranowski
aa8057e9e4
CICD - Spot instances (#2087)
* spot instance test

* update outputs.tf to provide spot instances

* uptate outputs.tf data_node_ips

* propogate spot instance request tags to the instances
2022-05-31 17:25:09 -04:00
Bruce Baranowski
c0d56e13f2
Remove extra Cloudforlation tags (#2089) 2022-05-31 16:51:22 -04:00
Bruce Baranowski
8490be9fb0
CF tremor delete hotfix (#2088) 2022-05-31 15:35:40 -04:00
Matthew Jaffee
772496b440 "all bitmap" multi-field, single-shard ingest
This adds a shard-based import endpoint which takes bitmap data for
all field types and imports data for the whole shard transactionally.

It uses the BitmapRewriter interface to try to intelligently allow for
setting and clearing bits simultaneously without multiple writes which
is especially helpful when ingesting into int-like fields, but also
allows clear-and-then-set behavior for set fields.
2022-05-27 11:25:17 -05:00
Bruce Baranowski
e3aff58632
Smoketest cleanup (#2077)
* added after_script

* changed after_script to a stage

* add shell tag

* Add pipeline prefix

* cleanup-list-test

* use unique jobid instead of random string

* remove dangling resources

* Spot instance test

* Revert "Spot instance test"

This reverts commit f722734b4dc04609918c29445dd4e739a3a1bd77.

* spot test

* Revert "spot test"

This reverts commit f35cc088db09b408e4f3b37a4b419a6126e52b43.

* manual trigger & cleanup test

* Finish cleanup script

* string wrapping

* typo fix

* final cleanup

* change nonexist test

* silent grep

* utilize query feature

* cleanup only test

* cleanup only test

* No skipping stages

* modify to pipieline-

* add --region
2022-05-23 16:37:42 -04:00
souhailanoor
3986e202bf
FB-1378: Use IP whitelisting for ingest authentication and authorization (#2070)
* Use IP whitelisting for ingest
For ingest, use configured IPs to authenticate the requests.
Auth-token will no longer be used for requests from ingest consumers.
If IP in request is in configured IPs, authenticate and authorize as an admin.
If IP in request is not in configured IPs, proceed with the standard authentication/authorization using ADD.

* need to remove port from client IP

* addressed review comments
2022-05-20 14:57:05 -05:00
souhailanoor
ffed9531fc
FB-1253: Fixes for scheduled test (#2048)
* fix for changes in utilCluster

* fixes for samsung and backup-restore gauntlets
2022-05-06 12:00:04 -05:00
souhailanoor
b82375bca2
Tremor delete test scripts (#1974)
- terraform scripts to set up cluster
- cloud-formation scripts to set up cluster
- set up ingest node with kafka server and datagen
- set up second ingest node with molecula-consumer-kafka-static
- set up datadog in all nodes (ingest + featurebase)
- set up script to execute different queries
- only run delete test on schedule
2022-05-05 10:25:35 -05:00
reesporte
a8c1b93610
Add Max(timestamp) tests to smoke-test (#2025)
* Add Max(timestamp) tests to smoke-test

run a Max() call on a timestamp field twice, and make sure the results are the same

* chmod +x
2022-04-18 15:33:20 -05:00
reesporte
03df1ba6ad
remove trailing spaces en masse (#2024) 2022-04-18 09:31:35 -05:00
reesporte
f224e64bc3 setup auth cluster infra
also add test for sup218

Co-authored-by: rachithrr <rachith.ramaswamy@molecula.com>
Co-authored-by: bruce-b-molecula <bruce.baranowski@molecula.com>
2022-04-14 09:37:52 -05:00
reesporte
ea33a2b976 fix broken test 2022-04-14 09:37:33 -05:00
reesporte
77568762c2 Timestamp FieldOptions should include Min and Max when marshalled to JSON
When you backup a cluster, we call /schema which marshals timestamp field options to
json, and restores the fields with those options. If the min and max are missing,
they are set to 0 on restore, which causes an issue on subsequent ingest.

Fixes [SUP-213](https://molecula.atlassian.net/browse/SUP-213) and
[FB-1332](https://molecula.atlassian.net/browse/FB-1332)
2022-04-06 16:29:24 -05:00
reesporte
c61d565b3c integration test for backup restore sev 2!
Co-authored-by: tgruben <tgruben@gmail.com>
2022-04-05 14:59:50 -05:00
reesporte
5946a12ab9 fix viewTimePart to account for bad strings
this stems from https://molecula.atlassian.net/browse/SUP-194 where the string
"standard" was being passed to viewTimePart, which output "standard" as the result.
this is not a valid time string and was causing confusing errors. now it simply
doesn't do that

this commit also adds regression testing framework and a regression test for fb-1287
2022-03-25 11:27:39 -05:00
Matthew Jaffee
bb637131b9 delete query was syntactically broken and unecessary
the issue reproduced even though this query was broken, so it can be removed.
2022-03-24 13:33:11 -05:00
Matthew Jaffee
b08389e0ed add reproducer for FB-1270 into smoke tests 2022-03-24 12:58:25 -05:00
reesporte
c9c36f5fc6 WIP: start integration test setup
TODO:
- remove commented out gitlab jobs
- make it run only on merge to master
2022-03-15 14:43:06 -05:00
pokeeffe-molecula
a1fca4ce3c take out political_party 2022-02-24 19:46:03 -06:00
pokeeffe-molecula
83485aa63a added an aggregate into the test 2022-02-24 16:33:02 -06:00
pokeeffe-molecula
4fef282416 removed tfstate.backup files 2022-02-24 10:24:27 -06:00
pokeeffe-molecula
a07264a8d1 split untar and restore 2022-02-23 13:12:03 -06:00
pokeeffe-molecula
e2b1986504 make it so the autoscaler does not kill us...precious 2022-02-23 10:54:12 -06:00
pokeeffe-molecula
8e96afca9e filter out DEBUG from restore 2022-02-22 22:15:14 -06:00
pokeeffe-molecula
3c72330659 don't fill up the output with progress 2022-02-22 16:43:37 -06:00
pokeeffe-molecula
fba0f67bfa added policy to read write S3 2022-02-22 15:23:39 -06:00
pokeeffe-molecula
b0ea69d2f4 added restore 2022-02-22 13:50:47 -06:00
pokeeffe-molecula
9bc7839dcb moved some stuff around; got test to execute 2022-02-21 08:31:46 -06:00
pokeeffe-molecula
ae0c70d60b interpolate all the js strings 2022-02-17 18:20:05 -06:00
pokeeffe-molecula
4b407c10fc works on my machine 2022-02-17 14:29:07 -06:00
pokeeffe-molecula
d8a46f9dfb use dnf instead of apt-get 2022-02-16 21:29:50 -06:00
pokeeffe-molecula
08f5454f6b run it from the shell script 2022-02-16 17:01:41 -06:00
pokeeffe-molecula
f97878edcf fixed arch problem 2022-02-14 16:31:55 -06:00
pokeeffe-molecula
92d491682d added perf test 2022-02-11 15:38:33 -06:00
pokeeffe-molecula
bb1f403974 fixes to able defn 2022-02-10 13:56:59 -06:00
pokeeffe-molecula
3a0777c063 added 'able' perf testing environment 2022-02-08 16:30:35 -06:00