Changelog for release 0.4.0
[govpp.git] / CHANGELOG.md
1 # Changelog
2
3 This file lists changes for the GoVPP releases.
4
5 <!-- TEMPLATE
6 ### Fixes
7 -
8 ### Features
9 -
10 ### Other
11 -
12 -->
13
14 ## 0.4.0
15
16 > _11 January 2022_
17
18 ### Binapi Generator
19
20 - the generator code has been split into multiple packages:
21     - [vppapi](binapigen/vppapi) - parses VPP API (`.api.json`) files
22     - [binapigen](binapigen) - processes parsed VPP API files and handles code generation
23 - added support for VPP enumflags type
24 - previously required manual patches for generated code should no longer be needed
25 - many generated aliases were removed and referenced to `*_types` files for simpler reading
26 - any types imported from other VPP API (`*_types.api`) files are now automatically resolved for generated Go code
27 - marshal/unmarshal methods for memory client messages are now generated
28 - generated new helper methods for more convenient IP and MAC address conversion
29 - RPC service code is now generated into a separated file (`*_rpc.ba.go`) in the same directory and uses a new low level
30   stream API
31 - added option to generate HTTP handlers for RPC services
32 - generated code now contains comments with information about versions of VPP and binapi-generator
33 - in addition to the file name, the binapi generator now accepts full path (including extension,
34   e.g. `/usr/share/vpp/api/core/vpe.api.json`)
35 - dependency on `github.com/lunixbochs/struc` was removed
36 - generated helper methods for `vpe_types.Timestamp`
37 - generated API messages comment may contain additional information about the given API development state (in progress,
38   deprecated)
39 - type `[]bool` is now known to the generator
40 - enhanced VPP version resolution - the generator is more reliable to evaluate installed VPP version
41
42 ### Features
43
44 - [socketclient](adapter/socketclient) was optimized and received a new method to add client name
45 - added new API [stream](api/api.go) for low-level access to VPP API
46     - the `Stream` API uses the same default values as the `Channel` API
47     - it supports the same functional options (request size, reply size, reply timeout)
48 - [statsclient](adapter/statsclient) supports additional options (retry period, retry timeout)
49 - the compatibility check error now contains a list of compatible and incompatible messages wrapped
50   as `CompatibilityError`
51 - removed global binary API adapter. This change allows GoVPP to manage multiple VPP connections with different sockets
52   simultaneously
53 - added support for the stats v2. The `statsclient` adapter recognizes the version automatically so the `StatsAPI`
54   remains unchanged. In relation to this change, the legacy support (i.e. stat segment v0) for VPP <=19.04 was dropped.
55 - GoVPP now recognizes VPP state `NotResponding` which can be used to prevent disconnecting in case the VPP hangs or is
56   overloaded
57 - added method `SetLogger()` for setting the global logger
58 - `StatsAPI` has a new method `GetMemory()` retrieving values related to the statseg memory heap
59 - the stats socket allows an option to connect asynchronously in the same manner as the API socket connection.
60   Use `AsyncConnectStats()` to receive `ConnectionEvent` notifications
61 - Instead of a cumulative value, the `statsclient` error counter now provides a value per worker
62 - `ListStats(patterns ...string)` returns `StatIdentifier` containing the message name and the ID (instead of the name
63   only)
64 - added support for VPP stat symlinks
65 - GoVPP received its own [API trace](api/trace.go). See the [example](examples/api-trace) for more details.
66
67 ### Fixes
68
69 - `MsgCodec` will recover panic occurring during a message decoding
70 - calling `Unsubscibe` will close the notification channel
71 - GoVPP omits to send `sockclnt_delete` while cleaning up socket clients in order to remove VPP duplicated close
72   complaints - VPP handles it itself
73 - fixed major bug causing GoVPP to not receive stats updates after VPP restart
74 - fixed name conflict in generated union field constructors
75 - the size of unions composed of other unions is now calculated correctly
76 - fixed race condition in the VPP adapter mock
77 - fixed crash caused by the return value of uint kind
78 - fixed encoding/decoding of float64
79 - fixed the stats reconnect procedure which occasionally failed re-enable the connection.
80 - fixed occasional panic during disconnect
81 - `statsclient` wait for socket procedure works properly
82 - fixed memory leak in health check
83
84 ### Other
85
86 - improved log messages to provide more relevant info
87 - updated extras/libmemif to be compatible with the latest VPP changes
88 - default health check parameter was increased to 250 milliseconds (up from 100 milliseconds), and the default threshold
89   was increased to 2 (up from 1)
90 - improved decoding of message context (message evaluation uses also the package path, not just the message ID)
91 - `statsclient` now recognizes between empty stat directories and does not treat them as unknown
92 - proxy client was updated to VPP 20.05
93
94 #### Examples
95
96 - added more code samples of working with unions in [binapi-types](examples/binapi-types)
97 - added profiling mode to [perf bench](examples/perf-bench) example
98 - improved [simple client](examples/simple-client) example to work properly even with multiple runs
99 - added [multi-vpp](examples/multi-vpp) example displaying management of two VPP instances from single application
100 - added [stream-client](examples/stream-client) example showing usage of the new stream API
101 - [simple client](examples/simple-client) and [binapi-types](examples/binapi-types) examples show usage of
102   the `vpe_types.Timestamp`
103 - added [API trace example](examples/api-trace)
104
105 #### Dependencies
106
107 - updated `github.com/sirupsen/logrus` dep to `v1.6.0`
108 - updated `github.com/lunixbochs/struc` dep to `v0.0.0-20200521075829-a4cb8d33dbbe`
109
110 ## 0.3.5
111
112 > _18 May 2020_
113
114 ### Fixes
115
116 - statsclient: Fix stats data errors and panic for VPP 20.05
117
118 ## 0.3.4
119
120 > _17 April 2020_
121
122 ### Features
123
124 - binapi-generator: Format generated Go source code in-process
125
126 ## 0.3.3
127
128 > _9 April 2020_
129
130 ### Fixes
131
132 - proxy: Unexport methods that do not satisfy rpc to remove warning
133
134 ## 0.3.2
135
136 > _20 March 2020_
137
138 ### Fixes
139
140 - statsclient: Fix panic occurring with VPP 20.05-rc0 (master)
141
142 ## 0.3.1
143
144 > _18 March 2020_
145
146 ### Fixes
147
148 - Fix import path in examples/binapi
149
150 ## 0.3.0
151
152 > _18 March 2020_
153
154 ### Fixes
155
156 - binapi-generator: Fix parsing default meta parameter
157
158 ### Features
159
160 - api: Improve compatibility checking with new error types:
161   `adapter.UnknownMsgError` and `api.CompatibilityError`
162 - api: Added exported function `api.GetRegisteredMessageTypes()`
163   for getting list of all registered message types
164 - binapi-generator: Support imports of common types from other packages
165 - binapi-generator: Generate `Reset()` method for messages
166 - binapi-generator: Compact generated methods
167
168 ### Other
169
170 - deps: Update `github.com/bennyscetbun/jsongo` to `v1.1.0`
171 - regenerate examples/binapi for latest VPP from stable/2001
172
173 ## 0.2.0
174
175 > _04 November 2019_
176
177 ### Fixes
178
179 - fixed socketclient for 19.08
180 - fixed binapi compatibility with master (20.01-rc0)
181 - fixed panic during stat data conversion
182
183 ### Features
184
185 - introduce proxy for remote access to stats and binapi
186 - optimizations for statclient
187
188 ### Other
189
190 - migrate to Go modules
191 - print info for users when sockets are missing
192
193 ## 0.1.0
194
195 > _03 July 2019_
196
197 The first release that introduces versioning for GoVPP.