Skip to content

[mise-lock] chore: migrate CI to mise-action - #35

Open
krukonshedul wants to merge 5 commits into
masterfrom
chore/add-mise-lock
Open

[mise-lock] chore: migrate CI to mise-action#35
krukonshedul wants to merge 5 commits into
masterfrom
chore/add-mise-lock

Conversation

@krukonshedul

@krukonshedul krukonshedul commented Aug 21, 2026

Copy link
Copy Markdown

Brings this repo in line with the fleet mise-action CI standard.

Changes

  • Added mise.toml with elixir = "1.11.4" and erlang = "23.3.4.7" (the highest versions found across workflows, matching dev-publish.yaml's ELIXIR_VERSION/OTP_VERSION), and generated mise.lock in the versioned lockfile_version = 1 format mise 2026.8.11+ requires.
  • Replaced all step-security/setup-beam steps in ci.yml (static, test, publish jobs) and dev-publish.yaml with step-security/mise-action, pinned to v4.2.4 (mise CLI 2026.8.12), adding an explicit mix local.hex --force && mix local.rebar --force step afterward (setup-beam did this implicitly, mise-action does not).
  • static/test jobs run a single job on the mise.toml-pinned toolchain (elixir 1.11.4 / erlang 23.3.4.7) rather than a version matrix: the matrix's MISE_ELIXIR_VERSION/MISE_ERLANG_VERSION overrides don't exist in mise.lock (which only locks mise.toml's pinned version), so it's collapsed to the single mise-pinned toolchain, matching the fix already applied to sibling repos in this migration (e.g. telemetry_metrics_appsignal). The stale top-level MISE_ELIXIR_VERSION/MISE_ERLANG_VERSION env overrides are also dropped, so the publish job's mise-action step resolves the same pinned toolchain.
  • cron_ci.yml and the interop-tests/check_release jobs in ci.yml are left untouched — they run in a preset elixir:* container image and never invoked a toolchain-setup action, so there's nothing to migrate there.
  • No .tool-versions file existed in this repo, so nothing to remove there.
  • Added .github/actions.lock.yaml to .gitignore on its own line, and regenerated that lockfile via alflow.

No new judgment calls beyond the mise.toml versions above, which come straight from the pre-existing dev-publish.yaml env vars (the highest version pins already declared in this repo).

Add mise.toml/mise.lock and replace step-security/setup-beam steps in
ci.yml and dev-publish.yaml with step-security/mise-action, using
MISE_ELIXIR_VERSION/MISE_ERLANG_VERSION env overrides to preserve the
existing Elixir/OTP version matrix. Ignore .github/actions.lock.yaml
and regenerate it via alflow.
@socket-security

socket-security Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedstep-security/​mise-action@​6e96d2ffbc65c037f23c78818f2a339d6cf830f799100100100100

View full report

krukonshedul and others added 2 commits August 26, 2026 10:59
…lchain

The static/test jobs' 2-way OTP matrix (21.3.8.24 / 22.3.4.7 on Elixir
1.10.4) relied on MISE_ELIXIR_VERSION/MISE_ERLANG_VERSION overrides that
don't exist in mise.lock (which only locks mise.toml's pinned version).
Collapsed both jobs to a single run on the mise.toml-pinned toolchain,
matching the fix already applied to sibling repos in this migration
(e.g. telemetry_metrics_appsignal@e38e32f). Also dropped the top-level
MISE_ELIXIR_VERSION/MISE_ERLANG_VERSION env overrides (stale 1.10.4/
22.3.4.7 values), which would otherwise have broken the publish job's
mise-action step the same way once it ran.

Claude Code fix.
…26.8.12

Pins step-security/mise-action to v4.2.4 (mise CLI 2026.8.12) and
regenerates mise.lock to the versioned lockfile format mise 2026.8.11+
requires.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@krukonshedul krukonshedul changed the title chore: migrate CI to mise-action [mise-lock] chore: migrate CI to mise-action Aug 26, 2026

@dyl-sv dyl-sv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CI is red at the current head (dd74344), run 32952650783: both Static Checks and Unit Tests fail at the "Setup mise" step (mise install --locked) — not further along in the build, so the toolchain never installs.

Root cause: mise.lock has a malformed/duplicated erlang entry — three separate [[tools.erlang]] blocks for the same 23.3.4.7 version (one with no specifiers + precompiled_os = "ubuntu-22.04", one with specifiers + no precompiled_os at all, one with specifiers + precompiled_os = "ubuntu-24.04"). Every platform entry across all three blocks (including linux-x64, the actual runner arch) is install = "source" pointing at otp_src_23.3.4.7.tar.gz — there's no working precompiled path at all. As a result mise install --locked falls back to building OTP from source via kerl, which then fails during the build:

gmake[4]: *** [x86_64-unknown-linux-gnu/Makefile:186: ../priv/obj/x86_64-unknown-linux-gnu/pkey.o] Error 1
...
mise ERROR Failed to install tools: core:elixir@1.11.4, core:erlang@23.3.4.7
core:erlang@23.3.4.7: command ["...kerl-4.4.0", "build-install", ...] exited with code 1
```//
(job https://github.com/freshaengineering/grpc/actions/runs/32952650783/job/98127341295, "Setup mise" step)

This matches the known "malformed/stale mise.lock — duplicate tool blocks for same tool" and "erlang precompiled_os mismatch" failure patterns from this rollout. The 3rd commit (dd74344, "refresh mise.lock to lockfile_version=1") regenerated the lockfile but it still doesn't produce a usable precompiled erlang entry for this runner, so `Install Hex + Rebar` / dependency install / compile / format / tests never even run — everything after "Setup mise" is skipped.

The `interop-tests` and `check_release` jobs, which run in the `elixir:1.10-slim` container and don't touch mise at all, are unaffected by this PR's diff (confirmed via `.github/actions.lock.yaml` occurrence-index-only changes) — their failures are pre-existing/unrelated to this migration and not something I'm blocking on.

Please regenerate `mise.lock` (or hand-fix the erlang block) so it resolves to a single, working erlang@23.3.4.7 entry with an actual precompiled binary for the `linux-x64`/ubuntu24 runner this CI uses — or bump to an OTP patch version that has a real precompiled build — and confirm a green run on this PR's head SHA before merging.

OTP 23.3.4.7 has no precompiled binary on hex.pm for any Ubuntu image
(nor on erlef/otp_builds), so `mise install --locked` always fell back
to a from-source kerl build. That build fails to compile OTP 23's
crypto app against the ubuntu-24.04 runner's OpenSSL 3.x toolchain
(gmake error building pkey.o) -- so Static Checks/Unit Tests never got
past the "Setup mise" step.

Bumped to elixir 1.12.3-otp-24 / erlang 24.3.4.17 (mix.exs only
requires elixir "~> 1.5"; the README's floor is "Erlang/OTP needs >=
20.3.2"), which does compile cleanly against OpenSSL 3.x. Verified
end-to-end in a fresh ubuntu:24.04 container matching the CI runner:
mise install --locked, mix deps.get, and mix compile
--warnings-as-errors all succeed.

Also updated dev-publish.yaml's informational ELIXIR_VERSION/
OTP_VERSION/MISE_ELIXIR_VERSION/MISE_ERLANG_VERSION env vars to match.

Addresses review feedback from dyl-sv on PR #35.

@dyl-sv dyl-sv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Re-verified from scratch against the latest commit (6615a73, pushed 2026-08-26 14:13 UTC).

mise.lock is still malformed the same way as before. It now has two duplicate [[tools.erlang]] blocks for the same version (24.3.4.17) — one plain block and one gated by [tools.erlang.options] precompiled_os = "ubuntu-24.04". Every Linux platform entry in both blocks (linux-x64, linux-arm64, linux-x64-musl, linux-arm64-musl) is still install = "source". There is no genuine precompiled entry for the linux-x64 platform the ubuntu-24.04 GitHub runner actually uses — the underlying lockfile problem flagged in the previous review has not been fixed, it's just no longer fatal.

Why it's no longer fatal (but still not fixed): the author bumped erlang 23.3.4.7 → 24.3.4.17 / elixir → 1.12.3-otp-24. Confirmed in the Unit Tests and Static Checks job logs that mise install --locked downloads otp_src_24.3.4.17.tar.gz and builds via kerl from source ([erts-12.3.2.17] [source]), same as before — it just happens to succeed now because OTP 24's crypto app compiles against OpenSSL 3.x (only odbc/link warnings, no pkey.o fatal error). So mise install is no longer crashing, but it's still doing a ~2.5 min from-source kerl build on every CI run, not using a precompiled binary, because the lockfile still doesn't declare one for this platform.

Checks are red, not green:

  • Static Checks: fail — after mise install succeeds, the "Hex auth" step (mix hex.organization auth fresha --key) fails with ** (Mix) Could not invoke task "hex.organization": 1 error found! --key : Missing argument of type string (exit code 1).
  • Unit Tests: fail — identical failure at the same "Hex auth" step.
  • Interop tests: fail — different issue ("git not installed" in the interop test step).

So even setting aside the still-malformed erlang lockfile entries, the PR's own checks (gh pr checks 35) are not passing: Static Checks and Unit Tests both fail downstream at Hex auth, and Interop tests fail separately. Requesting changes — please fix the Hex auth key (looks like a missing/empty secret) and clean up mise.lock so the runner's actual platform has a real precompiled entry instead of two duplicate source-only erlang blocks.

builds.hex.pm only precompiles OTP for ubuntu-24.04 starting at OTP 25
— every OTP 24.x (and 23.x) release falls back to a from-source kerl
build there, which is slow and fragile. Also fixes mise.lock having
picked up duplicate [[tools.erlang]] blocks for the same version from
prior in-place edits; a clean `mise lock` regeneration produces a
single block per tool with a genuine precompiled entry for the
linux-x64 CI runner (musl variants still build from source, but the
GitHub-hosted runner is glibc).

Verified locally: `mise install --locked` resolves precompiled
binaries for both tools on linux-x64, and `mix test` passes 75/76
(the one failure is an expired TLS test fixture certificate, unrelated
to the toolchain).
@krukonshedul

Copy link
Copy Markdown
Author

Status update

The malformed erlang lockfile issue from the last review is resolved. Bumped to elixir 1.13.4-otp-25 / erlang 25.3.2.21 (see the comment in mise.toml explaining why — OTP 23/24 have no precompiled build for ubuntu-24.04 on builds.hex.pm, only OTP 25+ does). mise.lock's linux-x64 entry (the actual CI runner platform) now resolves to a real precompiled builds.hex.pm checksum+URL under the precompiled_os = "ubuntu-24.04" variant block, not a from-source fallback. mise install --locked completes cleanly on this head (run 33086945933) — confirmed via the "Setup mise" step log, no install failures.

Current CI status on this head:

  • Static Checks / Unit Tests: fail, but only at the pre-existing Hex auth step (mix hex.organization auth fresha --key ... → "Could not invoke task... 1 error found"), which looks like a missing/misconfigured secret unrelated to this mise migration. I don't have access to inspect or fix org/repo secrets — this needs someone with secret-management access.
  • Interop tests: fails for the same reasons already flagged as pre-existing/out-of-scope in an earlier review round ("git not installed" in the interop container, plus unrelated gun/cowboy HTTP2 runtime errors) — not something introduced by this PR's diff.
  • Check release, Socket Security, StepSecurity: passing.

So the mise.lock/toolchain-install problem this PR set out to fix is done; what's left failing is the pre-existing Hex-auth secret and the pre-existing interop-test issues, both orthogonal to the mise migration itself.

Also worth flagging separately: grpc is a fork/mirror of the OSS elixir-grpc/grpc library published as grpc_fresha, and its own CI intentionally matrix-tests across multiple OTP/Elixir versions for compatibility — pinning a single mise.toml version (as this PR does) is a bit of a mismatch for that use case. Not blocking this PR, but worth a second look at whether grpc should be in scope for the org-wide mise rollout at all.

@krukonshedul
krukonshedul requested a review from dyl-sv August 27, 2026 15:19
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.

2 participants