Skip to content

Commit 3c77fd2

Browse files
authored
Merge pull request #350 from bitfinexcom/staging
Release version 4.21.0
2 parents c683605 + f58ff4c commit 3c77fd2

11 files changed

Lines changed: 142 additions & 39 deletions

File tree

.github/workflows/build-electron-app.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ jobs:
8383
retry_wait_seconds: 10
8484
max_attempts: 3
8585
retry_on: any
86-
command: ./scripts/launch.sh -lwp
86+
command: |
87+
if [[ "${REPO_OWNER}" != "${{ github.repository_owner }}" ]]; then
88+
./scripts/launch.sh -lw
89+
else
90+
./scripts/launch.sh -lwp
91+
fi
8792
- name: Zip Linux Unpacked build
8893
run: zip -r dist/linux-unpacked.zip dist/linux-unpacked
8994
- name: Upload Linux Unpacked build
@@ -98,6 +103,24 @@ jobs:
98103
with:
99104
name: win-unpacked
100105
path: dist/win-unpacked.zip
106+
- if: env.REPO_OWNER != github.repository_owner
107+
name: Upload Linux Dist Release
108+
uses: actions/upload-artifact@v4
109+
with:
110+
name: linux-dist-release
111+
path: |
112+
dist/*-linux.AppImage
113+
dist/*-linux.AppImage.zip
114+
dist/latest-linux.yml
115+
- if: env.REPO_OWNER != github.repository_owner
116+
name: Upload Win Dist Release
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: win-dist-release
120+
path: |
121+
dist/*-win.exe
122+
dist/*-win.exe.blockmap
123+
dist/latest.yml
101124
- name: Prepare cache folders
102125
run: |
103126
sudo chown -R $(id -u):$(id -g) ~/.cache/electron
@@ -178,14 +201,27 @@ jobs:
178201
if [[ -z "${APPLE_APP_SPECIFIC_PASSWORD}" || "${NOTARIZE:-}" != "1" ]]; then unset APPLE_APP_SPECIFIC_PASSWORD; fi
179202
if [[ -z "${CSC_LINK}" || "${NOTARIZE:-}" != "1" ]]; then unset CSC_LINK; fi
180203
if [[ -z "${CSC_KEY_PASSWORD}" || "${NOTARIZE:-}" != "1" ]]; then unset CSC_KEY_PASSWORD; fi
181-
./scripts/build-release.sh -mp
204+
if [[ "${REPO_OWNER}" != "${{ github.repository_owner }}" ]]; then
205+
./scripts/build-release.sh -m
206+
else
207+
./scripts/build-release.sh -mp
208+
fi
182209
- name: Zip Mac Unpacked build
183210
run: zip -r dist/mac.zip dist/mac
184211
- name: Upload Mac Unpacked build
185212
uses: actions/upload-artifact@v4
186213
with:
187214
name: mac-unpacked
188215
path: dist/mac.zip
216+
- if: env.REPO_OWNER != github.repository_owner
217+
name: Upload Mac Dist Release
218+
uses: actions/upload-artifact@v4
219+
with:
220+
name: mac-dist-release
221+
path: |
222+
dist/*-mac.zip
223+
dist/*-mac.zip.blockmap
224+
dist/latest-mac.yml
189225
190226
linux-e2e-test-runner:
191227
name: Linux E2E Test Runner
@@ -214,7 +250,7 @@ jobs:
214250
- name: Normalize E2E test report
215251
run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml
216252
- name: Upload Linux E2E test results
217-
uses: actions/upload-artifact@v3
253+
uses: actions/upload-artifact@v4
218254
with:
219255
name: linux-e2e-test-results
220256
path: e2e-test-report.xml
@@ -246,7 +282,7 @@ jobs:
246282
- name: Normalize E2E test report
247283
run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml
248284
- name: Upload Win E2E test results
249-
uses: actions/upload-artifact@v3
285+
uses: actions/upload-artifact@v4
250286
with:
251287
name: win-e2e-test-results
252288
path: e2e-test-report.xml
@@ -280,7 +316,7 @@ jobs:
280316
- name: Normalize E2E test report
281317
run: node ./scripts/node/normalize-e2e-test-report e2e-test-report.xml
282318
- name: Upload Mac E2E test results
283-
uses: actions/upload-artifact@v3
319+
uses: actions/upload-artifact@v4
284320
with:
285321
name: mac-e2e-test-results
286322
path: e2e-test-report.xml

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: ./scripts/setup.sh -u
2626
- name: Run tests
2727
run: npm test -- -- --reporter=json --reporter-option output=test-report.json
28-
- uses: actions/upload-artifact@v3
28+
- uses: actions/upload-artifact@v4
2929
if: success() || failure()
3030
with:
3131
name: test-results

.github/workflows/e2e-test-report.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,50 @@ jobs:
1818
runs-on: ubuntu-22.04
1919
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2020
steps:
21-
- uses: dorny/test-reporter@v1
21+
- name: Download Linux E2E test results
22+
uses: actions/download-artifact@v4
23+
with:
24+
run-id: ${{ github.event.workflow_run.id }}
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
name: linux-e2e-test-results
27+
path: linux-e2e-test-results
28+
- uses: dorny/test-reporter@v1.8.0
2229
id: linux-e2e-test-results
2330
with:
24-
artifact: linux-e2e-test-results
2531
name: Linux E2E Tests
26-
path: e2e-test-report.xml
32+
path: linux-e2e-test-results/e2e-test-report.xml
2733
reporter: jest-junit
28-
- uses: dorny/test-reporter@v1
34+
# Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files'
35+
# See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458
36+
max-annotations: 0
37+
- name: Download Win E2E test results
38+
uses: actions/download-artifact@v4
39+
with:
40+
run-id: ${{ github.event.workflow_run.id }}
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
name: win-e2e-test-results
43+
path: win-e2e-test-results
44+
- uses: dorny/test-reporter@v1.8.0
2945
id: win-e2e-test-results
3046
with:
31-
artifact: win-e2e-test-results
3247
name: Win E2E Tests
33-
path: e2e-test-report.xml
48+
path: win-e2e-test-results/e2e-test-report.xml
3449
reporter: jest-junit
35-
- uses: dorny/test-reporter@v1
50+
max-annotations: 0
51+
- name: Download Mac E2E test results
52+
uses: actions/download-artifact@v4
53+
with:
54+
run-id: ${{ github.event.workflow_run.id }}
55+
github-token: ${{ secrets.GITHUB_TOKEN }}
56+
name: mac-e2e-test-results
57+
path: mac-e2e-test-results
58+
- uses: dorny/test-reporter@v1.8.0
3659
id: mac-e2e-test-results
3760
with:
38-
artifact: mac-e2e-test-results
3961
name: Mac E2E Tests
40-
path: e2e-test-report.xml
62+
path: mac-e2e-test-results/e2e-test-report.xml
4163
reporter: jest-junit
64+
max-annotations: 0
4265
- name: E2E Test Report Summary
4366
run: |
4467
echo "### E2E Test Report page is ready! :rocket:" >> $GITHUB_STEP_SUMMARY

.github/workflows/test-report.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,22 @@ jobs:
1818
runs-on: ubuntu-22.04
1919
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2020
steps:
21-
- uses: dorny/test-reporter@v1
21+
- name: Download test results
22+
uses: actions/download-artifact@v4
23+
with:
24+
run-id: ${{ github.event.workflow_run.id }}
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
name: test-results
27+
path: test-results
28+
- uses: dorny/test-reporter@v1.8.0
2229
id: test-results
2330
with:
24-
artifact: test-results
2531
name: Mocha Tests
26-
path: test-report.json
32+
path: test-results/test-report.json
2733
reporter: mocha-json
34+
# Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files'
35+
# See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458
36+
max-annotations: 0
2837
- name: Test Report Summary
2938
run: |
3039
echo "### Test Report page is ready! :rocket:" >> $GITHUB_STEP_SUMMARY

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [4.21.0] - 2024-03-20
11+
12+
### Added
13+
14+
- Added ability to handle `PDFBufferUnderElectronCreationError` error to use WebSockets to inform users for better UX. PRs: [bfx-report#354](https://github.com/bitfinexcom/bfx-report/pull/354), [bfx-reports-framework#359](https://github.com/bitfinexcom/bfx-reports-framework/pull/359)
15+
- Implemented support for `emitReportFileGenerationFailedToOne` ws events on UI side to inform users about report generation failing. PR: [bfx-report-ui#787](https://github.com/bitfinexcom/bfx-report-ui/pull/787)
16+
- Added missing translations for PDF reports. PRs: [bfx-report#356](https://github.com/bitfinexcom/bfx-report/pull/356), [bfx-reports-framework#362](https://github.com/bitfinexcom/bfx-reports-framework/pull/362)
17+
- Added DB migration for `publicCollsConf` table name with Cyrillic `c`. PR: [bfx-reports-framework#360](https://github.com/bitfinexcom/bfx-reports-framework/pull/360)
18+
- Added migration for public colls conf endpoint name with Cyrillic `c`. PR: [bfx-report-ui#788](https://github.com/bitfinexcom/bfx-report-ui/pull/788)
19+
- Added ability to upload dist release if repo owner is customized using manual build run. PR: [bfx-report-electron#347](https://github.com/bitfinexcom/bfx-report-electron/pull/347)
20+
21+
### Changed
22+
23+
- Updated `GH Actions` to use Nodejs `v20` to prevent breaking changes in workflow. PRs: [bfx-report#355](https://github.com/bitfinexcom/bfx-report/pull/355), [bfx-reports-framework#361](https://github.com/bitfinexcom/bfx-reports-framework/pull/361), [bfx-report-electron#344](https://github.com/bitfinexcom/bfx-report-electron/pull/344), [bfx-facs-db-better-sqlite#9](https://github.com/bitfinexcom/bfx-facs-db-better-sqlite/pull/9)
24+
- Migrated from the `deprecated` reports generation methods usage to the actual ones according to the latest backend changes. PR: [bfx-report-ui#784](https://github.com/bitfinexcom/bfx-report-ui/pull/784)
25+
- Allowed all pairs removal at the `Market History / Spot` section according to the latest UX improvement proposals: We should allow the user to remove the current pair and display an empty table that says `No history to display`. PR: [bfx-report-ui#786](https://github.com/bitfinexcom/bfx-report-ui/pull/786)
26+
- Improved print PDF under Electronjs. Turned off ipc log transport between render and main process as unused, it prevents ipc transport error from `electron-log` lib. Suppressed error modal window if pdf gen failed: the idea here is to inform the user if something goes wrong using WS event for better UX instead of showing a modal window error as it is annoying in most cases. Improved pdf generation performance for big html templates, uses `loadFile` method of electron api instead of `base64` encoding. Bumped up Electronjs minor version to have the last fixes. PR: [bfx-report-electron#342](https://github.com/bitfinexcom/bfx-report-electron/pull/342)
27+
28+
### Fixed
29+
30+
- Prevented duplication possibility for items in the selectors of the UI. PR: [bfx-report-ui#785](https://github.com/bitfinexcom/bfx-report-ui/pull/785)
31+
1032
## [4.20.0] - 2024-03-06
1133

1234
### Added

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bfx-report-electron",
3-
"version": "4.20.0",
3+
"version": "4.21.0",
44
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
55
"description": "Reporting tool",
66
"author": "bitfinex.com",
@@ -43,7 +43,7 @@
4343
"app-builder-bin": "4.2.0",
4444
"cross-env": "7.0.3",
4545
"dotenv": "16.3.1",
46-
"electron": "27.2.0",
46+
"electron": "27.3.5",
4747
"electron-builder": "24.10.0",
4848
"mocha": "10.2.0",
4949
"standard": "17.1.0",

scripts/build-release.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ publishOption=""
226226
if [ $isPublished == 1 ]; then
227227
# Available: 'onTag', 'onTagOrDraft', 'always', 'never'
228228
publishOption="--publish always"
229+
else
230+
publishOption="--publish never"
229231
fi
230232

231233
rm -rf "$DIST_FOLDER/"*"$targetPlatform"*

src/error-manager/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ const manageNewGithubIssue = async (params) => {
169169
}
170170

171171
const initLogger = () => {
172+
log.transports.ipc.level = false
172173
log.transports.console.level = isDevEnv
173174
? 'debug'
174175
: 'warn'
@@ -215,7 +216,9 @@ const initLogger = () => {
215216
if (
216217
/Cannot download differentially/gi.test(error) ||
217218
/ERR_CONNECTION_REFUSED/gi.test(error) ||
218-
/objects\.githubusercontent\.com/gi.test(error)
219+
/objects\.githubusercontent\.com/gi.test(error) ||
220+
/Error: ERR_FAILED \(-2\) loading 'file:.*\.html'/gi.test(error) ||
221+
/Failed to generate PDF/gi.test(error)
219222
) {
220223
return message
221224
}

0 commit comments

Comments
 (0)