发布

  • [OPIK-3056] [BE] Add dataset export job management (#4691)

    frostbyte_neo 发布于 2026-01-14 08:53:11 +00:00

    • OPIK-3056: Add database schema and API models for dataset export jobs

    • Revision 2: Address PR comments - fix migration number, author, and field sizes

    • Revision 3: Change file_path to TEXT for unlimited length

    • Revision 4: Add ON UPDATE CURRENT_TIMESTAMP to last_updated_at

    • Revision 5: Add last_updated_by field for audit trail consistency

    • Revision 9: Rename migration file from 000042 to 000043 to avoid conflict

    • OPIK-3056: Add streaming upload method to FileService

    • [OPIK-3056] [BE] Add dataset export job management with Redis stream integration

    • Remove files

    • Revision 2: Address PR comments - add workspace security, fix listener error handling, extract constants, rename polling

    • Fix config issues

    • Revision 5: Remove manual last_updated_at handling (now automatic via DB)

    • Revision 6: Rename DatasetExportJobListener to DatasetExportJobSubscriber and add toggle

    • Revision 7: Split update methods into updateToCompleted and updateToFailed

    • Revision 8: Add unit tests for DatasetExportJobSubscriber lifecycle gating

    • Revision 8: Add last_updated_by field for audit trail

    • Revision 4: Address PR comments - add workspace security, feature toggle, and tests

    • Add workspace_id filtering to DatasetExportJobDAO.deleteByIds to prevent cross-tenant deletion
    • Add isEnabled() check in CsvDatasetExportService.startExport to prevent jobs when export is disabled
    • Add test for disabled export feature
    • Update existing tests to mock isEnabled() returning true
    • Verify last_updated_at is handled by DB default (ON UPDATE CURRENT_TIMESTAMP)
    • Existing DatasetExportJobSubscriberTest already covers lifecycle gating
    • Revision 5: Fix DatasetExportJobDAO injection issue
    • Remove direct DAO injection from DatasetExportJobService
    • Update test to match new constructor signature
    • DAO is correctly attached via handle.attach() in transactions
    • Fixes Guice injection error on application startup
    • All tests pass successfully
    • Revision 6: Refactor duplicate NotFoundException tests into parameterized test
    • Merge updateJobToCompleted and updateJobToFailed NotFoundException tests
    • Use @MethodSource instead of hardcoded test data
    • Generate dynamic file paths and error messages
    • Reduces test duplication while maintaining coverage
    • Fix duplication
    下载附件