Tags: bytebase/bytebase
Tags
fix(elasticsearch): handle parsing errors in GetQuerySpan (#19335) Previously, GetQuerySpan ignored errors from ParseElasticsearchREST and returned QueryTypeUnknown for malformed queries (e.g. MongoDB queries). This resulted in a "permission denied" error ("disallowed query type") instead of a syntax error. This change modifies GetQuerySpan to: 1. Propagate errors from ParseElasticsearchREST. 2. Check for syntax errors in the ParseResult and return a formatted error if any exist. This ensures that invalid queries result in a proper syntax error message.
fix(parser): fix data masking bypass via table.* in JOIN queries (#19156 ) * fix(parser): fix data masking bypass via table.* in JOIN queries When using `SELECT table1.*, table2.* FROM table1 JOIN table2`, the masking was applied to incorrect columns. The bug was in the star expansion logic where `columnName` (containing the table name) was cleared to "" before being assigned to `tableName`, causing all qualified star expansions to resolve to the first table in the FROM clause. Fixed by saving the table/schema name before clearing columnName. Affected engines: PostgreSQL, Redshift Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(parser): add regression test for table.* JOIN masking Add test case that verifies table.* expansion in JOINs correctly maps columns to their respective source tables for masking. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
feat(frontend): add rollout link in legacy issue header (#18912) Add a link to the rollout view in the legacy IssueV1 header section when a rollout exists, allowing users to navigate to the new rollout UI. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
refactor(plan): show issue labels in two-step creation flow (#18586) Issue labels are properties of Issue, not Plan. Previously they were shown on the Plan page which was confusing. Now labels are selected in a popover when clicking "Ready for Review", making the two-step Plan → Issue creation flow clearer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
refactor: remove columns field from ExternalTableMetadata (#18151) Remove redundant wrapper field from ExternalTableMetadata struct and update initialization code to only use the proto field. This simplifies the code by storing data only in the proto field rather than duplicating it in a separate wrapper field. Changes: - Removed columns field from ExternalTableMetadata struct - Removed GetColumns() wrapper method - Updated initialization to skip columns slice population All tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
fix: improve MongoDB query error handling and bracket notation support ( #18017) * fix: improve MongoDB error handling to capture stdout When mongosh encounters errors (like BSONError for circular structures), the error messages are written to stdout rather than stderr. This change improves error handling in both Execute and QueryConn methods: - Capture both stdout and stderr in Execute method - In QueryConn, when shell command fails, read the output file first to get detailed error messages (like BSONError) before falling back to stdout/stderr - Add debug logging for MongoDB query commands This ensures users see proper error messages instead of generic failure messages when queries fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: make isMongoStatement more robust for bracket notation Previously, isMongoStatement() only recognized `db["collection"]` with double quotes, causing queries like `db['collection'].find()` to fail with circular structure errors. Now it accepts `db[` prefix regardless of quote type: - db['collection'] (single quotes) - db["collection"] (double quotes) - db[variableName] (variable access) This ensures the query wrapping logic (converting cursor to array) is applied correctly for all bracket notation variants. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: remove debug logging from MongoDB query Remove the debug slog.Info statement that was accidentally left in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
PreviousNext