Skip to content

Conversation

thangnguyen-69
Copy link

@thangnguyen-69 thangnguyen-69 commented Jul 6, 2025

  • Implement basic etcd lock with blocking strategies and lease.
  • add basic testing for lock and lockprovider(passed) but the combinatorial test failed.

For #119

@madelson
Copy link
Owner

madelson commented Jul 7, 2025

Really appreciate the great work @thangnguyen-69 !

I've gone through the code and detail and added a number of comments. I think there are a bunch of small things to do but overall the code looks pretty close!

2 other asks:

  • Please document the local setup steps by adding them to this file on your branch. I'll use those to run the code locally
  • Please add a docs page like this one for Etcd locks. You can follow the others for examples of what sort of information should go there.

var lock2 = new EtcdLeaseDistributedLock(client, "etcd");
await using var handle2 = await lock2.TryAcquireAsync();
Assert.That(handle2, Is.Not.Null, "Failed to acquire lock");
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these 3 test cases add anything that isn't covered by the combinatorial cases. Instead, use this class to test for any Etcd-specific behavior.

Notably, we should test all constructor argument validations here, including for the options classes!

@madelson
Copy link
Owner

madelson commented Jul 7, 2025

the combinatorial test failed

  • First off, don't worry about getting the tests to pass for every provider. Let's just try to get all the Etcd combinatorial tests passing
  • If you're stuck, let me know which tests are failing and I can maybe offer suggestions on how to proceed.

Copy link
Owner

@madelson madelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @thangnguyen-69 ! This is off to a great start!

@thangnguyen-69 thangnguyen-69 force-pushed the dev/add-etcd-and-test branch from f37dbd6 to 854cb97 Compare July 12, 2025 09:17
@thangnguyen-69 thangnguyen-69 requested a review from madelson July 12, 2025 09:18
@thangnguyen-69
Copy link
Author

@madelson received your comments and i will work on it and notify back again for a 2nd round.

@thangnguyen-69 thangnguyen-69 marked this pull request as draft July 12, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants