Merge branch 'ci-run-dialyzer-on-slef-hosted' into merge-5.0-beta.3-to-master

This commit is contained in:
Zaiming (Stone) Shi 2022-01-03 16:23:11 +01:00
commit 719800914a
7 changed files with 119 additions and 142 deletions

63
.github/stale.yml vendored
View File

@ -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

View File

@ -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

View File

@ -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:

31
.github/workflows/stale.yaml vendored Normal file
View File

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

View File

@ -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()),

View File

@ -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]),

View File

@ -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()
)