Skip to content

Commit

Permalink
Fixes for both report builds and PR comment workflow (#495)
Browse files Browse the repository at this point in the history
* Address report_build out of date reference to arrow1

* Correct slim profile in report_build

* Tweak github actions usage in pr manipulation (v5 upgrade)

* Update test.yml

Account for broken asset generation in target branch

* Tweak to report_build - correctly define slim build as 'reader + writer' (sans compressions, unlike prior builds that did not exclude default features). Also correct the sync report build 😞

* Better readability in asset size report
  • Loading branch information
H-Plus-Time authored Apr 10, 2024
1 parent c369889 commit 2f06d31
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pr-manipulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
with:
script: |
const fs = require('fs');
const artifacts = await github.actions.listWorkflowRunArtifacts({
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
...context.repo,
run_id: ${{github.event.workflow_run.id }},
});
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr"
})[0];
const download = await github.actions.downloadArtifact({
const download = await github.rest.actions.downloadArtifact({
...context.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
Expand All @@ -43,7 +43,7 @@ jobs:
const issueNumber = Number(fs.readFileSync('./NR'));
const summaryContent = fs.readFileSync('./step_summary.md', 'utf-8');
const existingCommentsOpts = github.issues.listComments.endpoint.merge({
const existingCommentsOpts = github.rest.issues.listComments.endpoint.merge({
...context.repo, issue_number: issueNumber
});
const existingComments = await github.paginate(existingCommentsOpts);
Expand All @@ -52,7 +52,7 @@ jobs:
const body = `${summaryContent}\n${tagPattern}`;
const preExistingComment = existingComments.find((comment) => comment.body?.includes(tagPattern));
if(preExistingComment) {
await github.issues.updateComment({ ...context.repo, comment_id: preExistingComment.id, body });
await github.rest.issues.updateComment({ ...context.repo, comment_id: preExistingComment.id, body });
} else {
await github.issues.createComment({ ...context.repo, issue_number: issueNumber, body });
await github.rest.issues.createComment({ ...context.repo, issue_number: issueNumber, body });
}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
// now, read in the asset manifests, for the head and base
let baseAssets = {};
try {
baseAssets = JSON.parse(fs.readFileSync('./base_asset_manifest.json'));
baseAssets = JSON.parse(fs.readFileSync('./base_asset_manifest.json')) ?? {};
} catch (error) {
console.log('No base asset manifest found');
}
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
if(!Number.isFinite(proportionalDelta) || sign === 0) {
return [`${subK}_delta`, fragment]
} else {
const formattedFragment = `$\\color{${colorMap[sign]}}\\text{${fragment.replace('%', '\\%')}}$`;
const formattedFragment = `$\\color{${colorMap[sign]}}\\textbf{${fragment.replace('%', '\\%')}}$`;
return [`${subK}_delta`, formattedFragment]
}
}))
Expand All @@ -249,4 +249,4 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: pr
path: pr/
path: pr/
14 changes: 8 additions & 6 deletions scripts/report_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ wasm-pack build \
--release \
--no-pack \
--out-dir report_pkg/slim \
--out-name arrow1 \
--out-name parquet_wasm \
--target web \
--features=arrow1 &
--no-default-features \
--features={reader,writer}
echo "Building arrow-rs sync"
wasm-pack build \
--release \
--no-pack \
--out-dir report_pkg/sync \
--out-name arrow1 \
--out-name parquet_wasm \
--target web \
--features={arrow1,reader,writer,all_compressions} &
--no-default-features \
--features={reader,writer,all_compressions} &

echo "Building arrow-rs async_full"
wasm-pack build \
--release \
--no-pack \
--out-dir report_pkg/async_full \
--out-name arrow1 \
--out-name parquet_wasm \
--target web \
--features={arrow1,reader,writer,all_compressions,async} &
--features=full &

wait;

0 comments on commit 2f06d31

Please sign in to comment.