Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more fields to eventbus and subscription #316

Merged
merged 1 commit into from
Nov 25, 2022
Merged

Conversation

wenfengwang
Copy link
Contributor

What problem does this PR solve?

Issue Number: close N/a

Problem Summary

add more fields to eventbus and subscription

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
> vsctl eventbus list                                                                                                                                                                                                                                                                                  at 20:59:25
+--------------+-------------+---------------------------+---------------------------+-----------------+
|     NAME     | DESCRIPTION |         CREATED_AT        |         UPDATED_AT        | EVENTLOG NUMBER |
+--------------+-------------+---------------------------+---------------------------+-----------------+
|  quick-start |             | 2022-11-24T20:13:09+08:00 | 2022-11-24T20:13:09+08:00 |        1        |
+--------------+-------------+---------------------------+---------------------------+-----------------+
| quick-start1 |     test    | 2022-11-24T20:13:55+08:00 | 2022-11-24T20:13:55+08:00 |        1        |
+--------------+-------------+---------------------------+---------------------------+-----------------+

 > vsctl eventbus info quick-start1 --block                                                                                                                                                                                                                                                             at 21:00:16
+--------------+-------------+---------------------------+---------------------------+------------------+------------------+----------+------+-------+-----+------------------+--------+--------+-----------------+
|   EVENTBUS   | DESCRIPTION |         CREATED_AT        |         UPDATED_AT        |     EVENTLOG     |      SEGMENT     | CAPACITY | SIZE | START | END |       BLOCK      | LEADER | VOLUME |     ENDPOINT    |
+--------------+-------------+---------------------------+---------------------------+------------------+------------------+----------+------+-------+-----+------------------+--------+--------+-----------------+
| quick-start1 |     test    | 2022-11-24T20:13:55+08:00 | 2022-11-24T20:13:55+08:00 | 000000245B010010 | 000000245B020010 |  4194304 |   0  |   0   |  -1 | 00000002BE000010 |  true  |    1   | localhost:11811 |
|              |             |                           |                           |                  +------------------+----------+------+-------+-----+------------------+--------+--------+-----------------+
|              |             |                           |                           |                  | 0000002469000010 |  4194304 |   0  |   0   |  -1 | 00000002C0000010 |  true  |    1   | localhost:11811 |
+--------------+-------------+---------------------------+---------------------------+------------------+------------------+----------+------+-------+-----+------------------+--------+--------+-----------------+

 > vsctl subscription list                                                                                                                                                                                                                                                                      took 5s at 20:58:31
+-----+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+--------+-------------+---------------------------+---------------------------+
| NO. |        ID        |  NAME | DISABLE |   EVENTBUS  |           SINK          | DESCRIPTION | PROTOCOL | SINKCREDENTIAL | CONFIG | OFFSETS | FILTER | TRANSFORMER |         CREATED_AT        |         UPDATED_AT        |
+-----+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+--------+-------------+---------------------------+---------------------------+
|  1  | 0000013E57000010 |       |  false  | quick-start | http://quick-display:80 |             |   http   |      null      |   {}   |   null  | ...    | null        | 2022-11-24T20:25:57+08:00 | 2022-11-24T20:25:57+08:00 |
+-----+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+--------+-------------+---------------------------+---------------------------+
|  2  | 0000015399000010 | test1 |  false  | quick-start | http://quick-display:80 |             |   http   |      null      |   {}   |   null  | ...    | null        | 2022-11-24T20:26:52+08:00 | 2022-11-24T20:26:52+08:00 |
+-----+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+--------+-------------+---------------------------+---------------------------+

> vsctl subscription info --id 0000015399000010                                                                                                                                                                                                                                                        at 20:59:03
+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+----------------------------------------------+-------------+---------------------------+---------------------------+
|        ID        |  NAME | DISABLE |   EVENTBUS  |           SINK          | DESCRIPTION | PROTOCOL | SINKCREDENTIAL | CONFIG | OFFSETS |                    FILTER                    | TRANSFORMER |         CREATED_AT        |         UPDATED_AT        |
+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+----------------------------------------------+-------------+---------------------------+---------------------------+
|                  |       |         |             |                         |             |          |                |        |         | [                                            |             |                           |                           |
|                  |       |         |             |                         |             |          |                |        |         |   {                                          |             |                           |                           |
|                  |       |         |             |                         |             |          |                |        |         |     "exact": {                               |             |                           |                           |
| 0000015399000010 | test1 |  false  | quick-start | http://quick-display:80 |             |   http   |      null      |   {}   |   null  |       "source": "quick-start-filter-section" | null        | 2022-11-24T20:26:52+08:00 | 2022-11-24T20:26:52+08:00 |
|                  |       |         |             |                         |             |          |                |        |         |     }                                        |             |                           |                           |
|                  |       |         |             |                         |             |          |                |        |         |   }                                          |             |                           |                           |
|                  |       |         |             |                         |             |          |                |        |         | ]                                            |             |                           |                           |
+------------------+-------+---------+-------------+-------------------------+-------------+----------+----------------+--------+---------+----------------------------------------------+-------------+---------------------------+---------------------------+
  • No code

@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #316 (6aa7889) into main (09f3748) will increase coverage by 0.22%.
The diff coverage is 71.71%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #316      +/-   ##
==========================================
+ Coverage   62.72%   62.94%   +0.22%     
==========================================
  Files         133      143      +10     
  Lines       12128    12701     +573     
==========================================
+ Hits         7607     7995     +388     
- Misses       3977     4134     +157     
- Partials      544      572      +28     
Impacted Files Coverage Δ
internal/primitive/vanus/id.go 19.84% <0.00%> (-0.49%) ⬇️
internal/store/io/file_linux.go 0.00% <0.00%> (ø)
internal/trigger/trigger/trigger.go 79.88% <0.00%> (ø)
internal/primitive/transform/arg/arg.go 41.17% <41.17%> (ø)
internal/gateway/gateway.go 65.76% <42.30%> (-7.64%) ⬇️
internal/controller/trigger/controller.go 39.01% <50.00%> (-0.10%) ⬇️
internal/primitive/transform/arg/event.go 50.68% <50.68%> (ø)
internal/gateway/proxy/proxy.go 60.75% <60.75%> (ø)
internal/trigger/transform/transformer.go 66.66% <65.38%> (-33.34%) ⬇️
...ernal/controller/trigger/validation/subscripton.go 69.87% <66.66%> (-1.02%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f14ef91...6aa7889. Read the comment docs.

internal/controller/trigger/metadata/info.go Show resolved Hide resolved
vsctl/command/eventbus.go Outdated Show resolved Hide resolved
internal/controller/trigger/controller.go Show resolved Hide resolved
xdlbdy
xdlbdy previously approved these changes Nov 25, 2022
Copy link
Contributor

@xdlbdy xdlbdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenfengwang wenfengwang merged commit 5fdb2bb into main Nov 25, 2022
@wenfengwang wenfengwang deleted the add-fields branch November 28, 2022 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants