Repository navigation
Closed
Description
Found while making the tests/ targets compile and run against real PostgreSQL 16 and MySQL 8 (#12). Each bug has a test gated with #[ignore = "bug: …"] that also returns early unless HAMMERWORK_TEST_KNOWN_BUGS=1 is set. CI runs with --include-ignored, so a plain ignore would still fail the build. To reproduce: HAMMERWORK_TEST_KNOWN_BUGS=1 cargo test --all-features --test <file> -- --include-ignored. Fixing a bug means removing the gate on its tests.
Archive
-
archive_jobsnever moves or marks the job. It copies the row tohammerwork_jobs_archivebut only setsarchived_aton the original (src/queue/postgres.rs~2277,src/queue/mysql.rs~2106).get_jobstill returnsCompleted, contradictingdocs/archiving.md. Tests:test_postgres_policy_based_archival,test_postgres_different_job_statuses_archival,test_mysql_basic_archival_flow,test_postgres_job_restoration. -
restore_archived_jobfails with a duplicate primary key. It re-inserts an id that is still inhammerwork_jobs(postgres.rs~2413; same code inmysql.rs~2244). Postgres error 23505. Test:test_postgres_compression_verification. -
list_archived_jobsalways reportsArchivalReason::Automatic. The reason is stored as plain text (Manual) but parsed withserde_json::from_str, which falls back to the default (postgres.rs~2507,mysql.rs~2324). Tests:test_postgres_list_archived_jobs_reason,test_mysql_list_archived_jobs_reason. - MySQL
get_archival_statsfails to decode.SUM()returnsDECIMAL, which is decoded asi64(mysql.rs~2372). Test:test_mysql_archival_stats. -
JobArchiver::archive_jobs_with_progress/_with_eventsarchive only one batch. Each makes a singlearchive_jobscall, which is capped atpolicy.batch_size(src/archive.rs~860/~920). Tests:test_jobarchiver_event_publishing_comprehensive,test_jobarchiver_progress_tracking_comprehensive,test_jobarchiver_performance_with_public_pool.
Batch
- Postgres
get_batch_statusfails to decodestatus.impl Type<Postgres> for BatchStatus(src/batch.rs~62) lackscompatible(), so decoding theVARCHARcolumn errors withColumnDecode … BatchStatus (TEXT) not compatible with VARCHAR(postgres.rs~1085). Tests: 4 Postgres tests inbatch_tests.rs, 2 inworker_batch_tests.rs.
hammerwork-web
-
WebDashboard::start()panics when CORS is disabled.warp::cors().allow_origin("none")panics with "missing scheme" (hammerwork-web/src/server.rsstart). Test:test_dashboard_startup_without_cors. - The dashboard rejects MySQL URLs when both DB features are on.
create_job_queue_with_typereturns "MySQL database URL provided but PostgreSQL is the default when both features are enabled" (server.rs~239). Test:test_dashboard_startup_with_mysql. -
hammerwork-webfails to compile with no database feature enabled. Either make that work or emit a clearcompile_error!.
cargo-hammerwork
- 3 Postgres failures in
cargo-hammerwork/tests/sql_query_tests.rs:test_postgres_spawn_list_queries,test_postgres_spawn_stats_queries,test_postgres_job_list_queries.
Part of #7.
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix: move archived jobs atomically and report live batch progress
fix(web): start without CORS, pick backend from URL scheme
fix(cli): use UUID[] depends_on and typed job list filters on Postgres
docs: changelog for #14 fixes
fix: archive, batch, web and CLI bugs from #14 (#18)