Open
Conversation
Remove unneeded information from the table that would over complicate the query and taint the DB with duplicates of information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a complete Export History feature that persists and exposes a paginated record of each user's simulation export
operations. When a user exports simulation data, the export details are saved to a new database table. Users can then query their export
history through a new REST endpoint.
What was changed
Database layer — New
vc_simulation_export_historytable (PostgreSQL) stores export metadata: job ID,simulation/biomodel/mathmodel/math key references, export format, timestamp, output URI, exported variables, time range, and event
status. Implements insert, paginated query (100 records per page, ordered by date DESC), and delete-by-URI operations.
ExportSpecsenrichment — AddedbioModelKey,mathModelKey, andmathDescriptionKeyfields so that export requests carry themodel references needed to populate the history table.
REST endpoint — New
GET /api/v1/export/history?pageNumber=Nendpoint (requiresuserrole) returns a paginated list ofExportHistoryrecords for the authenticated user.OpenAPI spec & generated clients — Updated
openapi.yamlwith the new endpoint andExportHistory,ExportFormat, andDifferentParameterValuesschemas. Regenerated Java (vcell-restclient), Python (python-restclient), and TypeScript/Angular(
webapp-ng) clients.Tests — DB-level tests verify insert, delete, and multi-record retrieval with model-name joins. Client integration tests cover
end-to-end export → history flow, ordering (most-recent-first), and pagination boundaries.
Test plan
ExportHistoryDBTest— unit tests for DB CRUD operations pass against a real test databaseExportHistoryClientTest— integration tests verify the REST endpoint returns correct history, ordering, and page boundariesExportRequestTest/ExportServerTest— existing export tests still pass with updatedExportSpecsconstructorGET /api/v1/export/historyand confirm the record appears with correctmetadata
Notes
it is not included in the PR description.