You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/27 08:06:07 UTC

[GitHub] [apisix-ingress-controller] chzhuo opened a new pull request #724: Fix: unmarshal apisix/upstream field nodes be null

chzhuo opened a new pull request #724:
URL: https://github.com/apache/apisix-ingress-controller/pull/724


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
   ![image](https://user-images.githubusercontent.com/10919124/139024175-ee48548b-a9e0-4ea3-8e43-d4325a6e087f.png)
   I found this error in apisix-ingress-controller log
   
   Controller sync the upstream from APISIX will set the `v1.Upstream.Nodes = nil ` when the  APISIX upstream json like `"nodes": {}`  
   
   
   we can repeat this:
   ```golang
   package main
   
   import (
   	"encoding/json"
   	"fmt"
   
   	v1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
   )
   
   func main() {
   	data := `{"node":{}}`
   	var ups v1.Upstream
   
   	err := json.Unmarshal([]byte(data), &ups)
   	if err != nil {
   		panic(err)
   	}
   	fmt.Println(ups.Nodes == nil) // output: true
   }
   ```
   Output should be `false`, but is `true`
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #724: fix: unmarshal apisix/upstream field nodes be null

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #724:
URL: https://github.com/apache/apisix-ingress-controller/pull/724#issuecomment-952819813


   Thanks!


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #724: fix: unmarshal apisix/upstream field nodes be null

Posted by GitBox <gi...@apache.org>.
tao12345666333 merged pull request #724:
URL: https://github.com/apache/apisix-ingress-controller/pull/724


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-ingress-controller] codecov-commenter commented on pull request #724: Fix: unmarshal apisix/upstream field nodes be null

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #724:
URL: https://github.com/apache/apisix-ingress-controller/pull/724#issuecomment-952648456


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#724](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4de1e05) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/2a732167c9e1b47a80f4b1fc89b4623bf669332e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2a73216) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 4de1e05 differs from pull request most recent head 973bd07. Consider uploading reports for the commit 973bd07 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #724      +/-   ##
   ==========================================
   - Coverage   32.61%   32.60%   -0.02%     
   ==========================================
     Files          65       64       -1     
     Lines        6500     6499       -1     
   ==========================================
   - Hits         2120     2119       -1     
     Misses       4136     4136              
     Partials      244      244              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2a73216...973bd07](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #724: Fix: unmarshal apisix/upstream field nodes be null

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #724:
URL: https://github.com/apache/apisix-ingress-controller/pull/724#issuecomment-952648456


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#724](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4de1e05) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/2a732167c9e1b47a80f4b1fc89b4623bf669332e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2a73216) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 4de1e05 differs from pull request most recent head 973bd07. Consider uploading reports for the commit 973bd07 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #724   +/-   ##
   =======================================
     Coverage   32.61%   32.61%           
   =======================================
     Files          65       65           
     Lines        6500     6500           
   =======================================
     Hits         2120     2120           
     Misses       4136     4136           
     Partials      244      244           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2a73216...973bd07](https://codecov.io/gh/apache/apisix-ingress-controller/pull/724?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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