Skip to content

fix(xugu): accept scheduler job object sources - #7764

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
mapan0424:codex/xugu-job-source-fix
Sep 2, 2026
Merged

fix(xugu): accept scheduler job object sources#7764
t8y2 merged 2 commits into
t8y2:mainfrom
mapan0424:codex/xugu-job-source-fix

Conversation

@mapan0424

Copy link
Copy Markdown
Contributor

Summary

Fixes scheduler job source loading for XuguDB connections.

Why this is needed

The desktop tree already exposes scheduler jobs and maps the selected node to the JOB object type. The XuguDB agent also provides the corresponding source reconstruction for scheduler jobs. However, the dbx-core object-source model did not accept JOB when deserializing the request. As a result, selecting View Source failed before the request reached the agent with an error similar to:

invalid args objectType for command get_object_source: unknown variant JOB

This made an object that was visible and otherwise supported by the XuguDB integration appear unusable in the UI.

Implementation

  • Added Job to the shared ObjectSourceKind enum.
  • Added JOB keyword parsing and serde round-trip coverage.
  • Added exhaustive handling in schema/source-generation and transfer paths.
  • Kept non-Xugu providers unchanged: their job branches are no-op/unsupported, and Oracle does not attempt to call an invalid metadata API for jobs.
  • Preserved the existing XuguDB agent source-generation path without changing its SQL behavior.

Validation

  • cargo check -p dbx-core
  • cargo check -p dbx-web -q
  • cargo test -p dbx-core --lib object_source_sql::tests:: (70 passed)
  • cargo test -p dbx-core --lib types::tests::object_source_kind_accepts_job_wire_value -- --exact (passed)
  • go test ./... in agents/drivers/xugu (passed)
  • Built the debug macOS application with pnpm tauri build --debug --bundles app --no-sign.
  • Performed a packaged UI verification: expanded the scheduler-jobs node, selected a job, and opened its source successfully. The generated DBMS_SCHEDULER.CREATE_JOB(...) source was displayed and the unknown-variant error did not recur.

The full dbx-core library suite was also attempted; it reaches an unrelated existing stack-overflow failure in table_export::tests::external_driver_table_export_closes_cursor_at_row_limit. No changed-code test failed.

@github-actions github-actions Bot added area/core Shared DBX core runtime bug Something isn't working labels Sep 1, 2026
@t8y2
t8y2 force-pushed the main branch 2 times, most recently from 920dc7c to c4cdcbc Compare September 1, 2026 10:07
# Conflicts:
#	crates/dbx-core/src/types.rs

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Maintainer conflict resolution pushed in ada7b54 (old head 5500169, merged main@7e24f4007 — merge commit with both sides preserved). The single conflict was the tail of mod tests in crates/dbx-core/src/types.rs: this PR's object_source_kind_accepts_job_wire_value vs main's completion_candidate_kind_accepts_uppercase_agent_wire_values. Resolution: keep BOTH tests. All other files auto-merged or were untouched by main; git range-diff maps the PR commit identically, and every PR-added line (the Job variant, all no-op match arms in schema/transfer/object_source_sql, both wire-value tests) is present in the resolved tree.

Checks: git diff --check clean, no conflict markers; Rust CI on this head is the merge gate (targeted types tests were interrupted locally by a disk-full environment issue, not by the code).

@t8y2
t8y2 merged commit 1818387 into t8y2:main Sep 2, 2026
14 checks passed
@t8y2

t8y2 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in 1818387, will be released in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Shared DBX core runtime bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants