Commit Graph

3875 Commits

Author SHA1 Message Date
Aaron Son a2fe5295b3 go/cmd/dolt: Allow the Dolt CLI to connect to a running dolt sql-server which is configured with require_secure_transport: true.
When Dolt CLI is running in a directory with a corresponding running sql-server
process, it will connect to the server process and complete its work using SQL
statements. Previously, the Dolt CLI was configured to always connect on a
plaintext TCP connection for these connections. That meant it did not work for
servers configured with require_secure_transport: true. One consequence was
that the published Dolt dockerhub image did not work with
require_secure_transport: true, since that image runs `dolt sql` against the
running server as part of its entrypoint.

This changes `dolt` CLI to connect over (non-verified) TLS if such as an option
is presented by the server. The CLI still falls back to plaintext as well.

Dolt CLI still does not work when the server is configured with
require_client_certificate, since Dolt CLI does not currently have a way to
configure its presented client certificate and private key. As a consequence,
at least for the time being, the published DockerHub images for Dolt do not
work with require_client_certificate: true.
2025-11-24 13:42:37 -08:00
Neil Macneale IV 63f9b5272c Enable sql-engine=remote for cherry-pick.bats 2025-11-21 10:15:01 -08:00
Neil Macneale IV abd975f73a Change status_table type to use a byte rather than a bool 2025-11-21 10:15:01 -08:00
Jason Fulghum e5026cba91 PR feedback 2025-11-20 15:20:00 -08:00
Jason Fulghum db779f95d5 Add require_client_cert to sql server configuration options 2025-11-20 12:48:55 -08:00
Jason Fulghum f2969f6b44 Adding support for configuring a CA to validate client certs, and BATS tests for client-cert auth. 2025-11-14 14:32:22 -08:00
Neil Macneale IV dbe2d1a4ab Merge pull request #10072 from dolthub/macneale4-claude/branch-activity-disable
Optionally enable branch activity stats
2025-11-12 17:57:29 -08:00
Neil Macneale IV 84915c99cd Fix bats test to properly configure server port
The issue was that start_sql_server_with_args appends --port after
--config, but the config file was resetting to defaults. Fixed by:
1. Calling definePORT to get an available port
2. Including the port in the config file under listener.port
3. Using start_sql_server_with_args_no_port which expects PORT to be set

All 6 branch-activity tests now pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 00:01:51 +00:00
Neil Macneale IV 237fe89968 Fix bats test config to avoid duplicate YAML keys
The start_sql_server_with_config function creates a config with
a 'behavior:' section and appends the provided config file. This
caused a YAML parse error when our config also had a 'behavior:' key.

Fixed by creating a complete config file and using start_sql_server_with_args
instead, which avoids the duplicate key issue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 23:27:50 +00:00
Neil Macneale IV 44ba402768 Add error handling for disabled branch activity tracking
- Modified branch-activity.bats to use config file that enables tracking
- Added IsTrackingEnabled() method to BranchActivityTracker
- Added error check in branch_activity_table to return helpful error message
  when tracking is disabled
- Added new test case to verify error is shown when tracking is disabled
- Error message instructs users to enable via config:
  'behavior.branch_activity_tracking: true'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 23:14:51 +00:00
coffeegoddd☕️✨ 89ca6b26a1 /go.{mod,sum}: run go mod tidy 2025-11-10 16:20:53 -08:00
elianddb df97c884dc amend to only fix 2025-11-10 12:55:48 -05:00
elianddb 56e2213301 fix json and yaml to both apply 2025-11-10 11:47:39 -05:00
elianddb 5d8ee7fc40 add support for doltcfg.d/ sql-server yaml 2025-11-10 11:23:59 -05:00
elianddb 8de37c3525 mv to bats for server test 2025-11-07 17:40:45 -08:00
elianddb f1d02f5588 mv tests to binlogreplication/ 2025-11-05 14:47:42 -08:00
elianddb b819ff3bbd fix go ver
# Conflicts:
#	go/go.mod
#	go/go.sum
2025-11-05 14:47:41 -08:00
elianddb fdb34cc988 fix deps and dir struct
# Conflicts:
#	go/go.mod
#	go/go.sum
2025-11-05 14:47:41 -08:00
elianddb 6d74f5488a mv mariadb-binlog.bats to mysql-client-tests 2025-11-05 14:47:41 -08:00
elianddb bcb2dfbd79 add priv test 2025-11-05 14:47:41 -08:00
elianddb 48e7ae75b7 add mariadb-binlog.bats 2025-11-05 14:47:40 -08:00
Elian 33237a9e0f Merge pull request #10033 from dolthub/elian/10015
dolthub/dolt#10015: Support `read_only` to always be true in standby mode
2025-11-05 14:46:29 -08:00
elianddb 106bc07219 amend flaky build tests 2025-11-05 13:53:28 -08:00
elianddb b59aad1939 read_only always true on standby 2025-11-05 13:03:29 -08:00
Neil Macneale IV a74a4a62a8 Merge pull request #10020 from dolthub/macneale4/ci-9946
refactor: make dolt_diff_summary respect dolt_ignore patterns
2025-11-03 12:06:39 -08:00
Nick Tobey ce7311833f Merge pull request #9989 from dolthub/nicktobey/nonlocal-fks
Allow foreign keys on nonlocal tables
2025-10-29 14:49:47 -07:00
Nick Tobey ba3fbd0fc5 Add engine tests for nonlocal tables 2025-10-28 13:59:30 -07:00
Jason Fulghum eb6dd9144f PR Feedback: adding BATS tests back and updating for new behavior 2025-10-27 14:26:30 -07:00
Jason Fulghum 49a434a090 Relax column tag uniqueness to only require tags to be unique in each table 2025-10-27 14:26:30 -07:00
Neil Macneale IV 4bf183bfcd Fix more tests 2025-10-23 16:57:35 -07:00
Neil Macneale IV 2589565bad Handle multiple server 2025-10-23 16:28:20 -07:00
Neil Macneale IV 1f50489cb1 Add more tests. Add event after commitCurrentHead 2025-10-23 16:28:20 -07:00
Neil Macneale IV 9d8475e4f6 Move read events to StartTransaction
Also filter out event scheduler sessions
2025-10-23 16:28:20 -07:00
Neil Macneale IV a97ee48ec0 bats tests started for branch activity table 2025-10-23 16:28:20 -07:00
Aaron Son 38a1ed32ff Merge pull request #9990 from dolthub/aaron/gc-full-oldgen-fix
go/store/nbs: store.go: Fix a bug which caused dolt gc --full to not collect new data sometimes.
2025-10-23 11:40:25 -07:00
Aaron Son f3adba56cc go/store/nbs: store.go: Fix a bug which caused dolt gc --full to not collect new data sometimes.
If `dolt gc --full` was run, and then branches were changed and `dolt gc` was run, possibly multiple times, and then all of the state was returned to the state of the database during the initial `dolt gc --full`, then running `dolt gc --full` anew would falsely conclude that there was nothing to collect.

After the GC work is done, and we are inside swapTables, there is no need to check for whether we should swap the tables. We already have done the work to compute the new files and we should apply them regardless.
2025-10-23 10:54:38 -07:00
Nick Tobey bd1b42e3ca Update nonlocal table bats tests. 2025-10-23 01:17:44 -07:00
Nick Tobey 9ca908f441 Prevent creating a table if it would clash with a nonlocal_tables rule. 2025-10-23 01:17:44 -07:00
Nick Tobey ecd150ab5e nonlocal tables appear in show_tables 2025-10-23 01:16:03 -07:00
Nick Tobey 6d70219766 Allow creating foreign key on nonlocal table. 2025-10-23 01:16:03 -07:00
David Dansby 0152ea1ded Merge branch 'main' of github.com:dolthub/dolt into codeaucafe/5861-tmp 2025-10-22 21:47:55 -07:00
Aaron Son db127eb1b8 Apply suggestions from code review
Co-authored-by: Neil Macneale IV <46170177+macneale4@users.noreply.github.com>
2025-10-22 16:51:49 -07:00
Aaron Son 52e673e445 go/store/nbs: archive_writer.go: Fix problem with archive stream writer where we did not remove temptf files when we were pushing changes. 2025-10-22 16:23:08 -07:00
angelamayxie cd41015ee8 Update integration-tests/bats/sql-load-data.bats
Co-authored-by: James Cor <jcor@ucsd.edu>
2025-10-21 16:28:08 -07:00
Angela Xie bff515c7de update bats test 2025-10-21 15:55:05 -07:00
David Dansby e895a388c2 Merge branch 'main' of github.com:dolthub/dolt into codeaucafe/5861-tmp 2025-10-20 22:25:47 -07:00
elianddb 5fa7e5a817 amend bats for default cols 2025-10-20 15:39:56 -07:00
David Dansby 4e37ef018d Merge remote-tracking branch 'upstream/main' into codeaucafe/5861-tmp 2025-10-19 17:12:37 -07:00
Elian 557b174cea Merge pull request #9961 from dolthub/elian/entrydeps
docker-entrypoint.sh: Add missing dependencies for SQL file extraction and amend MySQL entry point behavior
2025-10-17 13:57:22 -07:00
elianddb c83731152a amend tmp dirs in bats 2025-10-17 12:54:06 -07:00