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

Attempt to fix flaky CI #1066

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Attempt to fix flaky CI #1066

wants to merge 1 commit into from

Conversation

yuhan6665
Copy link
Collaborator

I did some search but could not find a better solution for this bug in jimp library. As a temporary workaround, catch error and add a loop for retry

wrote raw       image to file:///home/runner/work/SummaryOfLoanSuspension/SummaryOfLoanSuspension/data/generated/visualization-dark.png
wrote raw       image to file:///home/runner/work/SummaryOfLoanSuspension/SummaryOfLoanSuspension/data/generated/visualization-light.png
/home/runner/work/SummaryOfLoanSuspension/SummaryOfLoanSuspension/development/backend/nodejs/node_modules/@jimp/core/src/utils/image-bitmap.js:156
    return cb(new Error('Could not find MIME for Buffer <' + path + '>'));
              ^
Error: Could not find MIME for Buffer <null>
    at Jimp.call (/home/runner/work/SummaryOfLoanSuspension/SummaryOfLoanSuspension/development/backend/nodejs/node_modules/@jimp/core/src/utils/image-bitmap.js:156:15)
    at Jimp.parseBitmap (/home/runner/work/SummaryOfLoanSuspension/SummaryOfLoanSuspension/development/backend/nodejs/node_modules/@jimp/core/src/index.js:400:17)
    at /home/runner/work/SummaryOfLoanSuspension/SummaryOfLoanSuspension/development/backend/nodejs/node_modules/@jimp/core/src/index.js:344:[14](https://github.com/WeNeedHome/SummaryOfLoanSuspension/runs/7606053268?check_suite_focus=true#step:6:15)
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  methodName: 'constructor'

@MarkShawn2020
Copy link
Collaborator

MarkShawn2020 commented Aug 8, 2022

No, there are no need to put unnecessary loop check here, and it's mainly bacuse that you missed bmf-font assets provided by me in the path data/config/bmf-fonts.

Please pull the latest repo, and give it a new try.

@yuhan6665
Copy link
Collaborator Author

Sorry forgot to provide context. This is actually for this issue when running in GitHub actions
https://github.com/WeNeedHome/SummaryOfLoanSuspension/runs/7606053268?check_suite_focus=true#step:6:23

I've seen many times it happen randomly on GitHub. But cannot reproduce this issue locally.
Adding a loop is just a workaround. But worth give it a try.

@MarkShawn2020
Copy link
Collaborator

Sorry forgot to provide context. This is actually for this issue when running in GitHub actions https://github.com/WeNeedHome/SummaryOfLoanSuspension/runs/7606053268?check_suite_focus=true#step:6:23

I've seen many times it happen randomly on GitHub. But cannot reproduce this issue locally. Adding a loop is just a workaround. But worth give it a try.

If it's really a bug concerned with the bmf parse in CI, then the best solution is to investigate on it, find why, rather than add some unnecessary checks in normal scenario.

Let this PR open, and wait a more reasonable solution by someone, me or else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants