Skip to content

fix(ci): set UTF-8 locale in e2e Docker image#9820

Merged
jdx merged 1 commit into
mainfrom
claude/sleepy-tereshkova-18436e
May 12, 2026
Merged

fix(ci): set UTF-8 locale in e2e Docker image#9820
jdx merged 1 commit into
mainfrom
claude/sleepy-tereshkova-18436e

Conversation

@jdx

@jdx jdx commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Set LANG=C.UTF-8 and LC_ALL=C.UTF-8 in packaging/e2e/Dockerfile so the e2e image has a UTF-8 locale instead of the default POSIX / ASCII.

Why

backend/test_gem_slow started failing on the release PR (#9780) when ruby 4.0.4 (today's release) was selected as latest. The test runs mise use ruby with MISE_RUBY_COMPILE=true, which forces ruby-build to compile from source.

make install aborts during the rdoc target with:

(ArgumentError) invalid byte sequence in US-ASCII
.../rdoc-7.0.3/lib/rdoc/parser/c.rb:575:in 'String#scan'
make: *** [uncommon.mk:619: rdoc] Error 1

RDoc's C parser reads UTF-8 bytes from sources like object.c, but the container has LC_CTYPE=POSIX (both LANG and LC_ALL were unset), so Ruby treats the input as ASCII and the scan blows up.

Reproduced inside ghcr.io/jdx/mise:e2e on an Ubuntu 24.04 host: fails with POSIX, succeeds with LC_ALL=C.UTF-8. The C.utf8 locale is already present in the image (locale -a confirms), so no extra install is required.

Reviewer notes

  • The ghcr.io/jdx/mise:e2e image is only rebuilt by .github/workflows/docker.yml, which fires on v* tag pushes or workflow_dispatch. After merging, the docker workflow needs to be dispatched (or wait for the next tagged release) before CI will pick up the new image.

Test plan

  • Merge, then dispatch docker.yml to rebuild and push ghcr.io/jdx/mise:e2e
  • Re-run the failing e2e-3 job on the release PR and confirm backend/test_gem_slow passes

🤖 Generated with Claude Code


Note

Low Risk
Low risk: only sets LANG/LC_ALL in the e2e Docker image, which should primarily affect locale-dependent behavior (e.g., string encoding) during tests.

Overview
Sets LANG=C.UTF-8 and LC_ALL=C.UTF-8 in packaging/e2e/Dockerfile so the e2e test container runs with a UTF-8 locale instead of the default ASCII/POSIX locale, improving reliability for builds/tests that process non-ASCII source text (e.g., Ruby/RDoc during compilation).

Reviewed by Cursor Bugbot for commit 2723b4d. Bugbot is set up for automated code reviews on this repo. Configure here.

The e2e image had LC_CTYPE=POSIX, which caused ruby-build to fail when
compiling ruby 4.0.4 from source: rdoc's C parser read UTF-8 bytes from
sources like object.c and raised "invalid byte sequence in US-ASCII",
aborting the `rdoc` make target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Sets LANG=C.UTF-8 and LC_ALL=C.UTF-8 in the e2e Docker image to fix a Ruby-build compilation failure where RDoc's C parser hit UTF-8 bytes under the default POSIX/ASCII locale.

  • The two ENV lines are placed early in the Dockerfile (before the RUN layer), so the locale is active for every subsequent build step and for any process that runs inside the container.
  • C.UTF-8 is already present in the Ubuntu base image, so no additional locale-gen or package installation is needed.

Confidence Score: 5/5

Safe to merge — the change is a two-line Dockerfile addition with a well-understood, targeted effect.

Both env vars are standard locale settings, C.UTF-8 is confirmed present in the image, and the change has no side-effects on unrelated tooling in the container.

No files require special attention.

Important Files Changed

Filename Overview
packaging/e2e/Dockerfile Adds LANG=C.UTF-8 and LC_ALL=C.UTF-8 ENV directives to fix the POSIX/ASCII locale that caused RDoc to blow up on UTF-8 source bytes during ruby-build compilation.

Reviews (1): Last reviewed commit: "fix(ci): set UTF-8 locale in e2e Docker ..." | Re-trigger Greptile

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the packaging/e2e/Dockerfile to include the LANG and LC_ALL environment variables set to C.UTF-8, ensuring consistent locale settings within the container environment. I have no feedback to provide as there were no review comments.

@github-actions

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.6 x -- echo 17.7 ± 0.5 16.8 20.8 1.00
mise x -- echo 17.9 ± 0.8 16.4 26.5 1.01 ± 0.06

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.6 env 17.5 ± 0.5 16.5 21.0 1.01 ± 0.04
mise env 17.4 ± 0.6 16.4 20.0 1.00

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.6 hook-env 18.4 ± 0.5 17.5 20.5 1.00
mise hook-env 18.5 ± 0.6 17.4 21.7 1.00 ± 0.04

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.6 ls 14.8 ± 0.5 14.0 17.9 1.01 ± 0.05
mise ls 14.7 ± 0.5 13.8 16.9 1.00

xtasks/test/perf

Command mise-2026.5.6 mise Variance
install (cached) 115ms 116ms +0%
ls (cached) 53ms 54ms -1%
bin-paths (cached) 58ms 58ms +0%
task-ls (cached) 429ms 427ms +0%

@jdx jdx merged commit 51a3c6e into main May 12, 2026
33 checks passed
@jdx jdx deleted the claude/sleepy-tereshkova-18436e branch May 12, 2026 21:35
jdx added a commit that referenced this pull request May 12, 2026
## Summary

- Add `LANG` and `LC_ALL` (defaulting to `C.UTF-8`) to the env
passthrough in [e2e/run_test:90-91](e2e/run_test:90).

## Why

Follow-up to [#9820](#9820), which set
`LANG=C.UTF-8` / `LC_ALL=C.UTF-8` in the e2e Docker image — but
`backend/test_gem_slow` kept failing because `within_isolated_env()`
uses `env -i` to clear the environment before each test, and the locale
wasn't on the pass-through list. The Dockerfile defaults were stripped
before the test process ever started.

Symptom: ruby 4.0.4 source build fails at the `rdoc` step with
`(ArgumentError) invalid byte sequence in US-ASCII` when rdoc's C parser
hits non-ASCII bytes in `object.c`.

Reproduced inside `ghcr.io/jdx/mise:e2e` on bamboo (Ubuntu 24.04 host):
- `env -i ... mise install ruby@4.0.4` → fails identically to CI
- `env -i ... LANG=C.UTF-8 LC_ALL=C.UTF-8 mise install ruby@4.0.4` →
succeeds

## Test plan

- [ ] Re-run failed `e2e-3` on release PR
[#9780](#9780) and confirm
`backend/test_gem_slow` passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only adjusts environment variables for e2e test execution,
with no production code or data-path changes.
> 
> **Overview**
> E2E test runner now preserves locale settings when running tests in a
fully cleared environment (`env -i`) by explicitly passing through
`LANG` (defaulting to `C.UTF-8`) and `LC_ALL`.
> 
> This prevents locale-dependent failures (e.g., tooling assuming
US-ASCII) during source builds inside CI and the e2e Docker image.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b7d7f06. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mise-en-dev added a commit that referenced this pull request May 13, 2026
### 🐛 Bug Fixes

- **(backend)** use runtime paths for backend bin dirs by @risu729 in
[#9606](#9606)
- **(ci)** preserve vendor/aqua-registry/ in PPA publish workflow by
@jdx in [#9782](#9782)
- **(ci)** set UTF-8 locale in e2e Docker image by @jdx in
[#9820](#9820)
- **(ci)** pass UTF-8 locale through to e2e tests by @jdx in
[#9823](#9823)
- **(conda)** dedup repodata by archive identifier instead of URL by
@jdx in [#9831](#9831)
- **(github)** use default shell for credential command by @risu729 in
[#9664](#9664)
- **(settings)** distinguish unset known settings from unknown ones by
@jdx in [#9818](#9818)
- **(upgrade)** remove completed progress jobs to prevent duplicate
output by @jdx in [#9779](#9779)
- **(vfox)** resolve GitHub token lazily inside Lua plugins by @jdx in
[#9816](#9816)

### 🚜 Refactor

- **(config)** separate core and backend tool options by @risu729 in
[#9753](#9753)
- **(schema)** reuse env directive property schemas by @risu729 in
[#9651](#9651)

### 📚 Documentation

- **(aliases)** fix Aliased Versions example and drop stale asdf callout
by @jdx in [#9830](#9830)

### ⚡ Performance

- **(aqua)** use phf for baked registry lookups by @risu729 in
[#9763](#9763)
- **(task)** cache per-file content hashes for
source_freshness_hash_contents by @jdx in
[#9819](#9819)

### 🧪 Testing

- **(e2e)** pin aube to known-good version in npm package_manager test
by @jdx in [#9794](#9794)

### 📦 Registry

- replace unsupported exe options by @risu729 in
[#9587](#9587)
- update pi by @garysassano in
[#9792](#9792)

### Chore

- **(ci)** use non-large runners for release builds by @jdx in
[#9786](#9786)
- **(ci)** compare registry PRs from fork point by @risu729 in
[#9643](#9643)
- **(ci)** make build-copr.sh the single source of truth for COPR
chroots by @jdx in [#9788](#9788)
- **(ci)** use crates.io trusted publishing in release-plz by @jdx in
[#9793](#9793)
- **(ci)** remove autofix.ci workflow by @jdx in
[#9801](#9801)
- **(ci)** restore -large runner for Linux release builds by @jdx in
[#9815](#9815)
- **(ci)** add zizmor workflow for github actions security analysis by
@jdx in [#9804](#9804)
- **(ci)** assert mise run render produces no diff by @jdx in
[#9803](#9803)
- **(copr)** publish EL9 builds via centos-stream+epel-next-9 chroot by
@jdx in [#9787](#9787)

### Ci

- remove pull_request_target workflow by @jdx in
[#9799](#9799)
- remove caching from publishing workflows by @jdx in
[#9800](#9800)

### Security

- reject shell metacharacters in version strings and CI inputs by @jdx
in [#9814](#9814)

## 📦 Aqua Registry Updates

### New Packages (11)

- [`Code-Hex/Neo-cowsay`](https://github.com/Code-Hex/Neo-cowsay)
-
[`SonarSource/sonarqube-cli`](https://github.com/SonarSource/sonarqube-cli)
- [`earendil-works/pi`](https://github.com/earendil-works/pi)
- [`hylo-lang/hylo-new`](https://github.com/hylo-lang/hylo-new)
- [`jfernandez/bpftop`](https://github.com/jfernandez/bpftop)
- [`modem-dev/hunk`](https://github.com/modem-dev/hunk)
- [`npm/cli`](https://github.com/npm/cli)
- [`racket/racket/minimal`](https://github.com/racket/racket)
- [`slackapi/slack-cli`](https://github.com/slackapi/slack-cli)
- [`vectordotdev/vector`](https://github.com/vectordotdev/vector)
- [`wasilibs/go-yamllint`](https://github.com/wasilibs/go-yamllint)

### Updated Packages (10)

- [`DataDog/pup`](https://github.com/DataDog/pup)
- [`aquasecurity/trivy`](https://github.com/aquasecurity/trivy)
- [`astral-sh/uv`](https://github.com/astral-sh/uv)
- [`caarlos0/svu`](https://github.com/caarlos0/svu)
-
[`cargo-bins/cargo-binstall`](https://github.com/cargo-bins/cargo-binstall)
- [`foundry-rs/foundry`](https://github.com/foundry-rs/foundry)
- [`gastownhall/beads`](https://github.com/gastownhall/beads)
-
[`gruntwork-io/terragrunt`](https://github.com/gruntwork-io/terragrunt)
- [`pnpm/pnpm`](https://github.com/pnpm/pnpm)
- [`santosr2/TerraTidy`](https://github.com/santosr2/TerraTidy)
3PeatVR pushed a commit to 3PeatVR/mise that referenced this pull request May 14, 2026
### 🐛 Bug Fixes

- **(backend)** use runtime paths for backend bin dirs by @risu729 in
[jdx#9606](jdx#9606)
- **(ci)** preserve vendor/aqua-registry/ in PPA publish workflow by
@jdx in [jdx#9782](jdx#9782)
- **(ci)** set UTF-8 locale in e2e Docker image by @jdx in
[jdx#9820](jdx#9820)
- **(ci)** pass UTF-8 locale through to e2e tests by @jdx in
[jdx#9823](jdx#9823)
- **(conda)** dedup repodata by archive identifier instead of URL by
@jdx in [jdx#9831](jdx#9831)
- **(github)** use default shell for credential command by @risu729 in
[jdx#9664](jdx#9664)
- **(settings)** distinguish unset known settings from unknown ones by
@jdx in [jdx#9818](jdx#9818)
- **(upgrade)** remove completed progress jobs to prevent duplicate
output by @jdx in [jdx#9779](jdx#9779)
- **(vfox)** resolve GitHub token lazily inside Lua plugins by @jdx in
[jdx#9816](jdx#9816)

### 🚜 Refactor

- **(config)** separate core and backend tool options by @risu729 in
[jdx#9753](jdx#9753)
- **(schema)** reuse env directive property schemas by @risu729 in
[jdx#9651](jdx#9651)

### 📚 Documentation

- **(aliases)** fix Aliased Versions example and drop stale asdf callout
by @jdx in [jdx#9830](jdx#9830)

### ⚡ Performance

- **(aqua)** use phf for baked registry lookups by @risu729 in
[jdx#9763](jdx#9763)
- **(task)** cache per-file content hashes for
source_freshness_hash_contents by @jdx in
[jdx#9819](jdx#9819)

### 🧪 Testing

- **(e2e)** pin aube to known-good version in npm package_manager test
by @jdx in [jdx#9794](jdx#9794)

### 📦 Registry

- replace unsupported exe options by @risu729 in
[jdx#9587](jdx#9587)
- update pi by @garysassano in
[jdx#9792](jdx#9792)

### Chore

- **(ci)** use non-large runners for release builds by @jdx in
[jdx#9786](jdx#9786)
- **(ci)** compare registry PRs from fork point by @risu729 in
[jdx#9643](jdx#9643)
- **(ci)** make build-copr.sh the single source of truth for COPR
chroots by @jdx in [jdx#9788](jdx#9788)
- **(ci)** use crates.io trusted publishing in release-plz by @jdx in
[jdx#9793](jdx#9793)
- **(ci)** remove autofix.ci workflow by @jdx in
[jdx#9801](jdx#9801)
- **(ci)** restore -large runner for Linux release builds by @jdx in
[jdx#9815](jdx#9815)
- **(ci)** add zizmor workflow for github actions security analysis by
@jdx in [jdx#9804](jdx#9804)
- **(ci)** assert mise run render produces no diff by @jdx in
[jdx#9803](jdx#9803)
- **(copr)** publish EL9 builds via centos-stream+epel-next-9 chroot by
@jdx in [jdx#9787](jdx#9787)

### Ci

- remove pull_request_target workflow by @jdx in
[jdx#9799](jdx#9799)
- remove caching from publishing workflows by @jdx in
[jdx#9800](jdx#9800)

### Security

- reject shell metacharacters in version strings and CI inputs by @jdx
in [jdx#9814](jdx#9814)

## 📦 Aqua Registry Updates

### New Packages (11)

- [`Code-Hex/Neo-cowsay`](https://github.com/Code-Hex/Neo-cowsay)
-
[`SonarSource/sonarqube-cli`](https://github.com/SonarSource/sonarqube-cli)
- [`earendil-works/pi`](https://github.com/earendil-works/pi)
- [`hylo-lang/hylo-new`](https://github.com/hylo-lang/hylo-new)
- [`jfernandez/bpftop`](https://github.com/jfernandez/bpftop)
- [`modem-dev/hunk`](https://github.com/modem-dev/hunk)
- [`npm/cli`](https://github.com/npm/cli)
- [`racket/racket/minimal`](https://github.com/racket/racket)
- [`slackapi/slack-cli`](https://github.com/slackapi/slack-cli)
- [`vectordotdev/vector`](https://github.com/vectordotdev/vector)
- [`wasilibs/go-yamllint`](https://github.com/wasilibs/go-yamllint)

### Updated Packages (10)

- [`DataDog/pup`](https://github.com/DataDog/pup)
- [`aquasecurity/trivy`](https://github.com/aquasecurity/trivy)
- [`astral-sh/uv`](https://github.com/astral-sh/uv)
- [`caarlos0/svu`](https://github.com/caarlos0/svu)
-
[`cargo-bins/cargo-binstall`](https://github.com/cargo-bins/cargo-binstall)
- [`foundry-rs/foundry`](https://github.com/foundry-rs/foundry)
- [`gastownhall/beads`](https://github.com/gastownhall/beads)
-
[`gruntwork-io/terragrunt`](https://github.com/gruntwork-io/terragrunt)
- [`pnpm/pnpm`](https://github.com/pnpm/pnpm)
- [`santosr2/TerraTidy`](https://github.com/santosr2/TerraTidy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant