Skip to content

Conversation

@sachmii
Copy link
Contributor

@sachmii sachmii commented Jan 20, 2026

‼️ DO NOT DEPLOY TO TEST SERVER - CONTAINS DATABASE CHANGES ‼️
‼️ MERGE #1742 FIRST ‼️

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I documented the Java code using JavaDoc style.

Motivation and Context

The user data export needed some rework, see #1749.
The client side solution will be implemented in a separate PR. The client side changes are only a temporary solution to be able to test the feature.

Description

  • Asynchronous export workflow: Replaced synchronous ZIP streaming with an async request-based system where users request exports, the system processes them in background (via scheduled job), and sends download links via email when ready
  • Rate limiting and status tracking: Introduced a weekly cooldown period between export requests, new DataExportRequest entity to track export lifecycle (REQUESTED → IN_CREATION → EMAIL_SENT → DOWNLOADED), and status endpoint for users to check their export progress
  • Token-based download system: Implemented secure, time-limited download tokens with configurable expiration (7 days default) and public download endpoint that doesn't require authentication, with automatic status updates when downloads occur
  • Enhanced data collection: Expanded export data to include interview-related information (interview processes, slots, interviewees), uploaded images from the image repository, and improved document handling with proper MIME type extensions
  • New REST API endpoints: Created three new endpoints - POST /api/users/data-export to request exports, GET /api/users/data-export/status to check status, and GET /api/users/data-export/download/{token} for downloading prepared exports
  • Infrastructure improvements: Added database table for export requests, scheduled cron job for processing pending exports, email notification system (DATA_EXPORT_READY type), and configurable storage paths with proper file system security validation

Steps for Testing

Prerequisites:

  1. Log in to TumApply

  2. Export User data (wait few seconds)

  3. Check exported data corresponds with uploaded documents, applications etc.

  4. (Run integration tests)

Review Progress

Code Review

  • Code Review 1

Manual Tests

  • Test 1

Test Coverage

Warning: Both client and server tests failed. Coverage could not be fully measured. Please check the workflow logs.

Last updated: 2026-01-28 16:57:54 UTC

@sachmii sachmii self-assigned this Jan 20, 2026
@sachmii sachmii linked an issue Jan 20, 2026 that may be closed by this pull request
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) tests labels Jan 20, 2026
@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

…t/1750-rework-user-data-export-server-side
@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

🤖 OpenAPI spec and client code auto-updated and committed.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

📊 Server Test Coverage Too Low

🔍 View coverage locally:

./gradlew test jacocoTestReport
open build/reports/jacoco/test/html/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-server" artifact from this workflow run.

@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

@sachmii Test coverage has been automatically updated in the PR description.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

Copy link
Contributor

@Bofan-Zhu Bofan-Zhu left a comment

Choose a reason for hiding this comment

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

Thanks for reworking the export 😊.
Generally, what happens if exports are queued but the server reboots or crashes?
Also, does the user have to login to access the export link?

@sachmii sachmii requested a review from Bofan-Zhu January 28, 2026 16:04
@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 OpenAPI spec and client code auto-updated and committed.

@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

📊 Server Test Coverage Too Low

🔍 View coverage locally:

./gradlew test jacocoTestReport
open build/reports/jacoco/test/html/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-server" artifact from this workflow run.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

@github-actions
Copy link
Contributor

@sachmii Test coverage could not be fully measured because some tests failed. Please check the workflow logs for details.

@github-actions
Copy link
Contributor

📊 Client Test Coverage Too Low

🔍 View coverage locally:

npm run test:ci
open build/test-results/lcov-report/index.html

🌐 View coverage from GitHub:
Download the "coverage-report-client" artifact from this workflow run.

@github-actions
Copy link
Contributor

🤖 No OpenAPI or client changes needed.

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

Labels

client Pull requests that update TypeScript code. (Added Automatically!) config-change database ready for review server Pull requests that update Java code. (Added Automatically!) tests user management Code changes in user management module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework user data export (server side)

5 participants