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