Commit Graph

222 Commits

Author SHA1 Message Date
Stephanie You cdfabd2876 PR feedback 2023-08-29 14:35:24 -07:00
Stephanie You 392581fc8f make NO_POSITIONAL_ARGS a constant 2023-08-25 16:25:51 -07:00
Stephanie You 735837fc3a update dolt log to support tables separator (--) 2023-08-23 10:53:59 -07:00
Jason Fulghum 5514c1dce3 Fix for https://github.com/dolthub/dolt/issues/6001 2023-07-20 15:19:28 -07:00
Zach Musgrave 4f8f25312f Merge branch 'main' into ioutil 2023-06-28 14:37:20 -07:00
guoguangwu a84e257645 chore: remove refs to deprecated io/ioutil 2023-06-26 14:39:28 +08:00
Neil Macneale IV f32fc4699a PR Feedack addressed 2023-06-23 09:51:52 -07:00
Neil Macneale IV cd0cf8f9a4 Add ability to drop values from ArgParserResults 2023-06-16 15:56:11 -07:00
Nick Tobey 72f0dc2bad Add clarifying comment to ParseGlobalArgs 2023-05-23 12:28:53 -07:00
Nick Tobey a1b2a38f47 Use more meaningful variable names. 2023-05-23 12:21:19 -07:00
Nick Tobey edc5528ace Replace global arg parser. 2023-05-22 16:13:11 -07:00
Neil Macneale IV 9575228ae5 Refactor SQLEngine instantiation into the Queryist interface
SQL Command arguments which pertain to instantiating a local SqlEngine instance are now global arguments which come before the sql subcommand. This is a breaking change for users of the sql command who pass in the following arguments:

--data-dir
--user
--doltcfg-dir
--privilege-file
--branch-control-file
All of the test changes pertain to moving those arguments, and nothing else. This is by design to ensure we don't have broader impact to the interface.

With this abstraction in place, we can put a different Queryist implementation in place - specifically one which talks to a remotes server - which is the end goal.

See: https://github.com/dolthub/dolt/issues/3922
2023-05-08 16:50:46 -07:00
James Cor 6d664a5963 deleted wrong tests 2023-05-05 14:24:15 -07:00
James Cor 9120ab1ad3 better fix 2023-05-05 14:06:32 -07:00
James Cor e2fdc9d16d fix unit tests 2023-05-05 12:21:50 -07:00
James Cor b98a8949ee normalize windows file paths better 2023-05-05 12:08:05 -07:00
Neil Macneale IV 2dd8ad68f9 Update Go tests to use CliContext with an SqlEngine 2023-05-05 11:46:47 -07:00
Nick Tobey fe47616684 Add unit test for too many arguments passed to ArgParser. 2023-04-19 11:37:36 -07:00
Nick Tobey 43aee5f4d1 Update Name field in ArgParser. 2023-04-19 11:37:18 -07:00
Nick Tobey f86c44db47 Add docstrings for NewArgParser... functions. 2023-04-19 11:36:48 -07:00
Nick Tobey ebcaabc5b4 Rename ArgParser.TooManyArgsError to TooManyArgsErrorFunc 2023-04-19 11:36:18 -07:00
Nick Tobey c0a8cb33d2 Fix typo in parser.go error string. 2023-04-18 11:49:35 -07:00
Nick Tobey 19ef9a1d21 ArgParser now takes the name of the command being parsed.
This allows us to print the command name in error messages and disambiguate cases where `dolt_sql` calls a procedure that corresponds to another dolt command.
2023-04-18 11:45:58 -07:00
Nick Tobey 6b2bec33b3 Allow any number of arguments when MaxArgs is set to -1. 2023-04-14 15:23:54 -07:00
Nick Tobey b6abad268b Allow commands to specify a more helpful error message when too many args are passed. 2023-04-14 14:45:11 -07:00
Nick Tobey 9fad10d8fe Replace argparser.NewArgParser with NewArgParserWithMaxArgs and NewArgParserWithVariableArgs
This requires commands to specify the max number of positional arguments they expect.
This makes it harder to accidentally accept extra arguments and ignore them.
2023-04-14 10:18:33 -07:00
JCPrice0024 e04d4d8422 found another minor bug in results.go
Documented behavior
2022-12-05 17:34:37 -05:00
Jason Fulghum 09ec939a10 Updating test name 2022-11-30 13:14:13 -08:00
Jason Fulghum 6f3f182296 Removing newline 2022-11-30 10:29:33 -08:00
Tan Yong Zhi a3d471612e Swap long and short form flag behavior 2022-11-30 13:43:37 +08:00
Tan Yong Zhi 67566b8898 Fix tests 2022-11-29 19:49:18 +08:00
Tan Yong Zhi f654cee95d Fix value being read in param suffix 2022-11-29 17:26:06 +08:00
Aaron Son f7c69bf881 Merge pull request #4749 from dolthub/aaron/cluster-jwks-auth
go/libraries/doltcore/sqle/cluster: Add JWT authentication for peer communication to cluster replicas.
2022-11-15 12:21:55 -08:00
Zach Musgrave 04dec6e54c Added alias for renamed option 2022-11-14 15:23:22 -08:00
Aaron Son b22fbf11f2 go/libraries/doltcore/sqle/cluster: Add JWT authentication for peer communication to cluster replicas.
A remotesapi server running on a cluster replica publishes a JWKS.

Every outbound GRPC call the cluster replica makes includes a JWT signed with a
private key.

remotesapi servers running on cluster replicas require and validate incoming
JWTs for cluster traffic. The set of valid signing keys is taken from the
JWKSes which are published at /.well-known/jwks.json on the standby replica
hosts.

It is possible to configure tls_ca on cluster remotesapi to configure the set
of trusted roots for outbound TLS connections. Because the JWKSes are served
over the same connection, and becuase signed JWTs are not replay resistent, TLS
is recommended for all deployment topologies.
2022-11-10 09:26:38 -08:00
Aaron Son 3c484143c6 go/libraries/utils/jwtauth: First pass at multiJWKS store. 2022-11-09 09:07:45 -08:00
Taylor Bantle f7246f854b Supply multiple refs to --not 2022-11-02 13:39:38 -07:00
reltuk 546d2b6898 [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2022-11-02 16:55:49 +00:00
Aaron Son 57523a9323 go/libraries/doltcore/sqle/cluster: Add the ability to generate a keypair, serve a JWKS, and sign outbound RPCs with a JWT. 2022-11-02 09:54:09 -07:00
Zach Musgrave 0f0265db30 Deleted zombie copy of pipeline code 2022-09-13 17:33:26 -07:00
Zach Musgrave e9f6e4a16e Delted unused panic to err code 2022-09-13 17:29:02 -07:00
Brian Hendriks 683b8d39b0 comments 2022-08-23 12:08:02 -07:00
Brian Hendriks 30722658b3 refactor 2022-08-23 11:40:27 -07:00
jennifersp f42712b240 allow optional empty value for string value for arg parsing (#4093)
* arg value should allow optional empty value

* fix godocs
2022-08-15 20:05:44 -07:00
coffeegoddd b68814c796 [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2022-08-05 17:21:26 +00:00
Andy Arthur c811935149 close files in filesys.CopyFile 2022-07-28 20:08:05 -07:00
Andy Arthur c95153ca6c added temp migration environment 2022-07-25 14:52:47 -07:00
Andy Arthur 226da75db3 added temp file method to utils/filesys 2022-07-25 14:52:47 -07:00
Taylor Bantle 0e0e5d9893 Attempt to fix windows unit test 2022-07-22 15:10:25 -07:00
Taylor Bantle 3c53115480 Copyright header 2022-07-22 13:54:33 -07:00