Skip to content

Commit

Permalink
Fix CSV data export file accessibility (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
smarr authored Mar 24, 2024
2 parents 289387b + d0312fb commit b071994
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit b071994

Please sign in to comment.