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
|
- Write descriptive test names that explain behavior
|
||||||
|
|
||||||
### Pre-Commit Checklist
|
### 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
|
1. Run `mix format` - ALWAYS do this first
|
||||||
2. Run `mix compile --warnings-as-errors` - ensure no warnings
|
2. Run `mix compile --warnings-as-errors` - ensure no warnings or compilation errors
|
||||||
3. Run `mix test` - ensure all tests pass
|
3. Run `mix test` - ensure all tests pass (at minimum, ensure no syntax/compilation errors)
|
||||||
4. Only then commit and push your changes
|
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
|
## Important Documentation Updates
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ config :aprsme, AprsmeWeb.Endpoint,
|
||||||
secret_key_base: "IV9+ENaw9i8xjReRk4sULRvRgsmFVTGQwQGGrf4G+Q/SFMeHBCNWRlPXQ2YvT36R",
|
secret_key_base: "IV9+ENaw9i8xjReRk4sULRvRgsmFVTGQwQGGrf4G+Q/SFMeHBCNWRlPXQ2YvT36R",
|
||||||
server: false
|
server: false
|
||||||
|
|
||||||
|
# Disable Prometheus telemetry in test mode to avoid port conflicts
|
||||||
|
config :aprsme, AprsmeWeb.Telemetry, enabled: false
|
||||||
|
|
||||||
# Disable cleanup scheduler in test environment
|
# Disable cleanup scheduler in test environment
|
||||||
config :aprsme, :cleanup_scheduler, enabled: false
|
config :aprsme, :cleanup_scheduler, enabled: false
|
||||||
|
|
||||||
|
|
@ -56,10 +59,6 @@ config :exq,
|
||||||
start_on_application: false,
|
start_on_application: false,
|
||||||
mode: :inline
|
mode: :inline
|
||||||
|
|
||||||
# Disable Prometheus telemetry in test mode to avoid port conflicts
|
|
||||||
config :aprsme, AprsmeWeb.Telemetry,
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# Configure ExVCR
|
# Configure ExVCR
|
||||||
config :exvcr,
|
config :exvcr,
|
||||||
vcr_cassette_library_dir: "test/fixtures/vcr_cassettes",
|
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 %>
|
<%= for node_name <- @aprs_status.cluster_info.all_nodes do %>
|
||||||
<div class={[
|
<div class={[
|
||||||
"badge gap-1",
|
"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 %>
|
<%= if node_name == @aprs_status.cluster_info.leader_node do %>
|
||||||
<div class="w-2 h-2 bg-current rounded-full"></div>
|
<div class="w-2 h-2 bg-current rounded-full"></div>
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,22 @@ defmodule AprsmeWeb.Telemetry do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def init(_arg) do
|
def init(_arg) do
|
||||||
children =
|
children =
|
||||||
if Application.get_env(:aprsme, AprsmeWeb.Telemetry)[:enabled] != false do
|
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},
|
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000},
|
||||||
# Add reporters as children of your supervision tree.
|
# Add reporters as children of your supervision tree.
|
||||||
# {Telemetry.Metrics.ConsoleReporter, metrics: metrics()}
|
# {Telemetry.Metrics.ConsoleReporter, metrics: metrics()}
|
||||||
{TelemetryMetricsPrometheus, [metrics: metrics()]}
|
{TelemetryMetricsPrometheus, [metrics: metrics()]}
|
||||||
]
|
]
|
||||||
else
|
|
||||||
[
|
|
||||||
# Only telemetry poller in test mode
|
|
||||||
{:telemetry_poller, measurements: periodic_measurements(), period: 10_000}
|
|
||||||
]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Supervisor.init(children, strategy: :one_for_one)
|
Supervisor.init(children, strategy: :one_for_one)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue