format
This commit is contained in:
parent
6fdd39dc0e
commit
c509500320
4 changed files with 25 additions and 17 deletions
11
CLAUDE.md
11
CLAUDE.md
|
|
@ -106,10 +106,15 @@ Tests use comprehensive mocking to prevent external connections:
|
|||
- Write descriptive test names that explain behavior
|
||||
|
||||
### Pre-Commit Checklist
|
||||
**CRITICAL**: NEVER commit or push code with syntax errors or compilation failures. Always validate before committing.
|
||||
|
||||
1. Run `mix format` - ALWAYS do this first
|
||||
2. Run `mix compile --warnings-as-errors` - ensure no warnings
|
||||
3. Run `mix test` - ensure all tests pass
|
||||
4. Only then commit and push your changes
|
||||
2. Run `mix compile --warnings-as-errors` - ensure no warnings or compilation errors
|
||||
3. Run `mix test` - ensure all tests pass (at minimum, ensure no syntax/compilation errors)
|
||||
4. **MANDATORY**: If any step fails, fix the issues before proceeding
|
||||
5. Only after ALL checks pass should you commit and push your changes
|
||||
|
||||
**NEVER PUSH BROKEN CODE**: Syntax errors, compilation failures, or basic test failures should be fixed immediately before any git operations. Pushing broken code breaks CI/CD pipelines and wastes deployment resources.
|
||||
|
||||
## Important Documentation Updates
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ config :aprsme, AprsmeWeb.Endpoint,
|
|||
secret_key_base: "IV9+ENaw9i8xjReRk4sULRvRgsmFVTGQwQGGrf4G+Q/SFMeHBCNWRlPXQ2YvT36R",
|
||||
server: false
|
||||
|
||||
# Disable Prometheus telemetry in test mode to avoid port conflicts
|
||||
config :aprsme, AprsmeWeb.Telemetry, enabled: false
|
||||
|
||||
# Disable cleanup scheduler in test environment
|
||||
config :aprsme, :cleanup_scheduler, enabled: false
|
||||
|
||||
|
|
@ -56,10 +59,6 @@ config :exq,
|
|||
start_on_application: false,
|
||||
mode: :inline
|
||||
|
||||
# Disable Prometheus telemetry in test mode to avoid port conflicts
|
||||
config :aprsme, AprsmeWeb.Telemetry,
|
||||
enabled: false
|
||||
|
||||
# Configure ExVCR
|
||||
config :exvcr,
|
||||
vcr_cassette_library_dir: "test/fixtures/vcr_cassettes",
|
||||
|
|
|
|||
|
|
@ -324,7 +324,10 @@ defmodule AprsmeWeb.StatusLive.Index do
|
|||
<%= for node_name <- @aprs_status.cluster_info.all_nodes do %>
|
||||
<div class={[
|
||||
"badge gap-1",
|
||||
if(node_name == @aprs_status.cluster_info.leader_node, do: "badge-primary", else: "badge-outline")
|
||||
if(node_name == @aprs_status.cluster_info.leader_node,
|
||||
do: "badge-primary",
|
||||
else: "badge-outline"
|
||||
)
|
||||
]}>
|
||||
<%= if node_name == @aprs_status.cluster_info.leader_node do %>
|
||||
<div class="w-2 h-2 bg-current rounded-full"></div>
|
||||
|
|
|
|||
|
|
@ -10,21 +10,22 @@ defmodule AprsmeWeb.Telemetry do
|
|||
|
||||
@impl true
|
||||
def init(_arg) do
|
||||
children =
|
||||
if Application.get_env(:aprsme, AprsmeWeb.Telemetry)[:enabled] != false do
|
||||
children =
|
||||
if Application.get_env(:aprsme, AprsmeWeb.Telemetry)[:enabled] == false do
|
||||
[
|
||||
# Only telemetry poller in test mode
|
||||
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
|
||||
]
|
||||
|
||||
# Telemetry poller will execute the given period measurements
|
||||
# every 10_000ms. Learn more here: https://hexdocs.pm/telemetry_metrics
|
||||
else
|
||||
[
|
||||
# Telemetry poller will execute the given period measurements
|
||||
# every 10_000ms. Learn more here: https://hexdocs.pm/telemetry_metrics
|
||||
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000},
|
||||
# Add reporters as children of your supervision tree.
|
||||
# {Telemetry.Metrics.ConsoleReporter, metrics: metrics()}
|
||||
{TelemetryMetricsPrometheus, [metrics: metrics()]}
|
||||
]
|
||||
else
|
||||
[
|
||||
# Only telemetry poller in test mode
|
||||
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
|
||||
]
|
||||
end
|
||||
|
||||
Supervisor.init(children, strategy: :one_for_one)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue