Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[augerctl] Support watch for get #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wzshiming
Copy link
Member

@wzshiming wzshiming commented Aug 13, 2024

part of #3

Test

Preparation cluster

Create a cluster and expose etcd port, to facilitate the creation of a cluster using kwokctl, this can be any other k8s cluster

# brew install kwok
kwokctl create cluster --etcd-port 2379

Watch leases changes

augerctl get leases -n kube-system -w

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wzshiming
Once this PR has been reviewed and has the lgtm label, please assign wenjiaswe for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wzshiming wzshiming force-pushed the feat/augerctl-get-watch branch 2 times, most recently from a2a05ca to 48e7cce Compare August 14, 2024 02:31
@wzshiming wzshiming marked this pull request as ready for review August 14, 2024 02:32
@wzshiming wzshiming force-pushed the feat/augerctl-get-watch branch from 48e7cce to 855e529 Compare August 14, 2024 02:35
@wzshiming
Copy link
Member Author

/cc @jmhbnz
/cc @siyuanfoundation

@jmhbnz
Copy link
Member

jmhbnz commented Sep 3, 2024

Hey @wzshiming - I'll review this one next, can you please rebase to fix conflicts, thanks! 🙏🏻

@wzshiming wzshiming force-pushed the feat/augerctl-get-watch branch from 855e529 to bfce023 Compare September 3, 2024 11:29
@wzshiming
Copy link
Member Author

Done, thank you for reviewing it 😄

clientv3 "go.etcd.io/etcd/client/v3"
)

func (c *client) Watch(ctx context.Context, prefix string, opOpts ...OpOption) error {
Copy link
Member

Choose a reason for hiding this comment

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

Hey @wzshiming - General question, have you put any thought into potential approaches for writing tests for augerctl? To add new features it gets easier over time if we have tests to verify existing features don't break.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, my original plan was to add the e2e test after the subcommand get.

Signed-off-by: Shiming Zhang <[email protected]>
@wzshiming wzshiming force-pushed the feat/augerctl-get-watch branch from bfce023 to 1a58621 Compare September 9, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants