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

[3.5] api: fix duplicate gateway url issue #16490

Merged
merged 3 commits into from
Aug 30, 2023
Merged

Conversation

fuweid
Copy link
Member

@fuweid fuweid commented Aug 27, 2023

Run scripts/genproto.sh --skip-protodoc and checkout server/wal/walpb/record.pb.go because we still use go.etcd.io/etcd/raft/v3 instead of go.etcd.io/raft/v3.

Before

➜  etcd git:(release-3.5) etcdctl put foo bar
OK
➜  etcd git:(release-3.5) etcdctl get -w json foo
{"header":{"cluster_id":14841639068965178418,"member_id":10276657743932975437,"revision":2,"raft_term":2},"kvs":[{"key":"Zm9v","create_revision":2,"mod_revision":2,"version":1,"value":"YmFy"}],"count":1}

➜  etcd git:(release-3.5) etcdctl compact 2
compacted revision 2

➜  etcd git:(release-3.5) http_proxy= curl -L http://127.0.0.1:2379/v3/maintenance/hashkv -X POST -d '{"revsion":2}'
Not Found

After

➜  etcd git:(bp-16464) http_proxy= curl -L http://127.0.0.1:2379/v3/maintenance/hashkv -X POST -d '{"revsion":2}'
{"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"2","raft_term":"3"},"hash":3305255506,"compact_revision":"2"}%

Backport #16464

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

Run `scripts/genproto.sh --skip-protodoc` and checkout
server/wal/walpb/record.pb.go because we still use go.etcd.io/etcd/raft/v3
instead of go.etcd.io/raft/v3.

Before

```
➜  etcd git:(release-3.5) etcdctl put foo bar
OK
➜  etcd git:(release-3.5) etcdctl get -w json foo
{"header":{"cluster_id":14841639068965178418,"member_id":10276657743932975437,"revision":2,"raft_term":2},"kvs":[{"key":"Zm9v","create_revision":2,"mod_revision":2,"version":1,"value":"YmFy"}],"count":1}

➜  etcd git:(release-3.5) etcdctl compact 2
compacted revision 2

➜  etcd git:(release-3.5) http_proxy= curl -L http://127.0.0.1:2379/v3/maintenance/hashkv -X POST -d '{"revsion":2}'
Not Found
```

After

```bash
➜  etcd git:(bp-16464) http_proxy= curl -L http://127.0.0.1:2379/v3/maintenance/hashkv -X POST -d '{"revsion":2}'
{"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"2","raft_term":"3"},"hash":3305255506,"compact_revision":"2"}%
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
@fuweid fuweid changed the title api: fix duplicate gateway url issue [3.5] api: fix duplicate gateway url issue Aug 27, 2023
@ahrtr
Copy link
Member

ahrtr commented Aug 27, 2023

Could you also add at least the cases for hash and hashkv from #16489?

@fuweid
Copy link
Member Author

fuweid commented Aug 28, 2023

Could you also add at least the cases for hash and hashkv from #16489?

Added. I also increase the timeout for grpcproxy testcase. No idea why it took so long.

tests/e2e/v3_curl_test.go Outdated Show resolved Hide resolved
tests/e2e/v3_curl_test.go Outdated Show resolved Hide resolved
fuweid added 2 commits August 28, 2023 21:00
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @fuweid

@ahrtr
Copy link
Member

ahrtr commented Aug 28, 2023

Please also add a changelog item for 3.5. thx

@fuweid
Copy link
Member Author

fuweid commented Aug 28, 2023

Please also add a changelog item for 3.5. thx

Sure. Will file pr after merged.

@ahrtr
Copy link
Member

ahrtr commented Aug 29, 2023

@jmhbnz @serathius @wenjiaswe

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks @fuweid

fuweid added a commit to fuweid/etcd that referenced this pull request Aug 29, 2023
Signed-off-by: Wei Fu <fuweid89@gmail.com>
@fuweid
Copy link
Member Author

fuweid commented Aug 29, 2023

Thanks @ahrtr @jmhbnz for review.

The changelog is here https://github.com/etcd-io/etcd/pull/16503/files

ping @serathius the change looks good to you?

fuweid added a commit to fuweid/etcd that referenced this pull request Aug 29, 2023
Signed-off-by: Wei Fu <fuweid89@gmail.com>
@ahrtr ahrtr merged commit 182e352 into etcd-io:release-3.5 Aug 30, 2023
ahrtr added a commit that referenced this pull request Aug 30, 2023
CHANGELOG: add #16490 item in CHANGELOG-3.5.md
@fuweid fuweid deleted the bp-16464 branch August 30, 2023 09:12
iiamabby pushed a commit to iiamabby/etcd that referenced this pull request Nov 30, 2023
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants