go/store/nbs: Fix possible data loss from Dolt CLI utilization when executing against a running server that was in the process of writing to its journal file.
Update test assert to check for "false" bool instead of
int "0" for the ignored column. This is to align with change to use
boolean type for the ignored column in the dolt_status_ignored system
table. The other tests were previously fixed to handle this type change,
but this one slipped through the cracks.
Refs: #5862
Update test assertions in dolt_status_ignored tests to use boolean
values (true/false) instead of byte values (byte(0)/byte(1)) for the
ignored column in statusIgnoredTableRow.
Refs: #5862
- init.bats: Use status != 0 instead of status == 1 for flexibility
- shallow-clone.bats: Add cd into cloned directory after dolt_clone
- sql-local-remote.bats: Run commands from within the dolt database directory
These tests now properly cd into the dolt database directory before
running commands that require a repository context.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address PR review feedback for dolt_status_ignored implementation
with refactors to error handling, adapter pattern, test
coverage, and copyright year.
Changes:
- Fix copyright year from 2020 to 2025 in status_ignored_table.go
- Add adapter pattern to NewStatusIgnoredTable; matches
StatusTable implementation.
- Add NewStatusIgnoredTableWithNoAdapter for default behavior
- Fix error handling in checkIfIgnored to return errors instead
of silently returning byte(0)
- Propagate ignore pattern errors up the call stack
Test coverage additions:
- Empty dolt_ignore table test verifying all tables show
ignored=0
- Conflicting patterns test with wildcard (test_*=true) vs
specific override (test_special=false)
- Update ls.bats to expect 27 system tables instead of 26
Error handling refactored to now matches patterns in status.go, commit
.go, and diff.go where IsTableNameIgnored errors are properly propagated
up rather than swallowed.
Refs: #5862
Add new dolt_status_ignored system table that extends dolt_status with
an "ignored" column to show which unstaged tables match dolt_ignore
patterns. This provides SQL equivalent of dolt status --ignored
functionality.
Implementation includes:
- StatusIgnoredTable type with schema containing table_name,
staged, status, and ignored columns
- Registration in system table constants and generated table
names lists
- Helper function getStatusTableRootsProvider to eliminate
duplicate switch case logic between StatusTableName and
StatusIgnoredTableName in database.go
- Shared getStatusRowsData function used by both dolt_status
and dolt_status_ignored to collect status data from roots and
working set
- Unexported helper functions in status_ignored_table.go for
ignore pattern checking: getIgnorePatterns,
buildUnstagedTableNameSet, and checkIfIgnored
- bats integration tests verifying behavior
The ignored column is only set for unstaged tables that match
patterns in dolt_ignore. Staged tables, constraint violations,
merge conflicts, and schema conflicts always have ignored = 0.
Refs: #5862