diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 1e12f3b8d..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 7 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - internal - - BUG - - "help wanted" - - "#triage/accepted" - - "#needs-triage" - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: "#triage/stale" - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -# closeComment: > -# Your comment here. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: issues - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -# pulls: -# daysUntilStale: 30 -# markComment: > -# This pull request has been automatically marked as stale because it has not had -# recent activity. It will be closed if no further activity occurs. Thank you -# for your contributions. - -# issues: -# exemptLabels: -# - confirmed diff --git a/.github/workflows/run_static_checks.yaml b/.github/workflows/run_static_checks.yaml new file mode 100644 index 000000000..b30097823 --- /dev/null +++ b/.github/workflows/run_static_checks.yaml @@ -0,0 +1,23 @@ +name: Run static checks + +concurrency: + group: static-check-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + tags: + - v* + - e* + pull_request: + +jobs: + run_static_analysis: + runs-on: self-hosted + container: "ghcr.io/emqx/emqx-builder/5.0-3:24.1.5-3-alpine3.14" + steps: + - uses: actions/checkout@v2 + - name: xref + run: make xref + - name: dialyzer + run: make dialyzer diff --git a/.github/workflows/run_test_cases.yaml b/.github/workflows/run_test_cases.yaml index a88d6888b..2da627366 100644 --- a/.github/workflows/run_test_cases.yaml +++ b/.github/workflows/run_test_cases.yaml @@ -12,22 +12,6 @@ on: pull_request: jobs: - run_static_analysis: - strategy: - matrix: - emqx_builder: - - 5.0-3:24.1.5-3 # run dialyzer on latest OTP - - runs-on: ubuntu-20.04 - container: "ghcr.io/emqx/emqx-builder/${{ matrix.emqx_builder }}-ubuntu20.04" - - steps: - - uses: actions/checkout@v2 - - name: xref - run: make xref - - name: dialyzer - run: make dialyzer - run_proper_test: strategy: matrix: diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 000000000..0be30117a --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,31 @@ +--- + +name: Manage stale issues + +on: + schedule: + # run hourly + - cron: "0 * * * *" + workflow_dispatch: + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: none + + steps: + - name: Close Stale Issues + uses: actions/stale@v4.1.0 + with: + days-before-stale: 7 + days-before-close: 7 + exempt-issue-labels: 'internal,BUG,help wanted,#triage/accepted,#needs-triage,Feature' + stale-issue-label: "#triage/stale" + stale-issue-message: >- + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + +... diff --git a/apps/emqx/src/emqx_schema.erl b/apps/emqx/src/emqx_schema.erl index 17811147e..559dc53a2 100644 --- a/apps/emqx/src/emqx_schema.erl +++ b/apps/emqx/src/emqx_schema.erl @@ -870,6 +870,10 @@ fields("sysmon") -> sc(ref("sysmon_os"), #{}) } + , {"top", + sc(ref("sysmon_top"), + #{}) + } ]; fields("sysmon_vm") -> @@ -943,6 +947,65 @@ fields("sysmon_os") -> } ]; +fields("sysmon_top") -> + [ {"num_items", + sc(non_neg_integer(), + #{ mapping => "system_monitor.top_num_items" + , default => 10 + , desc => "The number of top processes per monitoring group" + }) + } + , {"sample_interval", + sc(emqx_schema:duration(), + #{ mapping => "system_monitor.top_sample_interval" + , default => "2s" + , desc => "Specifies how often process top should be collected" + }) + } + , {"max_procs", + sc(non_neg_integer(), + #{ mapping => "system_monitor.top_max_procs" + , default => 3000000 + , desc => "Stop collecting data when the number of processes +in the VM exceeds this value" + }) + } + , {"db_hostname", + sc(string(), + #{ mapping => "system_monitor.db_hostname" + , desc => "Hostname of the postgres database that collects the data points" + }) + } + , {"db_port", + sc(integer(), + #{ mapping => "system_monitor.db_port" + , default => 5432 + , desc => "Port of the postgres database that collects the data points" + }) + } + , {"db_username", + sc(string(), + #{ mapping => "system_monitor.db_username" + , default => "system_monitor" + , desc => "EMQX user name in the postgres database" + }) + } + , {"db_password", + sc(binary(), + #{ mapping => "system_monitor.db_password" + , default => "system_monitor_password" + , desc => "EMQX user password in the postgres database" + }) + } + , {"db_name", + sc(string(), + #{ mapping => "system_monitor.db_name" + , default => "postgres" + , desc => "Postgres database name" + }) + } + ]; + fields("alarm") -> [ {"actions", sc(hoconsc:array(atom()), diff --git a/apps/emqx_conf/src/emqx_conf_schema.erl b/apps/emqx_conf/src/emqx_conf_schema.erl index 385953b87..e9d99ea70 100644 --- a/apps/emqx_conf/src/emqx_conf_schema.erl +++ b/apps/emqx_conf/src/emqx_conf_schema.erl @@ -98,10 +98,6 @@ roots() -> sc(ref("db"), #{ desc => "Settings of the embedded database." })} - , {"system_monitor", - sc(ref("system_monitor"), - #{ desc => "Erlang process and application monitoring." - })} ] ++ emqx_schema:roots(medium) ++ emqx_schema:roots(low) ++ @@ -322,64 +318,6 @@ a crash dump )} ]; -fields("system_monitor") -> - [ {"top_num_items", - sc(non_neg_integer(), - #{ mapping => "system_monitor.top_num_items" - , default => 10 - , desc => "The number of top processes per monitoring group" - }) - } - , {"top_sample_interval", - sc(emqx_schema:duration(), - #{ mapping => "system_monitor.top_sample_interval" - , default => "2s" - , desc => "Specifies how often process top should be collected" - }) - } - , {"top_max_procs", - sc(non_neg_integer(), - #{ mapping => "system_monitor.top_max_procs" - , default => 200000 - , desc => "Stop collecting data when the number of processes exceeds this value" - }) - } - , {"db_hostname", - sc(string(), - #{ mapping => "system_monitor.db_hostname" - , desc => "Hostname of the postgres database that collects the data points" - }) - } - , {"db_port", - sc(integer(), - #{ mapping => "system_monitor.db_port" - , default => 5432 - , desc => "Port of the postgres database that collects the data points" - }) - } - , {"db_username", - sc(string(), - #{ mapping => "system_monitor.db_username" - , default => "system_monitor" - , desc => "EMQX user name in the postgres database" - }) - } - , {"db_password", - sc(binary(), - #{ mapping => "system_monitor.db_password" - , default => "system_monitor_password" - , desc => "EMQX user password in the postgres database" - }) - } - , {"db_name", - sc(string(), - #{ mapping => "system_monitor.db_name" - , default => "postgres" - , desc => "Postgres database name" - }) - } - ]; - fields("db") -> [ {"backend", sc(hoconsc:enum([mnesia, rlog]), diff --git a/scripts/check-elixir-deps-discrepancies.exs b/scripts/check-elixir-deps-discrepancies.exs index 21a2d18ef..eee0a9e67 100755 --- a/scripts/check-elixir-deps-discrepancies.exs +++ b/scripts/check-elixir-deps-discrepancies.exs @@ -100,7 +100,8 @@ else IO.puts( IO.ANSI.red() <> - "Update `mix.exs` to match Rebar3's references (use `overwrite: true` if necessary) and try again" <> + "Update `mix.exs` to match Rebar3's references (use `overwrite: true` if necessary) " <> + "and/or run `mix deps.get` to update and try again" <> IO.ANSI.reset() )