Skip to content

fix(examples): drop unused cowboy dep from elixir example - #2882

Merged
mikeland73 merged 3 commits into
mainfrom
mikeland73/fix-elixir-test
Jun 21, 2026
Merged

fix(examples): drop unused cowboy dep from elixir example#2882
mikeland73 merged 3 commits into
mainfrom
mikeland73/fix-elixir-test

Conversation

@mikeland73

Copy link
Copy Markdown
Collaborator

Summary

The elixir_hello example's run_test (mix run) was failing in CI with a TLS key_usage_mismatch alert when Mix tried to install Hex from builds.hex.pm — a strict certificate check in the pinned Erlang/OTP 27.2. Mix only reached out to the network because the example declared a hex dependency on cowboy, which is entirely unused (lib/elixir_hello.ex just prints "Hello World!"). This PR removes the dead cowboy dependency (and the now-empty mix.lock), making the example fully offline so the test no longer touches the network.

How was it tested?

Reproduced the original CI failure locally, then confirmed devbox run run_test now compiles and prints Hello World! from a clean _build/deps with no network access.

Community Contribution License

All community contributions in this pull request are licensed to the project
maintainers under the terms of the
Apache 2 License.

By creating this pull request, I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 License as stated in
the
Community Contribution License.

The elixir_hello example only prints "Hello World!" and never uses
cowboy. Pulling the unused hex dependency forced `mix run` to install
Hex over the network, which fails under Erlang/OTP 27.2 due to a strict
cert key-usage check rejecting builds.hex.pm (key_usage_mismatch TLS
alert). Removing the dead dependency makes the example fully offline so
`devbox run run_test` no longer touches the network.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings June 21, 2026 18:13

CopilotAI 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.

Pull request overview

This PR makes the examples/development/elixir/elixir_hello template fully offline by removing an unused Hex dependency that caused Mix to attempt network access during mix run in CI.

Changes:

  • Removed the unused {:cowboy, "~> 2.9"} dependency from mix.exs.
  • Deleted mix.lock since it only contained lock entries for the removed dependency tree.

Reviewed changes

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

FileDescription
examples/development/elixir/elixir_hello/mix.exsDrops the unused cowboy dependency from the example’s dependency list.
examples/development/elixir/elixir_hello/mix.lockRemoves the lockfile that only existed due to the unused dependency.

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

mikeland73and others added 2 commits June 21, 2026 11:23
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikeland73
mikeland73 merged commit d1174dd into mainJun 21, 2026
20 checks passed
@mikeland73
mikeland73 deleted the mikeland73/fix-elixir-test branch June 21, 2026 19:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mikeland73