Skip to content

v0.9.0

Choose a tag to compare

@JeremyTheocharis JeremyTheocharis released this 19 Jun 08:13
· 55 commits to main since this release

Thank you to all the contributors in this release: @jminardi, @diericd, @istyf, @semihbkgr, @skartikey, @sruehl, @mvandergrift, @oliverpool, @skaldesh, @bostroemc, @kung-foo, @mschm, and @led0nk for reviews. It was a difficult year since we switched the core maintainer, and it took us some time to get into a good working mode. This release is our summarized work from the past year.

go get github.com/gopcua/opcua@v0.9.0

gopcua ships both a client and a server. Each item is tagged (client) or (server) for which side it affects, and items that only matter to developers building against the library API carry API. If you consume gopcua through Telegraf or benthos-umh, the plain (client) items are the runtime behavior you get automatically; (client, API) items only matter if you write Go code against gopcua; (server) items only matter if you build a server on gopcua.

Breaking change (API): Node operations now run against a Client interface instead of the concrete *Client type (#847). If you construct nodes against the concrete client type, update those call sites. See the "List of Breaking Changes" in the README.

New

  • Basic256Sha256 channels now complete a handshake end to end in both Sign and SignAndEncrypt mode between a gopcua client and server, so you can run signed and encrypted connections (client + server)
  • A StateChangedFunc callback lets a client run your own code on every connection-state change (Connected, Connecting, Disconnected, Reconnecting), for example to log drops, update health, or trigger reconnect-aware logic (client, API)

Improvements

  • Monitoring a batch of nodes now succeeds for the valid ones instead of failing the whole batch when one node ID is bad; each rejected node is reported individually as a monitor.ItemError you can read with errors.As (client)
  • Node operations now run against a client interface, so you can inject a mocked client when unit-testing code that calls node methods; if you construct nodes against the concrete client type, review those call sites (client, API)

Fixes

  • Reading or subscribing to large sets of nodes (roughly a thousand or more) over an encrypted connection no longer drops the connection with an EOF; smaller requests and unencrypted connections were not affected (client + server)
  • Subscriptions now survive a reconnect: after a network interruption the client no longer loses its subscriptions and stops receiving data until it is restarted (client)
  • Recovering missed data after a reconnect no longer hangs in an endless retry loop or silently drops the recovered notifications (client)
  • Connecting to servers that present their certificate as a chain of leaf plus intermediate certificates, such as Siemens WinCC Unified Runtime, now works (client)
  • Browsing now returns a usable node ID for references typed as ExpandedNodeID instead of nil, which previously caused a panic (client)
  • Calling Close on a client that never established a session no longer panics (client)
  • expvar counters (read, send, dial, subscription) render again under /debug/vars on Go 1.23, where nested stats had shown as empty objects (client, API)
  • A server no longer crashes when a client writes to a node in a namespace that does not exist; it returns Bad_NodeIdUnknown (server)
  • Server writes to non-Value attributes such as Description or DisplayName now report success instead of a false bad-attribute error (server)
  • Server responses larger than the negotiated chunk size, such as browsing a folder with many nodes, are now split across multiple chunks instead of dropping the connection (server)
  • A server now returns a valid, non-zero session timeout, so strict clients such as UaExpert no longer fail to connect with BadTimeout (server)
  • Creating a folder node in a server address space no longer panics (server)

The server now also sets the ReceiverCertificateThumbprint on its handshake response, so strict clients (Prosys, UaExpert) accept encrypted channels against a gopcua server (server).

Full Changelog: v0.8.0...v0.9.0