Tags: dapr/kit
Tags
fix: windows pipe - construct SDDL with user ID (#157) * fix: windows pipe - construct SDDL with user ID Signed-off-by: Mike Nguyen <hey@mike.ee> * doc: update co note Signed-off-by: Mike Nguyen <hey@mike.ee> * test: userid validation Signed-off-by: Mike Nguyen <hey@mike.ee> --------- Signed-off-by: Mike Nguyen <hey@mike.ee>
fix: backport RSA key encoding (#148) and log-file output (#152) to r… …elease-0.17 (#153) * fix: support RSA and fix ed25519 key encoding in EncodePrivateKey (#148) * fix: support RSA key encoding in EncodePrivateKey EncodePrivateKey only handled *ecdsa.PrivateKey and ed25519.PrivateKey, rejecting RSA keys with "unsupported key type". Since RSA keys also use x509.MarshalPKCS8PrivateKey with the same PKCS#8 block type, add *rsa.PrivateKey to the existing case list. Adds table-driven tests covering RSA-2048, RSA-4096, ECDSA P-256, Ed25519, and unsupported type with roundtrip verification through DecodePEMPrivateKey. Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> * fix: address review feedback - Drop RSA-4096 test case to avoid slow CI (2048 is sufficient coverage) - Replace custom containsSubstr/searchSubstr with strings.Contains - Remove unused helper functions Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> --------- Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> * feat: add OutputFile option for log destination in logger (#152) * feat: add OutputFile option for log destination in logger Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * feat: add file output support for logging Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * lint Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * add cleanup for file output logger in options tests Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * fix: address review feedback for log file output - Relax file permissions from 0600 to 0644 to allow reads (per Albert's review) - Track open log file handle in package-level state protected by mutex to prevent FD leaks when ApplyOptionsToLoggers is called multiple times - Close previous log file before opening a new one on re-apply - Revert output to stdout when OutputFile is empty (handles config reload) - Extract setLogOutput helper for clarity - Add TestApplyOptionsToLoggersFileOutputReapply test verifying re-apply closes the previous file and switches to the new one Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> * fix: improve error handling and output file management in logging Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> * fix: address Copilot review — atomic file swap and early test cleanup - Open new log file before closing the old one so loggers are never left pointing at a closed FD if OpenFile fails - Register t.Cleanup immediately after ApplyOptionsToLoggers to prevent FD leaks on assertion failures Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> --------- Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> Co-authored-by: Nelson Parente <nelson_parente@live.com.pt> --------- Signed-off-by: Nelson Parente <nelson_parente@live.com.pt> Signed-off-by: MyMirelHub <15373565+MyMirelHub@users.noreply.github.com> Co-authored-by: Mirel <15373565+MyMirelHub@users.noreply.github.com>
events/loop: Factory & reduce lock contention (#140) Update the loop implementation to use an optimistic RLock for enqueueing, falling back to a full Lock only when the queue segment is full. This reduces lock contention. Uses a generic typed Factory to allow for the loop to be sync.Pool cached by the consumer, on demand. The loop does not cache itself as the loop may continue to be used after being closed. Signed-off-by: joshvanl <me@joshvanl.dev>
Concurrency ctesting (#133) * Adds concurrency/ctesting Adds concurrency/ctesting package, used for concurrently running a set of runners, and collect the results via a testing assertion. Signed-off-by: joshvanl <me@joshvanl.dev> * lint Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com> --------- Signed-off-by: joshvanl <me@joshvanl.dev> Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com> Co-authored-by: joshvanl <me@joshvanl.dev>
events/loop & slices (#119) * events/loop & slices Adds a generic control loop implementation to `event/loop`. Adds a new `slices` package that provides a generic slice de-duplication func. Makes events batcher and queue processer taker in Options. Allows enqueuing multiple processor items in same func call. Signed-off-by: joshvanl <me@joshvanl.dev> * Lint Signed-off-by: joshvanl <me@joshvanl.dev> * lint Signed-off-by: joshvanl <me@joshvanl.dev> * lint Signed-off-by: joshvanl <me@joshvanl.dev> * Elements match Signed-off-by: joshvanl <me@joshvanl.dev> * Adds buffer size option to events loop Signed-off-by: joshvanl <me@joshvanl.dev> * nit Signed-off-by: joshvanl <me@joshvanl.dev> --------- Signed-off-by: joshvanl <me@joshvanl.dev>
concurrency/lock: Adds context and outercancel locks (#115) * concurrency/lock: Adds context and outercancel locks Adds context lock which will cancel and return an error to Lock & RLock if the given context cancels before the lock is achieved. Adds outercancel lock which will cancel all RLocks in progress if the outer Lock is called. Signed-off-by: joshvanl <me@joshvanl.dev> * lint Signed-off-by: joshvanl <me@joshvanl.dev> * Lint Signed-off-by: joshvanl <me@joshvanl.dev> * Fix tests Signed-off-by: joshvanl <me@joshvanl.dev> * lint Signed-off-by: joshvanl <me@joshvanl.dev> * lint Signed-off-by: joshvanl <me@joshvanl.dev> --------- Signed-off-by: joshvanl <me@joshvanl.dev>
PreviousNext