Skip to content

Bump kaleido to >=1.0 and provision Chrome for doc builds - #8308

Merged
blink1073 merged 7 commits into
scikit-image:mainfrom
blink1073:fix-kaleido-plotly-docs
Sep 2, 2026
Merged

blink1073 merged 7 commits into
scikit-image:mainfrom
blink1073:fix-kaleido-plotly-docs

Conversation

@blink1073

@blink1073 blink1073 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #8307. Closes #7623.

plotly 7.0.0 dropped support for kaleido 0.2.1, breaking every gallery example that calls plotly.io.show(fig). kaleido's 1.x rewrite needs both a plotly>=6.1.1 floor and a headless Chrome install, which each CI docs job now provides.

Changes

  • Bumped kaleido from ==0.2.1 to >=1.0, so gallery examples render through headless Chrome instead of the deprecated bundled binary.
  • Bumped plotly from >=5.20 to >=6.1.1, kaleido's own hardcoded floor for compatibility with 1.x.
  • The GitHub Actions docs job installs Chrome through apt: it runs on arm64, where neither plotly_get_chrome nor browser-actions/setup-chrome can provision Chrome (Chrome for Testing has no Stable-channel linux-arm64 build yet).
  • CircleCI's docs job installs Chrome through apt too, since plotly_get_chrome's console script isn't reliably on PATH there.

Testing

Docs CI tests.

Release note (optional)

...

@blink1073
blink1073 force-pushed the fix-kaleido-plotly-docs branch from 7f51c24 to 90d73f5 Compare August 31, 2026 12:12
@lagru

lagru commented Aug 31, 2026

Copy link
Copy Markdown
Member

CircleCI isn't connected on my fork, so its doc job will run for the first time once this opens against upstream.

Are you implying that CircleCI isn't running against the config & source of this PR's branch blink1073:fix-kaleido-plotly-docs? Surely it must do that to some extent? If so which one? Otherwise there would be no use running it for PRs.

Also cc'ing @stefanv since I remember him dealing with this in the past and I think he formed some opinions on this.

@lagru lagru added the 🤖 type: Infrastructure CI, packaging, tools and automation label Aug 31, 2026
@lagru
lagru requested a review from stefanv August 31, 2026 13:12
@blink1073

Copy link
Copy Markdown
Contributor Author

Are you implying that CircleCI isn't running against the config & source of this PR's branch blink1073:fix-kaleido-plotly-docs?

No, I meant I didn't test it directly on my fork until the PR was made. I planned to remove that comment once I saw it passing here.

@stefanv

stefanv commented Aug 31, 2026

Copy link
Copy Markdown
Member

We have a very long trial PR ongoing also in #7623

Comment thread .circleci/config.yml Outdated
- run:
name: Install Chrome for kaleido
command: |
plotly_get_chrome -y

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

plotly_get_chrome not found on CircleCI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I switched this job to install Chrome through apt instead, to match the GHA workflow

@stefanv

stefanv commented Sep 1, 2026

Copy link
Copy Markdown
Member

I should note that one of my objections to not moving over newer Kaleido sooner, was that they supported a very selective range of Chrome. E.g., installing Chromium the way we do in #7623 didn't work. I don't like having to ask plotly to hand-pick a version of Chrome to install, and to fetch that binary. It should just work on a system installed version.

kaleido 0.2.1 predates the 1.0 rewrite; plotly 7.0.0 (2026-08-25)
dropped support for it, so every gallery example calling
plotly.io.show(fig) fails the docs build with a misleading
"kaleido and psutil are required" error.

kaleido>=1.0 renders through headless Chrome instead of the bundled
orca binary. CircleCI's docs job runs `plotly_get_chrome -y` before
building; the GitHub Actions job installs Chrome through apt instead.
Neither kaleido's own downloader nor browser-actions/setup-chrome can
provision Chrome there: both fetch from Chrome for Testing, which
doesn't yet publish a Stable-channel linux-arm64 build, and that job
runs on an arm64 runner. Google's separate apt repository does ship
arm64 Chrome, at the same version Chrome for Testing is missing for
that architecture.

Fixes scikit-image#8307.

Assisted-by: Claude (Opus 5)
@blink1073
blink1073 force-pushed the fix-kaleido-plotly-docs branch from 90d73f5 to ec72b0c Compare September 1, 2026 09:40
@blink1073

Copy link
Copy Markdown
Contributor Author

I should note that one of my objections to not moving over newer Kaleido sooner, was that they supported a very selective range of Chrome. E.g., installing Chromium the way we do in #7623 didn't work. I don't like having to ask plotly to hand-pick a version of Chrome to install, and to fetch that binary. It should just work on a system installed version.

I think the difference here is the official google-chrome-stable vs chromium-browser.

@blink1073
blink1073 force-pushed the fix-kaleido-plotly-docs branch 2 times, most recently from 429983d to 552cb58 Compare September 1, 2026 10:00
plotly_get_chrome's console script isn't reliably on PATH in this
job's shell: plotly and kaleido install cleanly, but the next step
fails with "plotly_get_chrome: command not found" (exit 127).

Match the GitHub Actions job instead, installing a real Chrome
through apt. This also addresses a standing preference for a
system-installed Chrome over plotly/kaleido's own fetch mechanism;
the earlier attempt at that in scikit-image#7623 used Ubuntu's `chromium-browser`,
which is a non-functional snap-transitional package, not a real
browser.

Assisted-by: Claude (Opus 5)
@blink1073
blink1073 force-pushed the fix-kaleido-plotly-docs branch from 552cb58 to 84b946d Compare September 1, 2026 10:44
@blink1073
blink1073 requested a review from stefanv September 1, 2026 11:10
@blink1073
blink1073 marked this pull request as ready for review September 1, 2026 11:12
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Install Chrome for kaleido on CircleCI t..." | Re-trigger Greptile

Comment thread pyproject.toml Resolved
kaleido's own compatibility gate (kaleido/_utils/warn_incompatible_plotly)
hardcodes 6.1.1 as its minimum supported plotly version. Our floor of
plotly>=5.20 allows resolving anything from 5.20 up to 6.1.0 alongside
kaleido>=1.0, an unsupported pair.

Reproduced: pip installs plotly==6.0.1 with kaleido>=1.0 without
conflict, but pio.show(fig) then falls back to the old orca renderer
and fails with "orca and psutil are required", an unrelated and
misleading error for what is actually a plotly/kaleido version
mismatch.

Assisted-by: Claude (Opus 5)
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "Merge origin/fix-kaleido-plotly-docs" | Re-trigger Greptile

@stefanv stefanv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's see if we can clean up the installation logic a bit, but otherwise good to go, feel free to merge when you're satisfied.

Adding Google's apt repo conflicted with one this machine image
already configures for the same URL, under a different Signed-By
("Conflicting values set for option Signed-By"), so the previous fix
worked around it by checking whether the repo was already present.

Installing the .deb Google publishes for direct download instead
sidesteps the conflict outright: it never touches
/etc/apt/sources.list.d/, so there's no repo definition to collide
with.

Assisted-by: Claude (Opus 5)
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Reviews (3): Last reviewed commit: "Install Chrome from Google's direct .deb..." | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Reviews (4): Last reviewed commit: "Retain apt signature verification for Ch..." | Re-trigger Greptile

@blink1073
blink1073 force-pushed the fix-kaleido-plotly-docs branch from 717ca8b to c56c142 Compare September 2, 2026 09:35
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Reviews (5): Last reviewed commit: "Retain apt signature verification for Ch..." | Re-trigger Greptile

The direct-.deb-download workaround for the Signed-By conflict also
gave up apt's GPG signature verification of the package: `apt-get
install ./file.deb` trusts the download over plain HTTPS, with no
check against Google's published signing key.

Remove whatever pre-existing google-chrome source definition this
machine image ships, in whichever file it lives, before adding our
own signed one, targeting the actual conflict instead of dropping
verification. Reverts the previous commit.

Assisted-by: Claude (Opus 5)
@blink1073
blink1073 force-pushed the fix-kaleido-plotly-docs branch from c56c142 to 82bddc0 Compare September 2, 2026 09:41
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Reviews (6): Last reviewed commit: "Retain apt signature verification for Ch..." | Re-trigger Greptile

@blink1073
blink1073 merged commit a69547b into scikit-image:main Sep 2, 2026
32 checks passed
@stefanv stefanv added this to the 0.27 milestone Sep 2, 2026
matthew-brett pushed a commit that referenced this pull request Sep 4, 2026
Backport of a69547b onto pre-megamove-integration.

Fixes #8307. Closes #7623.

plotly 7.0.0 dropped support for kaleido 0.2.1, breaking every gallery
example that calls `plotly.io.show(fig)`. kaleido's 1.x rewrite needs
both a plotly>=6.1.1 floor and a headless Chrome install, which each CI
docs job now provides.

- Bumped `kaleido` from `==0.2.1` to `>=1.0`, so gallery examples render
through headless Chrome instead of the deprecated bundled binary.
- Bumped `plotly` from `>=5.20` to `>=6.1.1`, kaleido's own hardcoded
floor for compatibility with 1.x.
- The GitHub Actions docs job installs Chrome through apt: it runs on
arm64, where neither `plotly_get_chrome` nor
`browser-actions/setup-chrome` can provision Chrome (Chrome for Testing
has no Stable-channel linux-arm64 build yet).
- CircleCI's docs job installs Chrome through apt too, since
`plotly_get_chrome`'s console script isn't reliably on PATH there.

Docs CI tests.

<!-- See
https://scikit-image.org/docs/stable/development/contribute.html#documenting-changes
-->

```release-note
...
```

Assisted-by: Cursor <[email protected]>
mkcor pushed a commit to mkcor/scikit-image that referenced this pull request Nov 13, 2026
…ge#8308)

Backport of a69547b onto pre-megamove-integration.

Fixes scikit-image#8307. Closes scikit-image#7623.

plotly 7.0.0 dropped support for kaleido 0.2.1, breaking every gallery
example that calls `plotly.io.show(fig)`. kaleido's 1.x rewrite needs
both a plotly>=6.1.1 floor and a headless Chrome install, which each CI
docs job now provides.

- Bumped `kaleido` from `==0.2.1` to `>=1.0`, so gallery examples render
through headless Chrome instead of the deprecated bundled binary.
- Bumped `plotly` from `>=5.20` to `>=6.1.1`, kaleido's own hardcoded
floor for compatibility with 1.x.
- The GitHub Actions docs job installs Chrome through apt: it runs on
arm64, where neither `plotly_get_chrome` nor
`browser-actions/setup-chrome` can provision Chrome (Chrome for Testing
has no Stable-channel linux-arm64 build yet).
- CircleCI's docs job installs Chrome through apt too, since
`plotly_get_chrome`'s console script isn't reliably on PATH there.

Docs CI tests.

<!-- See
https://scikit-image.org/docs/stable/development/contribute.html#documenting-changes
-->

```release-note
...
```

Assisted-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 type: Infrastructure CI, packaging, tools and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs build fails: kaleido 0.2.1 rejects plotly 7.0.0's image export

3 participants