Skip to content

CHEF-37251: Update Erlang/OTP 26.2.5.21 -> 29.1.2 - #4252

Open
lbakerchef wants to merge 13 commits into
mainfrom
CHEF-37251/lbaker
Open

lbakerchef wants to merge 13 commits into
mainfrom
CHEF-37251/lbaker

Conversation

@lbakerchef

@lbakerchef lbakerchef commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Jira: CHEF-37251

Changes

  • Upgrade oc_erchef, bookshelf and oc_bifrost to require Erlang/OTP 29.1.2; update build scripts, Habitat plans and the chef-server-ctl notice.
  • Upgrade bundled rebar3 to 3.28.0 and update Erlang dependencies/pins needed for OTP 29.
  • Fix OTP 29 compiler/deprecation compatibility, including migrating oc_chef_authz_cleanup from gen_fsm to gen_statem.
  • Update Prometheus stats handling/specs for renamed metrics and optional event-driven counters.
  • Preserve system directories on PATH in the chef-server-ctl test.

Depends on

Testing

  • OTP 29.1.2 omnibus build with the omnibus-software-private branch: Buildkite #8462

Evidence

$ /opt/opscode/embedded/bin/erl -version
Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 17.1.1

$ cat /opt/opscode/embedded/lib/erlang/releases/29/OTP_VERSION
29.1.2

lbakerchef and others added 13 commits November 18, 2026 18:39
- require_otp_vsn 29.1.2 for oc_erchef, bookshelf and oc_bifrost
- bk_tests and license_scout: install Erlang 29.1.2 via asdf
- bookshelf and oc_bifrost habitat plans: core/erlang26 -> core/erlang29

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lincoln Baker <51833247+lbakerchef@users.noreply.github.com>
- oc_erchef habitat plan: core/erlang26 -> core/erlang29, matching
  bookshelf and oc_bifrost
- chef-server-ctl notice: erlang 26.2.5.14 -> 29.1.2

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lincoln Baker <51833247+lbakerchef@users.noreply.github.com>
rebar3 3.23.0 was compiled with OTP 24 and cannot load under OTP 29. rebar3 3.28.0 supports OTP 29 and includes CVE fixes introduced in 3.27.x.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin the bookshelf and oc_erchef configurations and all three services' lockfiles to the upstream v1.2.0 commit, 3486bff5884e6db44f033a09f2b98dfd9e60d57e. This includes meck PR #260, which replaces the bare catch expression rejected by OTP 29 builds with warnings-as-errors. Remove the obsolete OTP 24 pinning comment.

Signed-off-by: Lincoln Baker <51833247+lbakerchef@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
oc_erchef builds with warnings_as_errors. Under OTP 29:
- chef_license_worker: replace old-style catch with equivalent try.
- oc_chef_data_collector: stop exporting Code out of a case subexpression.
- oc_chef_authz_cleanup: also suppress deprecated gen_fsm callback warnings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lincoln Baker <51833247+lbakerchef@users.noreply.github.com>
- mochiweb: lock v3.4.0 (OTP 29 support; quotes reserved 'maybe').
- iso8601: 1.2.3 -> 1.3.4 (unquoted maybe() type is a hard error).
- erlware_commons, ibrowse, mini_s3, sqerl: move to chef fork branches
  CHEF-37251/lbaker with OTP 29 warning fixes.
- prometheus: add nowarn_deprecated_catch via rebar3 override.
- oc_bifrost: pc plugin 1.8.0 -> 1.15.0 (code:lib_dir/2 deprecation).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lincoln Baker <51833247+lbakerchef@users.noreply.github.com>
chef-server-ctl test limited PATH to embedded/bin and bin, which hides
basic utilities such as dirname. OTP 29's erl script needs dirname, so
the pedant reindex test hung. Append /usr/sbin, /usr/bin, /sbin and /bin
after the embedded paths so embedded tools still take precedence.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lincoln Baker <51833247+lbakerchef@users.noreply.github.com>
gen_fsm is deprecated. Rather than suppressing the deprecation warnings,
port the module to gen_statem (state_functions) with the same states,
API and pruning behaviour, and remove the nowarn compile directive.

Signed-off-by: Lincoln Baker <lbaker@progress.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
OTP 29 deprecates the old-style `catch Expr` construct. Rather than
suppressing the warning:

- bump prometheus to v4.13.0 (now at prometheus-erl/prometheus.erl),
  which no longer uses old-style catch, and drop the
  nowarn_deprecated_catch override; this adds quantile_estimator 1.0.2
- point epgsql, erlcloud, ibrowse, lhttpc, mini_s3, opscoderl_httpc
  and pooler at their CHEF-37251/lbaker branches, which replace every
  old-style catch with an equivalent try/catch

Signed-off-by: Lincoln Baker <lbaker@progress.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
prometheus v4.13.0 pulls quantile_estimator 1.0.2 from Hex. license_scout's rebar_lock_json escript is precompiled for an old OTP and can't load on modern OTP, so it falls back to git rev-parse and fails the omnibus licensing step. Pin quantile_estimator as a top-level git dep at the upstream commit whose source matches Hex 1.0.2.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
prometheus.erl v4.9.0 (upstream commit d0feb0df5) renamed the gauge
erlang_vm_statistics_run_queues_length_total to
erlang_vm_statistics_run_queues_length. Type and calculation are
unchanged. Update the pedant /_stats expectation to match the
prometheus v4.13.0 bump.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep core metrics required while allowing labeled failure and search response counters to be absent. Validate optional counter types when present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
opscoderl_httpc, pooler, and lhttpc were tracked on their default
branches before the OTP 29 work. Restore those references (main for
opscoderl_httpc, master for pooler and lhttpc) in anticipation of
merging their OTP 29 PRs. Non-default-branch deps (mini_s3, sqerl,
erlcloud, etc.) keep pointing at CHEF-37251/lbaker.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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