Skip to content

Conversation

@AlekseyManetov
Copy link
Contributor

@AlekseyManetov AlekseyManetov commented Jan 21, 2026

Proposed Changes

test: increase the timeout for the image generation test which failed on CI with the previous(10000ms) timeout

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

Copilot AI review requested due to automatic review settings January 21, 2026 13:32
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jan 21, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses a flaky test that consistently times out on macOS CI systems by conditionally skipping it only on macOS platforms.

Changes:

  • Added isMac() helper function to detect macOS using user agent
  • Modified test to skip on macOS while continuing to run on other platforms

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
client/test/helper/index.js Added isMac() utility function to detect macOS platform via user agent
client/src/app/util/tests/generateImageSpec.js Modified "should automatically handle large images" test to conditionally skip on macOS using the new helper

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlekseyManetov AlekseyManetov requested a review from barmac January 21, 2026 13:52


it('should automatically handle large images <' + type + '>', async function() {
(isMac() ? it.skip : it)('should automatically handle large images <' + type + '>', async function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it fail consistently? I'd rather not blindly disable this - we'll otherwise risk not being able to generate large images on MacOS 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed it yesterday at [deps: update to [email protected] #5572] (https://github.com/camunda/camunda-modeler/pull/5572) PR and also found the same issue at another new PRs, e.g. - #5553. Tried to re-run the job a second time and still got the same error. It seems like something happened with GitHub Actions on macOS, perhaps they've become slower.

As an alternative, we can increase the timeout for this test specifically for macOS. However, it was already increased to 10,000 ms, and further increases could result in longer test runs. Or, I can dive into the test implementation to see if we can optimize it and make it faster, though I'm not sure if that's possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good if you could have a quick look, i.e. does it fail in the browser for you?

npm run client:auto-test

Open http://localhost:9876/debug.html.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it fails only at CI

Copy link
Contributor Author

@AlekseyManetov AlekseyManetov Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new commit at #5572 the error goes out. So it seams to be a flaky.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good if you could have a quick look

The test itself looks pretty straightforward. I think the problem is the size of the canvas we are rendering, as a canvas of that size is too slow to process. We use an SVG with an initial size of 3833 x 8573 pixels and then scale it by 3x, 2x, and 1x. So, in the worst case, we have an image size of 11,499 x 25,719 pixels.

Does an image that large make sense and is it testing a real-world use case? Perhaps we can change the initial size to something smaller, like 1500 x 2000?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to ensure it works with our users diagrams, i.e. this.

Copy link
Contributor Author

@AlekseyManetov AlekseyManetov Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to ensure it works with our users diagrams, i.e. this.

In this case, we also have a pretty large initial SVG (5132 x 1832 pixels).

If we want to keep the tests for such large images, the only way I see to fix the flaky behavior is to increase the timeout once more, e.g., to 15s. We can do it only for macOS env.

I don't see a problem with the test itself, but it performs heavy operations that seem to take a lot of time on the macOS CI runners. I'm not sure if we can optimize it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a known issue that the github macos runners have a lot of performance issues (especially storage, not sure if we are writing the image). In another project we setup our own mac mini as a runner as the github one where just too slow. (eg a bit old actions/runner-images#1336)

maybe we can setup the timeout really high and measure the time it actually takes on the runner to see how it fluctuates

Copy link
Contributor Author

@AlekseyManetov AlekseyManetov Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test passed with a 15000ms timeout. Probably we can go with this solution and merge it to make our PR checks green? @nikku @Buckwich

@AlekseyManetov AlekseyManetov force-pushed the skip-macos-test-failed-ci branch 2 times, most recently from f153aac to b31b6bd Compare February 10, 2026 19:44
@AlekseyManetov AlekseyManetov changed the title test: disabled test which is exceeded timeout(10000ms) on CI test: increase the timeout for the image generation test which failed on CI Feb 11, 2026
@AlekseyManetov AlekseyManetov force-pushed the skip-macos-test-failed-ci branch from b31b6bd to 9c10e9e Compare February 11, 2026 13:14
@barmac barmac force-pushed the skip-macos-test-failed-ci branch from 9c10e9e to 97701c5 Compare February 11, 2026 13:40
@barmac
Copy link
Collaborator

barmac commented Feb 11, 2026

Let's check if the test pass wasn't just a fluke.

@AlekseyManetov
Copy link
Contributor Author

Let's check if the test pass wasn't just a fluke.

After a few more runs it still fails even with 15000ms timeout - https://github.com/camunda/camunda-modeler/actions/runs/21907392885/job/63258593497?pr=5573

@barmac
Copy link
Collaborator

barmac commented Feb 12, 2026

So a simple timeout increase is not a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Review pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants