[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-09-15 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-692553222


   > > one more thing, we need to check the `etcd` version in `bin/apisix`, 
confirm the `etcd` version `>= 3.4` .
   > 
   > we can fix this in a new PR, here is the related issue: #2227
   
   fix #2227



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-09-09 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-689952623


   The newly imported lib [base64](https://github.com/iskolbin/lbase64) is used 
in `init_etcd` step to encode k/v send to etcd. Lib `base64` holds MIT License 
and only 200 lines. So I think we could directly use it.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-08-26 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-680966931


   @membphis it seems I could not directly reply in your comment on "etcd v2 
version".
   The original implementation should directly use the version detection in 
lua-resty-etcd, but it is somehow not working, as I stated here: 
https://github.com/apache/apisix/pull/2036#discussion_r475052806



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-08-21 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-671412054


   TODO:
   - [x] currenly only test v3, **test for both v2 and v3**
   - [x] currently it only support etcd v2 and v3.3+, **do we need to support 
other etcd version between these two**?
   - [ ] documentation of migrating data from v2 to v3, to avoid data loss



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-08-16 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-672564838


   Fixed by iterating through watch response.
   
   ---
   
   ~~DEBUG HELP NEEDED!!~~
   
   Currently there is only one error in test file, which is the last test of 
t/plugin/key-auth.t. Normally in etcd v2, it would add 20 consumers and find 
the 13th. But in current implementation of etcd v3, the test would add 20 
consumers but only get first three of them, so it could not get the 13th. 
However, if I rerun the test, the test would get all 20 consumers and passed. 
   
   I think it might related to the implementation of waitdir between two 
versions, but I could not find the way to debug.
   
   I print `self.values_hash` at the start of each `sync_data`, and the log is 
[here](https://gist.github.com/Yiyiyimu/f98647847ef49440454c9fff8a4f7295), 
maybe it could be of help.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-08-16 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-672564838


   Fixed by iterating through watch response.
   
   ---
   
   **DEBUG HELP NEEDED!!**
   
   Currently there is only one error in test file, which is the last test of 
t/plugin/key-auth.t. Normally in etcd v2, it would add 20 consumers and find 
the 13th. But in current implementation of etcd v3, the test would add 20 
consumers but only get first three of them, so it could not get the 13th. 
However, if I rerun the test, the test would get all 20 consumers and passed. 
   
   I think it might related to the implementation of waitdir between two 
versions, but I could not find the way to debug.
   
   I print `self.values_hash` at the start of each `sync_data`, and the log is 
[here](https://gist.github.com/Yiyiyimu/f98647847ef49440454c9fff8a4f7295), 
maybe it could be of help.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [apisix] Yiyiyimu edited a comment on pull request #2036: feature: support etcd v3, by mocking v2 API

2020-08-11 Thread GitBox


Yiyiyimu edited a comment on pull request #2036:
URL: https://github.com/apache/apisix/pull/2036#issuecomment-671440970


   It seems travis ci [passed in my personal 
repo](https://travis-ci.com/github/Yiyiyimu/incubator-apisix/builds/179139937), 
but github CI failed quite early. I'm a bit confused here.
   
   ---
   UPDATE:
   it seems travis ci is using etcd v3.4, but github actions is using etcd 
v3.2. working on multi-version support



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org