Commit Graph

36 Commits

Author SHA1 Message Date
Kjell Winblad 89b47e8ffc fix(s3 tracing): do not format records as IO data in aggregate mode 2024-05-23 12:41:30 +02:00
Kjell Winblad e10c87b825 fix: add action rendered trace for s3 in aggregated mode
Fixes:
https://emqx.atlassian.net/browse/EMQX-12429
2024-05-23 10:25:27 +02:00
Andrew Mayorov 8016e9adf4
fix(s3-bridge): restore backward config compatibility 2024-05-22 17:59:52 +02:00
Andrew Mayorov 28f6eb0200
fix(s3-bridge): report inconsistent `min/max_part_size` option 2024-05-21 18:49:01 +02:00
Andrew Mayorov 385ac268d7
chore(s3-bridge): decrease default aggreg interval to 30 minutes 2024-05-17 14:49:18 +02:00
Andrew Mayorov c348f759af
chore(s3-bridge): decrease default aggreg limit to 100K records 2024-05-17 14:19:59 +02:00
Andrew Mayorov 39c2433afb
fix(s3-bridge): update config typespecs 2024-05-17 09:47:16 +02:00
Andrew Mayorov 5b2c2b336c
feat(s3-bridge): meld 2 separate actions into a single one
Discriminated through `mode` parameter. Also rename "simple" action to
a "direct" upload mode.
2024-05-17 09:34:21 +02:00
Andrew Mayorov c10a48f4be
fix(s3-aggreg): disambiguate action schema namespace
Otherwise schemas for `s3` and `s3_aggregated_upload` collide when
projected into OpenAPI schema.
2024-05-14 10:49:21 +02:00
Thales Macedo Garitezi 3a29696a48 fix(aggregator): refactor supervision tree
Instead of using a aggregator supervisor with a fixed local name, we should allow
specifying different names so each action app will spawn its own aggregator supervisor.
2024-05-10 09:06:12 -03:00
Thales Macedo Garitezi 7b80a9aa44 fix(aggregator): namespace aggregator ids with action type
Otherwise, actions of different types but same names will clash when starting the
aggregator supervision tree.
2024-05-09 16:02:11 -03:00
Thales Macedo Garitezi 32493e395c refactor: avoid passing record down to template rendering function 2024-05-03 17:43:30 -03:00
Thales Macedo Garitezi 157e2c2535 refactor: make api more generic 2024-05-03 17:25:02 -03:00
Thales Macedo Garitezi a6508e2fca refactor: use better names
Co-authored-by: Andrew Mayorov <encube.ul@gmail.com>
2024-05-03 17:04:09 -03:00
Thales Macedo Garitezi d61f4078e2 refactor: extract blob aggregator logic to separate application
This will allow other bridges to share the same aggregation logic as S3 aggregated action.
2024-05-03 14:35:58 -03:00
Kjell Winblad 5bfe31b691 fix: issues found during PR review (thanks @thalesmg and @zmstone)
* Simpler handling of true and false in best effort JSON formatter
* inet:ntoa/1 to format IP addresses
* Made a record for lazy formatted trace values and formatter to improve
  maintainability
* Added callback to format return value from connector
  * Extended test case to check that the format return value callback
    works
* Added handling of "lazy" trace entry data to the text formatter. Do we
  need to handle this data in the normal log formatters as well?
2024-05-03 15:04:57 +02:00
Kjell Winblad ea7633c484 fix: rule trace formatting, republish and console stop after rendering
* Better rule trace formatting for many trace entries
* The republish and console actions have got working stop after
  rendering functionality
2024-05-03 15:02:36 +02:00
Andrew Mayorov 6d3add3646
fix(s3-aggreg): do not handle `{error, closed}` on buffer write
Because it's not really something `file:write/2` is supposed to return.
2024-04-30 10:48:16 +02:00
Andrew Mayorov 4bea938ef2
fix(s3-csv): clarify naming of CSV container concepts
Co-Authored-By: Ilya Averyanov <av@rubybox.dev>
2024-04-30 10:48:16 +02:00
Andrew Mayorov 83366cbed0
fix(s3-aggreg): ensure action works in Rule SQL contexts 2024-04-30 10:48:16 +02:00
Andrew Mayorov a1a313d992
fix(s3-aggeg): apply CSV column order setting consistently
Otherwise, columns that are part of column order could appear and
disappear from consecutive uploads, depending on if they are part
of the very first buffered event or not.
2024-04-30 10:48:16 +02:00
Andrew Mayorov f6e5eea4f7
feat(s3-aggreg): handle delivery shutdowns gracefully 2024-04-30 10:48:15 +02:00
Andrew Mayorov 339036045d
feat(s3-aggreg): support custom and default S3 object HTTP headers
I.e. configured container decides default `Content-Type` header.
2024-04-30 10:48:15 +02:00
Andrew Mayorov 5b15b2d641
docs(s3-bridge): document aggregated upload action schema 2024-04-30 10:48:15 +02:00
Andrew Mayorov ccbcc0c4e3
feat(s3-bridge): implement aggregated upload action 2024-04-30 10:48:15 +02:00
Kjell Winblad 03e3ac19a9 feat: add stop after render and after render trace to s3 action 2024-04-25 11:51:46 +02:00
zmstone 51c8173174 feat(bridge): add is_template flag to bridge config fields 2024-04-17 13:10:55 +02:00
Kjell Winblad 4bfc51c052 refactor(emqx_connector_info): improve documentation and type specs 2024-03-21 16:08:31 +01:00
Kjell Winblad a3b75eb39d refactor(remaining connectors): to use emqx_connector_info
This commit refactors the sqlserver, iotdb, elasticsearch, opents,
greptimedb, pulsar, tdengine, rabbitmq and s3 connectors to use the
`emqx_connector_info` behavior.
2024-03-21 09:47:57 +01:00
Andrew Mayorov a30e8818fd
fix(s3-bridge): check for unobtainable credentials in healthcheck 2024-02-22 16:56:14 +01:00
Andrew Mayorov 6b97983303
fix(s3-bridge): anticipate repeated connector start requests
Starting disconnected connector manually implies that there's no
attempt to stop it first.
2024-02-21 14:23:29 +01:00
Andrew Mayorov d8b6ecd185
fix(bridge-s3): expose connector-level `resource_opts` properly 2024-02-21 10:49:04 +01:00
Andrew Mayorov a4eac75b25
fix(s3-bridge): handle recoverable AWS errors 2024-02-12 18:20:03 +01:00
Andrew Mayorov 2b1231b980
fix(s3-bridge): ensure bridge and connector names are identical 2024-02-12 13:46:54 +01:00
Andrew Mayorov c108262771
chore(s3-bridge): use `emqx_connector_schema` helper for brewity 2024-02-09 16:08:33 +01:00
Andrew Mayorov 802c760406
feat(s3): introduce S3 connector and action
This is a trivial connector based on `emqx_s3` and simple action
that maps each incoming event into an S3 object upload. Due to
current `emqx_s3` limitation this bridge is compatible with
backends providing S3 API with path-style bucket access.
2024-02-09 14:16:32 +01:00