Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CSV data export file accessibility #193

Merged
merged 3 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
chmod a+wx ${{ github.workspace }}
# start ReBenchDB server
NODE_DATA_EXPORT_PATH=${{ github.workspace }} RDB_DATA_EXPORT_PATH=/postgres-export DEV=true npm run start &
NODE_DATA_EXPORT_PATH=${{ github.workspace }} RDB_DATA_EXPORT_PATH=/postgres-export DATA_URL_BASE=/static DEV=true npm run start &
sleep 5
# run integration tests
Expand Down
2 changes: 1 addition & 1 deletion src/backend/db/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ export abstract class Database {
runId, trialId, cmdline, invocation, iteration, criterion
)
SELECT * FROM results WHERE value is NOT NULL
) TO PROGRAM 'gzip -9 > ${outputFile}'
) TO PROGRAM 'gzip -9 > ${outputFile} && chmod go+r ${outputFile}'
WITH (FORMAT csv, HEADER true)`;
const result = await this.query({
text: query
Expand Down
2 changes: 1 addition & 1 deletion src/backend/project/data-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function getExpData(

if (existsSync(`${siteConfig.dataExportPath}/${expFileName}`)) {
data.preparingData = false;
data.downloadUrl = `${siteConfig.staticUrl}/${expFileName}`;
data.downloadUrl = `${siteConfig.dataExportUrlBase}/${expFileName}`;
} else {
const expRequestId = `${expFilePrefix}-${format}`;
data.currentTime = new Date().toISOString();
Expand Down