Repository navigation
Conversation
|
Pipelines broken unrelated? |
|
@asim is this something we would like to be merged? |
|
If the test pass and it's been go fmt then sure, why not |
89027d7 to
4bc93ff
Compare
@asim tests seem broken due to v5 update. Not sure what is going wrong. Unrelated to this PR: |
|
I think the acme dir is gone? |
I do not know to be honest. I was not involved in v5 update and also didn't see any PRs. So I do not know what the change between v4 and v5 is and neither do I know how this affects v4 builds. |
|
I don't know what you're doing in your branch but you need to merge main otherwise this won't work. |
|
It is up-to-date with main. Previous commit before this one is cc7e2f8 |
|
I'm not near a computer but I'd do 'grep -r plugins/v5/acme' to see what's referencing this non existent path. |
|
@asim I am having same issue. Other ones are also missing
|
|
So it's a go work issue then. Fixing in a separate PR #146 |
Signed-off-by: jkoberg <jkoberg@owncloud.com>
|
There still seems to be something wrong: I tried |
|
Try delete and reinitialise go work |
Signed-off-by: jkoberg <jkoberg@owncloud.com>
|
Seems to be even more broken after the I think this is somehow related to the v5 update. Pipelines were green before it. Did we change build mechanics with v5? |
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
do not try to unmarshal on deletes
hasConn() only checked n.conn != nil. Once the NATS client exhausts its reconnect attempts the connection is permanently closed but stays non-nil, so initConn() (gated on !hasConn()) never re-runs and every subsequent KV operation fails with 'nats: connection closed' until the pod is restarted. Also bring over the ClosedCB-based resetConn() handler from the NatsjskvConnClose branch. Note that the callback alone is insufficient for go-micro consumers that pass nats.Options via context (e.g. reva's pkg/store): NewStore registers the ClosedCB, but Init() calls setOption() again which re-assigns n.nopts from the context value and drops the callback before Connect(). The IsClosed() check in hasConn() is therefore the load-bearing fix; resetConn() is complementary for direct callers. Refs OCISDEV-834
fix(store/nats-js-kv): treat closed connection as no connection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin builds its own nats.Options from a fixed set of fields. It cannot set JWT credentials, so it cannot connect to a NATS server that runs in operator (JWT) mode. The new option NatsOptions adds nats.Option values to the connection. The plugin applies them last, so they take precedence. Use it with nats.UserCredentials or nats.UserCredentialBytes for JWT credentials. Bump nats.go to v1.54.0 and go to 1.26.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(events/natsjs): add NatsOptions to pass nats.Option values
This PR bundles two related changes to the
nats-js-kvstore.1. Expose natsjskv Watcher
Adds a
Watchmethod to the nats-js-kv store. This exposes the underlying natsjs watcher and allows reacting to changes in the store.2. Fix: treat a closed connection as no connection
hasConn()previously only checkedn.conn != nil. Once the NATS client exhausts its reconnect attempts, the connection is permanently closed butn.connstays non-nil. SinceinitConn()is gated on!hasConn(), it never re-runs, so every subsequent KV operation fails withnats: connection closeduntil the calling process is restarted.A closed connection is now treated as "no connection", so the next operation re-initializes it. This also adds a
ClosedCB/resetConn()handler.Note: the
ClosedCBhandler alone is not sufficient for consumers that passnats.Optionsvia context —Init()callssetOption()again, reassigningn.noptsfrom the context value beforeConnect(), which drops the callback. TheIsClosed()check inhasConn()is therefore the load-bearing fix;resetConn()is complementary for direct callers.