Commit graph

27 commits

Author SHA1 Message Date
Travis Turner
eb6c6e3105
Add kafka support to CLI (fbsql) (#2278)
* Add kafka support to CLI (fbsql)

This commit adds the ability to provide a `--kafka-config` command line
argument referncing a toml file to configure kafka.

* Move "Molecula Consumer" message to the logger; hide it in basic mode

* Fold decimal(scale) into kafka.source-type

* Build fbsql with cgo in docker for CI

* Re-organize the fbsql kafka config and setup.

Allow field config to use the table schema if no fields provided.

* Display timestamp fields with format RFC3339Nano

* remove kafkaRunner (no longer used)

* Fix cli/batch test (and make sure it's not excluded from CI)

The logic in our Makefile was exluding from tests any package with
`/batch` in the package name. This excluded `/cli/batch`, which is not
good.

This commit changes the exclusion logic to include the `/v3` portion of
the package name, so `/v3/batch`.

* Rename Basic() to SetBasic()
2023-03-07 08:18:22 -06:00
Fletcher Haynes
5c39a49285 Sync from private repo to commit 12d608c80d 2022-12-12 09:01:20 -08:00
Lory Cloutier
b6ae088f24 FB-1766: cleaning up the CmdIO objects passing alternate stdin/
stdout/stderr around

A lot of functions in the cmd and ctl packages were passing these
around and barely using them. Replaced them with a logger for most
functions. Some functions get an io.Writer instead so that their
tests can find the output they're looking for.

More cleanup on fb-1766: reworked the tests that were using io.Pipe
or os.Pipe to check their results so they now use a bytes.Buffer.

Unexported some variables that didn't need to be exported.
Fixed NewConfigCommand to use the provided stderr, not os.Stderr.
Added tests for rbf_dump, rbf_page, and keygen, since those weren't
being tested at all.

Added chksum_test, final cleanup.

(cherry picked from commit f627199acb)
2022-12-12 09:01:20 -08:00
Seebs
3c05f1ff37 Distinguish between usage errors and other errors
Cobra automatically displays usage messages, and also a gratuitous
"Error: [...]" line in some cases, when any error at all occurs
running a command. To suppress the usage message, you have to set
cmd.SilenceUsage to true. But the code that would do this doesn't
have access to it. To address this, we introduce a category of
"usage error", implemented with stdlib error wrapping (%w) and
use errors.Is to check for it. There's also utility functions
to do this checking automatically, or indeed, to handle wrapping
of the ctl.SomethingCommand and handle running it with a suitable
context and everything.

In fact, several of the places we're checking for usage errors,
we can never actually report one, but we're checking consistently
so that if we want to report usage errors, we can.

For instance, server.Start and (dax)server.Start don't ever
return usage errors, right now, but we're checking their responses
anyway.

(cherry picked from commit c681642734)
2022-12-12 09:01:20 -08:00
Fletcher Haynes
da9b57bd45 Updated dependency paths to reflect new repo location 2022-09-06 09:39:22 -07:00
Fletcher Haynes
eb06bb50ae Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
Ben Johnson
c7c9c1e1d7
v2.0.0
Co-authored-by: Cody Soyland <codysoyland@gmail.com>
2019-10-08 14:56:17 -06:00
Cody Soyland
0ec9d3b7e6 Add support for TLS client certificate verification and custom CA 2019-09-24 11:09:58 -05:00
Yuce Tekol
fe1208ac65
Fix std{in,out,err} in export cmd 2018-09-05 17:37:44 +03:00
Yuce Tekol
480c853a3e
Use passed stdin, stdout and stderr in the cmd package. Fixes #1538 2018-09-05 16:23:31 +03:00
Cody Soyland
f01d850b17 Fix linter issues: gosimple 2018-07-20 09:06:43 -05:00
Cody Soyland
0b86bbb4f5 Fix linter issues: gochecknoinits 2018-07-18 11:58:27 -05:00
Cody Soyland
da4e3b0e14 Unexport cmd.NewExportCommand 2018-07-05 23:11:56 -05:00
Travis Turner
2a9b1e9e5b
final Frame to Field rename 2018-06-06 01:27:12 -05:00
Matt Jaffee
47f7beaecc
WIP removing inverse 2018-05-25 17:18:38 -05:00
Yuce Tekol
aa8cbe8ae3
Add TLS support for commands 2017-10-11 08:30:11 +03:00
Linh Vo
b635bdf970 #413 add tests and remove redundant word 2017-05-15 12:54:49 -05:00
Linh Vo
e20b9075e2 #413 set standard view as default for export command 2017-05-15 11:17:48 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Travis
2ad322c2c7
Rename DB to Index
Rename `db.go` to `index.go` and `db_test.go` to `index_test.go`
2017-04-23 21:49:27 -05:00
Ben Johnson
d34687121f
Rename bitmap/profile to row/column. 2017-04-21 21:23:24 -06:00
Matt Jaffee
60805d7f3e change port 15000 to 10101 everywhere 2017-03-17 16:43:04 -05:00
Matt Jaffee
2aef65989e convert all commands to use RunE and global Command var 2017-03-17 16:43:04 -05:00
Matt Jaffee
961d18a3bf convert all subcommands to nonglobal style 2017-03-17 16:43:04 -05:00
Matt Jaffee
c7caea6b30 fix short help strings on commands 2017-03-06 16:45:37 -06:00
Matt Jaffee
6dc164da69 fix copy/paste bug in export subcommand 2017-03-03 14:47:47 -06:00
Matt Jaffee
362539fe2d make export a subcommand 2017-03-03 14:21:17 -06:00