2021-03-29 17:01:43 +08:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2021-08-30 17:03:49 +08:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
|
2022-01-06 03:57:48 +08:00
|
|
|
load("@rules_erlang//:github.bzl", "github_erlang_app")
|
|
|
|
|
load("@rules_erlang//:hex_archive.bzl", "hex_archive")
|
|
|
|
|
load("@rules_erlang//:hex_pm.bzl", "hex_pm_erlang_app")
|
2021-03-29 17:01:43 +08:00
|
|
|
|
|
|
|
|
def rabbitmq_external_deps(rabbitmq_workspace = "@rabbitmq-server"):
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-05-05 17:43:03 +08:00
|
|
|
name = "accept",
|
|
|
|
|
version = "0.3.5",
|
2021-07-09 15:49:28 +08:00
|
|
|
sha256 = "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8",
|
2021-05-05 17:43:03 +08:00
|
|
|
)
|
|
|
|
|
|
2022-05-19 18:56:57 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "aten",
|
2022-05-19 18:56:57 +08:00
|
|
|
sha256 = "64d40a8cf0ddfea4e13af00b7327f0925147f83612d0627d9506cbffe90c13ef",
|
|
|
|
|
version = "0.5.8",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-05-21 18:02:50 +08:00
|
|
|
name = "base64url",
|
|
|
|
|
version = "1.0.1",
|
|
|
|
|
sha256 = "f9b3add4731a02a9b0410398b475b33e7566a695365237a6bdee1bb447719f5c",
|
|
|
|
|
)
|
|
|
|
|
|
2021-05-14 16:39:03 +08:00
|
|
|
new_git_repository(
|
|
|
|
|
name = "bats",
|
|
|
|
|
remote = "https://github.com/sstephenson/bats",
|
|
|
|
|
tag = "v0.4.0",
|
|
|
|
|
build_file = rabbitmq_workspace + "//:BUILD.bats",
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "cowboy",
|
|
|
|
|
version = "2.8.0",
|
|
|
|
|
sha256 = "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a",
|
|
|
|
|
deps = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"@cowlib//:erlang_app",
|
|
|
|
|
"@ranch//:erlang_app",
|
2021-03-29 17:01:43 +08:00
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "cowlib",
|
|
|
|
|
version = "2.9.1",
|
|
|
|
|
sha256 = "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170",
|
|
|
|
|
)
|
|
|
|
|
|
2022-05-02 15:57:55 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "credentials_obfuscation",
|
2022-11-08 07:35:33 +08:00
|
|
|
version = "3.2.0",
|
|
|
|
|
sha256 = "fe8ece91a1ba6c8a08eb1063cfd5b063a723c5fe29a1fad6b7cbd76cb18d2eeb",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
github_erlang_app(
|
2021-05-07 19:01:01 +08:00
|
|
|
name = "ct_helper",
|
|
|
|
|
org = "extend",
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "cuttlefish",
|
2021-05-28 19:27:21 +08:00
|
|
|
version = "3.0.1",
|
|
|
|
|
sha256 = "3feff3ae4ed1f0ca6df87ac89235068fbee9242ee85d2ac17fb1b8ce0e30f1a6",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-04-19 19:46:47 +08:00
|
|
|
name = "eetcd",
|
2022-08-09 18:45:27 +08:00
|
|
|
version = "0.3.6",
|
|
|
|
|
sha256 = "66493bfd6698c1b6baa49679034c3def071ff329961ca1aa7b1dee061c2809af",
|
2021-04-19 19:46:47 +08:00
|
|
|
runtime_deps = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"@gun//:erlang_app",
|
2021-04-19 19:46:47 +08:00
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-04-09 21:53:51 +08:00
|
|
|
name = "enough",
|
|
|
|
|
version = "0.1.0",
|
|
|
|
|
sha256 = "0460c7abda5f5e0ea592b12bc6976b8a5c4b96e42f332059cd396525374bf9a1",
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "gen_batch_server",
|
2022-03-05 00:07:44 +08:00
|
|
|
version = "0.8.7",
|
2022-04-01 14:41:30 +08:00
|
|
|
sha256 = "94a49a528486298b009d2a1b452132c0a0d68b3e89d17d3764cb1ec879b7557a",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-04-19 19:46:47 +08:00
|
|
|
name = "gun",
|
|
|
|
|
version = "1.3.3",
|
|
|
|
|
sha256 = "3106ce167f9c9723f849e4fb54ea4a4d814e3996ae243a1c828b256e749041e0",
|
|
|
|
|
runtime_deps = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"@cowlib//:erlang_app",
|
2021-04-19 19:46:47 +08:00
|
|
|
],
|
2021-05-17 17:32:44 +08:00
|
|
|
erlc_opts = [
|
|
|
|
|
"+debug_info",
|
|
|
|
|
"+warn_export_vars",
|
|
|
|
|
"+warn_shadow_vars",
|
|
|
|
|
"+warn_obsolete_guard",
|
|
|
|
|
],
|
2021-04-19 19:46:47 +08:00
|
|
|
)
|
|
|
|
|
|
2021-03-29 17:01:43 +08:00
|
|
|
http_archive(
|
2022-12-02 19:00:40 +08:00
|
|
|
name = "inet_tcp_proxy_dist",
|
2021-03-29 17:01:43 +08:00
|
|
|
build_file = rabbitmq_workspace + "//:BUILD.inet_tcp_proxy",
|
|
|
|
|
strip_prefix = "inet_tcp_proxy-master",
|
|
|
|
|
urls = ["https://github.com/rabbitmq/inet_tcp_proxy/archive/master.zip"],
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
github_erlang_app(
|
2021-04-01 01:11:32 +08:00
|
|
|
name = "jose",
|
2021-06-18 20:41:14 +08:00
|
|
|
repo = "erlang-jose",
|
|
|
|
|
org = "potatosalad",
|
|
|
|
|
ref = "2b1d66b5f4fbe33cb198149a8cb23895a2c877ea",
|
|
|
|
|
version = "2b1d66b5f4fbe33cb198149a8cb23895a2c877ea",
|
|
|
|
|
sha256 = "7816f39d00655f2605cfac180755e97e268dba86c2f71037998ff63792ca727b",
|
2022-06-15 15:52:08 +08:00
|
|
|
build_file = rabbitmq_workspace + "//:BUILD.jose",
|
2021-04-01 01:11:32 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2022-07-25 23:11:56 +08:00
|
|
|
name = "thoas",
|
2022-07-28 20:15:50 +08:00
|
|
|
version = "0.3.0",
|
|
|
|
|
sha256 = "b8e1f8c8fad317c0b75239a9234cb093de1fb8be7ba3e41433ff80a0b3353973",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
github_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "meck",
|
|
|
|
|
org = "eproxus",
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "observer_cli",
|
2022-04-17 20:48:57 +08:00
|
|
|
version = "1.7.3",
|
|
|
|
|
sha256 = "a41b6d3e11a3444e063e09cc225f7f3e631ce14019e5fbcaebfda89b1bd788ea",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2021-08-30 17:03:49 +08:00
|
|
|
git_repository(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "osiris",
|
2023-01-11 22:45:52 +08:00
|
|
|
tag = "v1.4.3",
|
2021-08-30 17:03:49 +08:00
|
|
|
remote = "https://github.com/rabbitmq/osiris.git",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-03-30 18:34:40 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-05-05 17:43:03 +08:00
|
|
|
name = "prometheus",
|
2023-01-13 17:24:41 +08:00
|
|
|
version = "4.10.0",
|
2021-05-05 17:43:03 +08:00
|
|
|
deps = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"@quantile_estimator//:erlang_app",
|
2021-05-05 17:43:03 +08:00
|
|
|
],
|
2023-01-13 17:24:41 +08:00
|
|
|
sha256 = "2a99bb6dce85e238c7236fde6b0064f9834dc420ddbd962aac4ea2a3c3d59384",
|
2021-05-05 17:43:03 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
github_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "proper",
|
|
|
|
|
org = "manopapad",
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-05-05 17:43:03 +08:00
|
|
|
name = "quantile_estimator",
|
|
|
|
|
version = "0.2.1",
|
|
|
|
|
erlc_opts = [
|
|
|
|
|
"+debug_info",
|
|
|
|
|
],
|
2021-07-09 15:49:28 +08:00
|
|
|
sha256 = "282a8a323ca2a845c9e6f787d166348f776c1d4a41ede63046d72d422e3da946",
|
2021-05-05 17:43:03 +08:00
|
|
|
)
|
|
|
|
|
|
2022-11-08 08:39:46 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "ra",
|
2022-12-21 23:16:17 +08:00
|
|
|
version = "2.4.6",
|
|
|
|
|
sha256 = "7fae3112cea737bc64d5ff51c1b79a7f30f13ed3d11c565d2a6966ea5aa40473",
|
Adjust generated .app file for ra to include seshat as a dep
The quality of auto-detection of properities of a hex dependency was
improved with bzlmod, thus in the MODULE.bazel file, ra is handled
correctly with no hints. In WORKSPACE.bazel/workspace_helpers.bzl,
this not the case, so a full build_file_content is needed.
Bazel 6, due this month, takes bzlmod out of experimental status, so I
don't expect to close up the difference between the systems.
The easier solution is to publish ra to hex.pm with the BUILD.bazel
file included, as it exists in the ra source, and is correct,
eliminating the need for any auto-generation of it when
imported/referenced by rabbitmq-server
2022-11-08 15:45:36 +08:00
|
|
|
build_file_content = """load("@rules_erlang//:erlang_app.bzl", "erlang_app")
|
|
|
|
|
|
|
|
|
|
NAME = "ra"
|
|
|
|
|
|
|
|
|
|
EXTRA_APPS = [
|
|
|
|
|
"sasl",
|
|
|
|
|
"crypto",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
DEPS = [
|
|
|
|
|
"@gen_batch_server//:erlang_app",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
RUNTIME_DEPS = [
|
|
|
|
|
"@aten//:erlang_app",
|
|
|
|
|
"@seshat//:erlang_app",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
erlang_app(
|
|
|
|
|
app_name = NAME,
|
|
|
|
|
extra_apps = EXTRA_APPS,
|
|
|
|
|
runtime_deps = RUNTIME_DEPS,
|
|
|
|
|
deps = DEPS,
|
|
|
|
|
)
|
|
|
|
|
""",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2021-04-19 15:50:15 +08:00
|
|
|
hex_archive(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "ranch",
|
2021-09-10 20:21:57 +08:00
|
|
|
version = "2.1.0",
|
|
|
|
|
sha256 = "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916",
|
2021-04-19 15:50:15 +08:00
|
|
|
build_file = rabbitmq_workspace + "//:BUILD.ranch",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "recon",
|
2022-12-24 03:11:27 +08:00
|
|
|
version = "2.5.3",
|
|
|
|
|
sha256 = "6c6683f46fd4a1dfd98404b9f78dcabc7fcd8826613a89dcb984727a8c3099d7",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2022-01-11 22:02:59 +08:00
|
|
|
name = "redbug",
|
|
|
|
|
version = "2.0.7",
|
|
|
|
|
sha256 = "3624feb7a4b78fd9ae0e66cc3158fe7422770ad6987a1ebf8df4d3303b1c4b0c",
|
2022-08-30 16:24:40 +08:00
|
|
|
erlc_opts = [
|
|
|
|
|
"+deterministic",
|
|
|
|
|
"+debug_info",
|
|
|
|
|
],
|
2022-01-11 22:02:59 +08:00
|
|
|
)
|
|
|
|
|
|
2022-05-31 19:11:07 +08:00
|
|
|
hex_pm_erlang_app(
|
Global counters per protocol + protocol AND queue_type
This way we can show how many messages were received via a certain
protocol (stream is the second real protocol besides the default amqp091
one), as well as by queue type, which is something that many asked for a
really long time.
The most important aspect is that we can also see them by protocol AND
queue_type, which becomes very important for Streams, which have
different rules from regular queues (e.g. for example, consuming
messages is non-destructive, and deep queue backlogs - think billions of
messages - are normal). Alerting and consumer scaling due to deep
backlogs will now work correctly, as we can distinguish between regular
queues & streams.
This has gone through a few cycles, with @mkuratczyk & @dcorbacho
covering most of the ground. @dcorbacho had most of this in
https://github.com/rabbitmq/rabbitmq-server/pull/3045, but the main
branch went through a few changes in the meantime. Rather than resolving
all the conflicts, and then making the necessary changes, we (@gerhard +
@kjnilsson) took all learnings and started re-applying a lot of the
existing code from #3045. We are confident in this approach and would
like to see it through. We continued working on this with @dumbbell, and
the most important changes are captured in
https://github.com/rabbitmq/seshat/pull/1.
We expose these global counters in rabbitmq_prometheus via a new
collector. We don't want to keep modifying the existing collector, which
grew really complex in parts, especially since we introduced
aggregation, but start with a new namespace, `rabbitmq_global_`, and
continue building on top of it. The idea is to build in parallel, and
slowly transition to the new metrics, because semantically the changes
are too big since streams, and we have been discussing protocol-specific
metrics with @kjnilsson, which makes me think that this approach is
least disruptive and... simple.
While at this, we removed redundant empty return value handling in the
channel. The function called no longer returns this.
Also removed all DONE / TODO & other comments - we'll handle them when
the time comes, no need to leave TODO reminders.
Pairs @kjnilsson @dcorbacho @dumbbell
(this is multiple commits squashed into one)
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-05-21 00:16:17 +08:00
|
|
|
name = "seshat",
|
2022-11-08 06:45:06 +08:00
|
|
|
version = "0.4.0",
|
Global counters per protocol + protocol AND queue_type
This way we can show how many messages were received via a certain
protocol (stream is the second real protocol besides the default amqp091
one), as well as by queue type, which is something that many asked for a
really long time.
The most important aspect is that we can also see them by protocol AND
queue_type, which becomes very important for Streams, which have
different rules from regular queues (e.g. for example, consuming
messages is non-destructive, and deep queue backlogs - think billions of
messages - are normal). Alerting and consumer scaling due to deep
backlogs will now work correctly, as we can distinguish between regular
queues & streams.
This has gone through a few cycles, with @mkuratczyk & @dcorbacho
covering most of the ground. @dcorbacho had most of this in
https://github.com/rabbitmq/rabbitmq-server/pull/3045, but the main
branch went through a few changes in the meantime. Rather than resolving
all the conflicts, and then making the necessary changes, we (@gerhard +
@kjnilsson) took all learnings and started re-applying a lot of the
existing code from #3045. We are confident in this approach and would
like to see it through. We continued working on this with @dumbbell, and
the most important changes are captured in
https://github.com/rabbitmq/seshat/pull/1.
We expose these global counters in rabbitmq_prometheus via a new
collector. We don't want to keep modifying the existing collector, which
grew really complex in parts, especially since we introduced
aggregation, but start with a new namespace, `rabbitmq_global_`, and
continue building on top of it. The idea is to build in parallel, and
slowly transition to the new metrics, because semantically the changes
are too big since streams, and we have been discussing protocol-specific
metrics with @kjnilsson, which makes me think that this approach is
least disruptive and... simple.
While at this, we removed redundant empty return value handling in the
channel. The function called no longer returns this.
Also removed all DONE / TODO & other comments - we'll handle them when
the time comes, no need to leave TODO reminders.
Pairs @kjnilsson @dcorbacho @dumbbell
(this is multiple commits squashed into one)
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-05-21 00:16:17 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "stdout_formatter",
|
|
|
|
|
version = "0.2.4",
|
|
|
|
|
sha256 = "51f1df921b0477275ea712763042155dbc74acc75d9648dbd54985c45c913b29",
|
|
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
github_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "syslog",
|
|
|
|
|
org = "schlagert",
|
2021-06-18 20:41:14 +08:00
|
|
|
sha256 = "01c31c31d4d28e564da0660bdb69725ba37173fca5b3228829b8f3f416f9e486",
|
|
|
|
|
ref = "4.0.0",
|
|
|
|
|
version = "4.0.0",
|
2021-03-29 17:01:43 +08:00
|
|
|
)
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-03-29 17:01:43 +08:00
|
|
|
name = "sysmon_handler",
|
|
|
|
|
version = "1.3.0",
|
|
|
|
|
sha256 = "922cf0dd558b9fdb1326168373315b52ed6a790ba943f6dcbd9ee22a74cebdef",
|
|
|
|
|
)
|
2021-04-09 21:53:51 +08:00
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
hex_pm_erlang_app(
|
2021-04-09 21:53:51 +08:00
|
|
|
name = "systemd",
|
2021-05-21 17:49:37 +08:00
|
|
|
version = "0.6.1",
|
|
|
|
|
sha256 = "8ec5ed610a5507071cdb7423e663e2452a747a624bb8a58582acd9491ccad233",
|
|
|
|
|
deps = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"@enough//:erlang_app",
|
2021-04-09 21:53:51 +08:00
|
|
|
],
|
|
|
|
|
)
|
2021-04-14 06:03:06 +08:00
|
|
|
|
2022-08-30 16:24:40 +08:00
|
|
|
github_erlang_app(
|
|
|
|
|
name = "emqtt",
|
2022-09-22 01:07:25 +08:00
|
|
|
org = "emqx",
|
2022-08-30 16:24:40 +08:00
|
|
|
repo = "emqtt",
|
2022-09-22 01:07:25 +08:00
|
|
|
version = "1.7.0-rc.2",
|
|
|
|
|
ref = "1.7.0-rc.2",
|
2022-08-30 16:24:40 +08:00
|
|
|
build_file_content = """load("@rules_erlang//:erlang_app.bzl", "erlang_app")
|
|
|
|
|
|
|
|
|
|
erlang_app(
|
|
|
|
|
app_name = "emqtt",
|
|
|
|
|
erlc_opts = [
|
|
|
|
|
"+deterministic",
|
|
|
|
|
"+debug_info",
|
|
|
|
|
"-DBUILD_WITHOUT_QUIC",
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
""",
|
|
|
|
|
)
|
|
|
|
|
|
2022-03-22 19:01:16 +08:00
|
|
|
RA_INJECT_GIT_VERSION = """
|
|
|
|
|
VERSION=$(git rev-parse HEAD)
|
|
|
|
|
echo "Injecting ${VERSION} into ra.app.src..."
|
|
|
|
|
sed -i"_orig" "/vsn,/ s/2\\.[0-9]\\.[0-9]/${VERSION}/" src/ra.app.src
|
|
|
|
|
"""
|