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 2020/12/18 06:54:28 UTC

[GitHub] [apisix-dashboard] jinchizhou opened a new pull request #1067: [fix] error check to ensure path id doesn't conflict body id

jinchizhou opened a new pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x ] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   
   - Related issues
   https://github.com/apache/apisix-dashboard/issues/566
   ___
   ### Bugfix
   - Description
   Ensure Path ID doesn't conflict with Body ID
   - How to fix?
   Check both the IDs if they both exist
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] jinchizhou commented on pull request #1067: [fix] error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
jinchizhou commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-747908918


   Nope, I'll add some tests.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (101f400) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/cb1377cf9859392ee81ee60b3d4e623b1522be1e?el=desc) (cb1377c) will **decrease** coverage by `0.13%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   - Coverage   40.50%   40.36%   -0.14%     
   ==========================================
     Files          27       27              
     Lines        1627     1630       +3     
   ==========================================
   - Hits          659      658       -1     
   - Misses        873      875       +2     
   - Partials       95       97       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `47.42% <100.00%> (+0.82%)` | :arrow_up: |
   | [api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=) | `57.62% <0.00%> (-2.26%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [cb1377c...101f400](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-749604190


   > Not sure why these CI tests are blocking. I verified that these tests are failing locally even without my changes.
   
   I think it's due to https://github.com/apache/apisix-dashboard/pull/1067/files#diff-c45dc0115f67204842506d9284c9142195bbca6e06f449fe9fa367c7652e8c74R354-R358
   
   We should judge whether it is a string, and convert it to a string if it's not.
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] jinchizhou commented on a change in pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
jinchizhou commented on a change in pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#discussion_r546334896



##########
File path: api/internal/handler/route/route_test.go
##########
@@ -754,6 +754,20 @@ func TestRoute(t *testing.T) {
 	_, err = handler.Update(ctx)
 	assert.Nil(t, err)
 
+	//sleep
+	time.Sleep(time.Duration(100) * time.Millisecond)
+	
+	// check ID discrepancy on Update
+	errRoute := &UpdateInput{}
+	errRoute.ID = "2"
+	err = json.Unmarshal([]byte(reqBody), errRoute)
+	assert.Nil(t, err)
+	ctx.SetInput(errRoute)
+	ret, err = handler.Update(ctx)
+	assert.NotNil(t, err)
+	assert.EqualError(t, err, "ID on path (2) doesn't match ID on body (1)")
+	assert.Equal(t, http.StatusBadRequest, ret.(*data.SpecCodeResponse).StatusCode)
+

Review comment:
       I think this test should 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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (101f400) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/97c53973ffc84e488add40ac3fe139ba3dc43ba7?el=desc) (97c5397) will **decrease** coverage by `0.69%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   - Coverage   41.06%   40.36%   -0.70%     
   ==========================================
     Files          28       27       -1     
     Lines        1773     1630     -143     
   ==========================================
   - Hits          728      658      -70     
   + Misses        939      875      -64     
   + Partials      106       97       -9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `47.42% <100.00%> (+5.60%)` | :arrow_up: |
   | [api/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (ø)` | |
   | [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (ø)` | |
   | [api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [97c5397...8f799fc](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (7919242) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/06cb68f222adb3e52b8b9a5c62e406193dd10330?el=desc) (06cb68f) will **increase** coverage by `0.21%`.
   > The diff coverage is `62.50%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.86%   42.07%   +0.21%     
   ==========================================
     Files          29       30       +1     
     Lines        1825     1856      +31     
   ==========================================
   + Hits          764      781      +17     
   - Misses        953      965      +12     
   - Partials      108      110       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `80.00% <ø> (-0.13%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.08% <0.00%> (-0.58%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `29.21% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `19.49% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `59.25% <100.00%> (ø)` | |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `42.92% <100.00%> (+1.10%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [06cb68f...5eb0cbe](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen merged pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
nic-chen merged pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] jinchizhou commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
jinchizhou commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-749690818


   I am only converting to a string if the type is float. The body id are guarantee to be a string or a float I assume? I use a new variable so that shouldn't be breaking any existing test cases.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#discussion_r546313793



##########
File path: api/internal/handler/route/route_test.go
##########
@@ -754,6 +754,20 @@ func TestRoute(t *testing.T) {
 	_, err = handler.Update(ctx)
 	assert.Nil(t, err)
 
+	//sleep
+	time.Sleep(time.Duration(100) * time.Millisecond)
+	
+	// check ID discrepancy on Update
+	errRoute := &UpdateInput{}
+	errRoute.ID = "2"
+	err = json.Unmarshal([]byte(reqBody), errRoute)
+	assert.Nil(t, err)
+	ctx.SetInput(errRoute)
+	ret, err = handler.Update(ctx)
+	assert.NotNil(t, err)
+	assert.EqualError(t, err, "ID on path (2) doesn't match ID on body (1)")
+	assert.Equal(t, http.StatusBadRequest, ret.(*data.SpecCodeResponse).StatusCode)
+

Review comment:
       For historical reasons, id supports int and stringing.
   so we need test case for int ID in body.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (cbfcb50) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/78b4031d6899be672fcb41b29fcb40f9f898509b?el=desc) (78b4031) will **decrease** coverage by `0.32%`.
   > The diff coverage is `62.50%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   - Coverage   41.86%   41.54%   -0.33%     
   ==========================================
     Files          29       30       +1     
     Lines        1825     1856      +31     
   ==========================================
   + Hits          764      771       +7     
   - Misses        953      975      +22     
   - Partials      108      110       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `80.00% <ø> (-0.13%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.08% <0.00%> (-0.58%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `29.21% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `19.49% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `22.22% <100.00%> (ø)` | |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `42.92% <100.00%> (+1.10%)` | :arrow_up: |
   | [api/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9zY2hlbWEuZ28=) | | |
   | [api/filter/logging.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9sb2dnaW5nLmdv) | | |
   | [api/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | | |
   | [api/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9jb3JzLmdv) | | |
   | ... and [10 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [78b4031...cbfcb50](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (57d5695) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/78b4031d6899be672fcb41b29fcb40f9f898509b?el=desc) (78b4031) will **increase** coverage by `0.21%`.
   > The diff coverage is `62.50%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.86%   42.07%   +0.21%     
   ==========================================
     Files          29       30       +1     
     Lines        1825     1856      +31     
   ==========================================
   + Hits          764      781      +17     
   - Misses        953      965      +12     
   - Partials      108      110       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `80.00% <ø> (-0.13%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.08% <0.00%> (-0.58%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `29.21% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `19.49% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `59.25% <100.00%> (ø)` | |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `42.92% <100.00%> (+1.10%)` | :arrow_up: |
   | [api/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | | |
   | [api/filter/recover.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9yZWNvdmVyLmdv) | | |
   | [api/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | | |
   | [api/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9zY2hlbWEuZ28=) | | |
   | ... and [10 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [78b4031...7919242](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#discussion_r546377122



##########
File path: api/internal/handler/route/route_test.go
##########
@@ -408,352 +408,380 @@ func TestRoute(t *testing.T) {
 	//update
 	route2 := &UpdateInput{}
 	route2.ID = "1"
+	reqBodyCopy := `"name": "aaaa",
+	"uri": "/index.html",
+	"hosts": ["foo.com", "*.bar.com"],
+	"remote_addrs": ["127.0.0.0/8"],
+	"methods": ["PUT", "GET"],
+	"labels": {
+		"l1": "v1",
+		"l2": "v2"
+	},
+	"upstream": {
+		"type": "roundrobin",
+		"nodes": [{
+			"host": "www.a.com",
+			"port": 80,
+			"weight": 1
+		}]
+	},
+	"script":{
+		"rule":{
+			"root":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+			"451106f8-560c-43a4-acf2-2a6ed0ea57b8":[
+				[
+					"code == 403",
+					"b93d622c-92ef-48b4-b6bb-57e1ce893ee3"
+				],
+				[
+					"",
+					"988ef5c2-c896-4606-a666-3d4cbe24a731"
+				]
+			]
+		},
+		"conf":{
+			"451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
+				"name":"uri-blocker",
+				"conf":{
+					"block_rules":[
+						"root.exe",
+						"root.m+"
+					],
+					"rejected_code":403
+				}
+			},
+			"988ef5c2-c896-4606-a666-3d4cbe24a731":{
+				"name":"kafka-logger",
+				"conf":{
+					"batch_max_size":1000,
+					"broker_list":{
+  
+					},
+					"buffer_duration":60,
+					"inactive_timeout":5,
+					"include_req_body":false,
+					"kafka_topic":"1",
+					"key":"2",
+					"max_retry_count":0,
+					"name":"kafka logger",
+					"retry_delay":1,
+					"timeout":3
+				}
+			},
+			"b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
+				"name":"fault-injection",
+				"conf":{
+					"abort":{
+						"body":"200",
+						"http_status":300
+					},
+					"delay":{
+						"duration":500
+					}
+				}
+			}
+		},
+		"chart":{
+			"hovered":{
+  
+			},
+			"links":{
+				"3a110c30-d6f3-40b1-a8ac-b828cfaa2489":{
+					"from":{
+						"nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+						"portId":"port3"
+					},
+					"id":"3a110c30-d6f3-40b1-a8ac-b828cfaa2489",
+					"to":{
+						"nodeId":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+						"portId":"port1"
+					}
+				},
+				"c1958993-c1ef-44b1-bb32-7fc6f34870c2":{
+					"from":{
+						"nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+						"portId":"port2"
+					},
+					"id":"c1958993-c1ef-44b1-bb32-7fc6f34870c2",
+					"to":{
+						"nodeId":"988ef5c2-c896-4606-a666-3d4cbe24a731",
+						"portId":"port1"
+					}
+				},
+				"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23":{
+					"from":{
+						"nodeId":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+						"portId":"port2"
+					},
+					"id":"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23",
+					"to":{
+						"nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+						"portId":"port1"
+					}
+				}
+			},
+			"nodes":{
+				"3365eca3-4bc8-4769-bab3-1485dfd6a43c":{
+					"id":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":107,
+								"y":0
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":92,
+								"y":96
+							},
+							"properties":{
+								"value":"no"
+							},
+							"type":"output"
+						},
+						"port3":{
+							"id":"port3",
+							"position":{
+								"x":122,
+								"y":96
+							},
+							"properties":{
+								"value":"yes"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":750.2627969928922,
+						"y":301.0370335799397
+					},
+					"properties":{
+						"customData":{
+							"name":"code == 403",
+							"type":1
+						}
+					},
+					"size":{
+						"height":96,
+						"width":214
+					},
+					"type":"判断条件"
+				},
+				"451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
+					"id":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":100,
+								"y":0
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":100,
+								"y":96
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":741.5684544145346,
+						"y":126.75879247285502
+					},
+					"properties":{
+						"customData":{
+							"data":{
+								"block_rules":[
+									"root.exe",
+									"root.m+"
+								],
+								"rejected_code":403
+							},
+							"name":"uri-blocker",
+							"type":0
+						}
+					},
+					"size":{
+						"height":96,
+						"width":201
+					},
+					"type":"uri-blocker"
+				},
+				"988ef5c2-c896-4606-a666-3d4cbe24a731":{
+					"id":"988ef5c2-c896-4606-a666-3d4cbe24a731",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":106,
+								"y":0
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":106,
+								"y":96
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":607.9687500000001,
+						"y":471.17788461538447
+					},
+					"properties":{
+						"customData":{
+							"data":{
+								"batch_max_size":1000,
+								"broker_list":{
+  
+								},
+								"buffer_duration":60,
+								"inactive_timeout":5,
+								"include_req_body":false,
+								"kafka_topic":"1",
+								"key":"2",
+								"max_retry_count":0,
+								"name":"kafka logger",
+								"retry_delay":1,
+								"timeout":3
+							},
+							"name":"kafka-logger",
+							"type":0
+						}
+					},
+					"size":{
+						"height":96,
+						"width":212
+					},
+					"type":"kafka-logger"
+				},
+				"b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
+					"id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":110,
+								"y":0
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":110,
+								"y":96
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":988.9074986362261,
+						"y":478.62041800736495
+					},
+					"properties":{
+						"customData":{
+							"data":{
+								"abort":{
+									"body":"200",
+									"http_status":300
+								},
+								"delay":{
+									"duration":500
+								}
+							},
+							"name":"fault-injection",
+							"type":0
+						}
+					},
+					"size":{
+						"height":96,
+						"width":219
+					},
+					"type":"fault-injection"
+				}
+			},
+			"offset":{
+				"x":-376.83,
+				"y":87.98
+			},
+			"scale":0.832,
+			"selected":{
+				"id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+				"type":"node"
+			}
+		}
+	}
+  }`
 	reqBody = `{
 	  "id": "1",
-	  "name": "aaaa",
-	  "uri": "/index.html",
-	  "hosts": ["foo.com", "*.bar.com"],
-	  "remote_addrs": ["127.0.0.0/8"],
-	  "methods": ["PUT", "GET"],
-	  "labels": {
-	      "l1": "v1",
-	      "l2": "v2"
-      },
-	  "upstream": {
-	      "type": "roundrobin",
-	      "nodes": [{
-	          "host": "www.a.com",
-	          "port": 80,
-	          "weight": 1
-	      }]
-	  },
-	  "script":{
-	      "rule":{
-	          "root":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
-	          "451106f8-560c-43a4-acf2-2a6ed0ea57b8":[
-	              [
-	                  "code == 403",
-	                  "b93d622c-92ef-48b4-b6bb-57e1ce893ee3"
-	              ],
-	              [
-	                  "",
-	                  "988ef5c2-c896-4606-a666-3d4cbe24a731"
-	              ]
-	          ]
-	      },
-	      "conf":{
-	          "451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
-	              "name":"uri-blocker",
-	              "conf":{
-	                  "block_rules":[
-	                      "root.exe",
-	                      "root.m+"
-	                  ],
-	                  "rejected_code":403
-	              }
-	          },
-	          "988ef5c2-c896-4606-a666-3d4cbe24a731":{
-	              "name":"kafka-logger",
-	              "conf":{
-	                  "batch_max_size":1000,
-	                  "broker_list":{
-	
-	                  },
-	                  "buffer_duration":60,
-	                  "inactive_timeout":5,
-	                  "include_req_body":false,
-	                  "kafka_topic":"1",
-	                  "key":"2",
-	                  "max_retry_count":0,
-	                  "name":"kafka logger",
-	                  "retry_delay":1,
-	                  "timeout":3
-	              }
-	          },
-	          "b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
-	              "name":"fault-injection",
-	              "conf":{
-	                  "abort":{
-	                      "body":"200",
-	                      "http_status":300
-	                  },
-	                  "delay":{
-	                      "duration":500
-	                  }
-	              }
-	          }
-	      },
-	      "chart":{
-	          "hovered":{
-	
-	          },
-	          "links":{
-	              "3a110c30-d6f3-40b1-a8ac-b828cfaa2489":{
-	                  "from":{
-	                      "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                      "portId":"port3"
-	                  },
-	                  "id":"3a110c30-d6f3-40b1-a8ac-b828cfaa2489",
-	                  "to":{
-	                      "nodeId":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
-	                      "portId":"port1"
-	                  }
-	              },
-	              "c1958993-c1ef-44b1-bb32-7fc6f34870c2":{
-	                  "from":{
-	                      "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                      "portId":"port2"
-	                  },
-	                  "id":"c1958993-c1ef-44b1-bb32-7fc6f34870c2",
-	                  "to":{
-	                      "nodeId":"988ef5c2-c896-4606-a666-3d4cbe24a731",
-	                      "portId":"port1"
-	                  }
-	              },
-	              "f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23":{
-	                  "from":{
-	                      "nodeId":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
-	                      "portId":"port2"
-	                  },
-	                  "id":"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23",
-	                  "to":{
-	                      "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                      "portId":"port1"
-	                  }
-	              }
-	          },
-	          "nodes":{
-	              "3365eca3-4bc8-4769-bab3-1485dfd6a43c":{
-	                  "id":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":107,
-	                              "y":0
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":92,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "value":"no"
-	                          },
-	                          "type":"output"
-	                      },
-	                      "port3":{
-	                          "id":"port3",
-	                          "position":{
-	                              "x":122,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "value":"yes"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":750.2627969928922,
-	                      "y":301.0370335799397
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "name":"code == 403",
-	                          "type":1
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":214
-	                  },
-	                  "type":"判断条件"
-	              },
-	              "451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
-	                  "id":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":100,
-	                              "y":0
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":100,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":741.5684544145346,
-	                      "y":126.75879247285502
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "data":{
-	                              "block_rules":[
-	                                  "root.exe",
-	                                  "root.m+"
-	                              ],
-	                              "rejected_code":403
-	                          },
-	                          "name":"uri-blocker",
-	                          "type":0
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":201
-	                  },
-	                  "type":"uri-blocker"
-	              },
-	              "988ef5c2-c896-4606-a666-3d4cbe24a731":{
-	                  "id":"988ef5c2-c896-4606-a666-3d4cbe24a731",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":106,
-	                              "y":0
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":106,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":607.9687500000001,
-	                      "y":471.17788461538447
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "data":{
-	                              "batch_max_size":1000,
-	                              "broker_list":{
-	
-	                              },
-	                              "buffer_duration":60,
-	                              "inactive_timeout":5,
-	                              "include_req_body":false,
-	                              "kafka_topic":"1",
-	                              "key":"2",
-	                              "max_retry_count":0,
-	                              "name":"kafka logger",
-	                              "retry_delay":1,
-	                              "timeout":3
-	                          },
-	                          "name":"kafka-logger",
-	                          "type":0
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":212
-	                  },
-	                  "type":"kafka-logger"
-	              },
-	              "b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
-	                  "id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":110,
-	                              "y":0
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":110,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":988.9074986362261,
-	                      "y":478.62041800736495
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "data":{
-	                              "abort":{
-	                                  "body":"200",
-	                                  "http_status":300
-	                              },
-	                              "delay":{
-	                                  "duration":500
-	                              }
-	                          },
-	                          "name":"fault-injection",
-	                          "type":0
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":219
-	                  },
-	                  "type":"fault-injection"
-	              }
-	          },
-	          "offset":{
-	              "x":-376.83,
-	              "y":87.98
-	          },
-	          "scale":0.832,
-	          "selected":{
-	              "id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
-	              "type":"node"
-	          }
-	      }
-	  }
-	}`
+	  ` + reqBodyCopy

Review comment:
       we could use a simple route config
   ```go
   reqBody = `{
       "id": "1",
       "uri": "/index.html",
       "upstream": {
           "type": "roundrobin",
           "nodes": [{
               "host": "www.a.com",
               "port": 80,
               "weight": 1
           }]
       }
   }`
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (dc3398b) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **decrease** coverage by `0.04%`.
   > The diff coverage is `28.57%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   - Coverage   41.06%   41.01%   -0.05%     
   ==========================================
     Files          28       28              
     Lines        1773     1780       +7     
   ==========================================
   + Hits          728      730       +2     
   - Misses        939      942       +3     
   - Partials      106      108       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `41.40% <28.57%> (-0.41%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [46bf1ef...dc3398b](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (ce24f1c) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/cb1377cf9859392ee81ee60b3d4e623b1522be1e?el=desc) (cb1377c) will **increase** coverage by `0.10%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   40.50%   40.61%   +0.10%     
   ==========================================
     Files          27       27              
     Lines        1627     1630       +3     
   ==========================================
   + Hits          659      662       +3     
     Misses        873      873              
     Partials       95       95              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `47.42% <100.00%> (+0.82%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [cb1377c...ce24f1c](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] jinchizhou commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
jinchizhou commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748554989


   FYI, I'm unable to request reviews


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
nic-chen commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-751327560


   merged. thanks @jinchizhou 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
nic-chen commented on a change in pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#discussion_r546378031



##########
File path: api/internal/handler/route/route_test.go
##########
@@ -408,352 +408,380 @@ func TestRoute(t *testing.T) {
 	//update
 	route2 := &UpdateInput{}
 	route2.ID = "1"
+	reqBodyCopy := `"name": "aaaa",
+	"uri": "/index.html",
+	"hosts": ["foo.com", "*.bar.com"],
+	"remote_addrs": ["127.0.0.0/8"],
+	"methods": ["PUT", "GET"],
+	"labels": {
+		"l1": "v1",
+		"l2": "v2"
+	},
+	"upstream": {
+		"type": "roundrobin",
+		"nodes": [{
+			"host": "www.a.com",
+			"port": 80,
+			"weight": 1
+		}]
+	},
+	"script":{
+		"rule":{
+			"root":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+			"451106f8-560c-43a4-acf2-2a6ed0ea57b8":[
+				[
+					"code == 403",
+					"b93d622c-92ef-48b4-b6bb-57e1ce893ee3"
+				],
+				[
+					"",
+					"988ef5c2-c896-4606-a666-3d4cbe24a731"
+				]
+			]
+		},
+		"conf":{
+			"451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
+				"name":"uri-blocker",
+				"conf":{
+					"block_rules":[
+						"root.exe",
+						"root.m+"
+					],
+					"rejected_code":403
+				}
+			},
+			"988ef5c2-c896-4606-a666-3d4cbe24a731":{
+				"name":"kafka-logger",
+				"conf":{
+					"batch_max_size":1000,
+					"broker_list":{
+  
+					},
+					"buffer_duration":60,
+					"inactive_timeout":5,
+					"include_req_body":false,
+					"kafka_topic":"1",
+					"key":"2",
+					"max_retry_count":0,
+					"name":"kafka logger",
+					"retry_delay":1,
+					"timeout":3
+				}
+			},
+			"b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
+				"name":"fault-injection",
+				"conf":{
+					"abort":{
+						"body":"200",
+						"http_status":300
+					},
+					"delay":{
+						"duration":500
+					}
+				}
+			}
+		},
+		"chart":{
+			"hovered":{
+  
+			},
+			"links":{
+				"3a110c30-d6f3-40b1-a8ac-b828cfaa2489":{
+					"from":{
+						"nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+						"portId":"port3"
+					},
+					"id":"3a110c30-d6f3-40b1-a8ac-b828cfaa2489",
+					"to":{
+						"nodeId":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+						"portId":"port1"
+					}
+				},
+				"c1958993-c1ef-44b1-bb32-7fc6f34870c2":{
+					"from":{
+						"nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+						"portId":"port2"
+					},
+					"id":"c1958993-c1ef-44b1-bb32-7fc6f34870c2",
+					"to":{
+						"nodeId":"988ef5c2-c896-4606-a666-3d4cbe24a731",
+						"portId":"port1"
+					}
+				},
+				"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23":{
+					"from":{
+						"nodeId":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+						"portId":"port2"
+					},
+					"id":"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23",
+					"to":{
+						"nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+						"portId":"port1"
+					}
+				}
+			},
+			"nodes":{
+				"3365eca3-4bc8-4769-bab3-1485dfd6a43c":{
+					"id":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":107,
+								"y":0
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":92,
+								"y":96
+							},
+							"properties":{
+								"value":"no"
+							},
+							"type":"output"
+						},
+						"port3":{
+							"id":"port3",
+							"position":{
+								"x":122,
+								"y":96
+							},
+							"properties":{
+								"value":"yes"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":750.2627969928922,
+						"y":301.0370335799397
+					},
+					"properties":{
+						"customData":{
+							"name":"code == 403",
+							"type":1
+						}
+					},
+					"size":{
+						"height":96,
+						"width":214
+					},
+					"type":"判断条件"
+				},
+				"451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
+					"id":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":100,
+								"y":0
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":100,
+								"y":96
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":741.5684544145346,
+						"y":126.75879247285502
+					},
+					"properties":{
+						"customData":{
+							"data":{
+								"block_rules":[
+									"root.exe",
+									"root.m+"
+								],
+								"rejected_code":403
+							},
+							"name":"uri-blocker",
+							"type":0
+						}
+					},
+					"size":{
+						"height":96,
+						"width":201
+					},
+					"type":"uri-blocker"
+				},
+				"988ef5c2-c896-4606-a666-3d4cbe24a731":{
+					"id":"988ef5c2-c896-4606-a666-3d4cbe24a731",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":106,
+								"y":0
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":106,
+								"y":96
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":607.9687500000001,
+						"y":471.17788461538447
+					},
+					"properties":{
+						"customData":{
+							"data":{
+								"batch_max_size":1000,
+								"broker_list":{
+  
+								},
+								"buffer_duration":60,
+								"inactive_timeout":5,
+								"include_req_body":false,
+								"kafka_topic":"1",
+								"key":"2",
+								"max_retry_count":0,
+								"name":"kafka logger",
+								"retry_delay":1,
+								"timeout":3
+							},
+							"name":"kafka-logger",
+							"type":0
+						}
+					},
+					"size":{
+						"height":96,
+						"width":212
+					},
+					"type":"kafka-logger"
+				},
+				"b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
+					"id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+					"orientation":0,
+					"ports":{
+						"port1":{
+							"id":"port1",
+							"position":{
+								"x":110,
+								"y":0
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"input"
+						},
+						"port2":{
+							"id":"port2",
+							"position":{
+								"x":110,
+								"y":96
+							},
+							"properties":{
+								"custom":"property"
+							},
+							"type":"output"
+						}
+					},
+					"position":{
+						"x":988.9074986362261,
+						"y":478.62041800736495
+					},
+					"properties":{
+						"customData":{
+							"data":{
+								"abort":{
+									"body":"200",
+									"http_status":300
+								},
+								"delay":{
+									"duration":500
+								}
+							},
+							"name":"fault-injection",
+							"type":0
+						}
+					},
+					"size":{
+						"height":96,
+						"width":219
+					},
+					"type":"fault-injection"
+				}
+			},
+			"offset":{
+				"x":-376.83,
+				"y":87.98
+			},
+			"scale":0.832,
+			"selected":{
+				"id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
+				"type":"node"
+			}
+		}
+	}
+  }`
 	reqBody = `{
 	  "id": "1",
-	  "name": "aaaa",
-	  "uri": "/index.html",
-	  "hosts": ["foo.com", "*.bar.com"],
-	  "remote_addrs": ["127.0.0.0/8"],
-	  "methods": ["PUT", "GET"],
-	  "labels": {
-	      "l1": "v1",
-	      "l2": "v2"
-      },
-	  "upstream": {
-	      "type": "roundrobin",
-	      "nodes": [{
-	          "host": "www.a.com",
-	          "port": 80,
-	          "weight": 1
-	      }]
-	  },
-	  "script":{
-	      "rule":{
-	          "root":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
-	          "451106f8-560c-43a4-acf2-2a6ed0ea57b8":[
-	              [
-	                  "code == 403",
-	                  "b93d622c-92ef-48b4-b6bb-57e1ce893ee3"
-	              ],
-	              [
-	                  "",
-	                  "988ef5c2-c896-4606-a666-3d4cbe24a731"
-	              ]
-	          ]
-	      },
-	      "conf":{
-	          "451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
-	              "name":"uri-blocker",
-	              "conf":{
-	                  "block_rules":[
-	                      "root.exe",
-	                      "root.m+"
-	                  ],
-	                  "rejected_code":403
-	              }
-	          },
-	          "988ef5c2-c896-4606-a666-3d4cbe24a731":{
-	              "name":"kafka-logger",
-	              "conf":{
-	                  "batch_max_size":1000,
-	                  "broker_list":{
-	
-	                  },
-	                  "buffer_duration":60,
-	                  "inactive_timeout":5,
-	                  "include_req_body":false,
-	                  "kafka_topic":"1",
-	                  "key":"2",
-	                  "max_retry_count":0,
-	                  "name":"kafka logger",
-	                  "retry_delay":1,
-	                  "timeout":3
-	              }
-	          },
-	          "b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
-	              "name":"fault-injection",
-	              "conf":{
-	                  "abort":{
-	                      "body":"200",
-	                      "http_status":300
-	                  },
-	                  "delay":{
-	                      "duration":500
-	                  }
-	              }
-	          }
-	      },
-	      "chart":{
-	          "hovered":{
-	
-	          },
-	          "links":{
-	              "3a110c30-d6f3-40b1-a8ac-b828cfaa2489":{
-	                  "from":{
-	                      "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                      "portId":"port3"
-	                  },
-	                  "id":"3a110c30-d6f3-40b1-a8ac-b828cfaa2489",
-	                  "to":{
-	                      "nodeId":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
-	                      "portId":"port1"
-	                  }
-	              },
-	              "c1958993-c1ef-44b1-bb32-7fc6f34870c2":{
-	                  "from":{
-	                      "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                      "portId":"port2"
-	                  },
-	                  "id":"c1958993-c1ef-44b1-bb32-7fc6f34870c2",
-	                  "to":{
-	                      "nodeId":"988ef5c2-c896-4606-a666-3d4cbe24a731",
-	                      "portId":"port1"
-	                  }
-	              },
-	              "f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23":{
-	                  "from":{
-	                      "nodeId":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
-	                      "portId":"port2"
-	                  },
-	                  "id":"f9c42bf6-c8aa-4e86-8498-8dfbc5c53c23",
-	                  "to":{
-	                      "nodeId":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                      "portId":"port1"
-	                  }
-	              }
-	          },
-	          "nodes":{
-	              "3365eca3-4bc8-4769-bab3-1485dfd6a43c":{
-	                  "id":"3365eca3-4bc8-4769-bab3-1485dfd6a43c",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":107,
-	                              "y":0
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":92,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "value":"no"
-	                          },
-	                          "type":"output"
-	                      },
-	                      "port3":{
-	                          "id":"port3",
-	                          "position":{
-	                              "x":122,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "value":"yes"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":750.2627969928922,
-	                      "y":301.0370335799397
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "name":"code == 403",
-	                          "type":1
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":214
-	                  },
-	                  "type":"判断条件"
-	              },
-	              "451106f8-560c-43a4-acf2-2a6ed0ea57b8":{
-	                  "id":"451106f8-560c-43a4-acf2-2a6ed0ea57b8",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":100,
-	                              "y":0
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":100,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":741.5684544145346,
-	                      "y":126.75879247285502
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "data":{
-	                              "block_rules":[
-	                                  "root.exe",
-	                                  "root.m+"
-	                              ],
-	                              "rejected_code":403
-	                          },
-	                          "name":"uri-blocker",
-	                          "type":0
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":201
-	                  },
-	                  "type":"uri-blocker"
-	              },
-	              "988ef5c2-c896-4606-a666-3d4cbe24a731":{
-	                  "id":"988ef5c2-c896-4606-a666-3d4cbe24a731",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":106,
-	                              "y":0
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":106,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":607.9687500000001,
-	                      "y":471.17788461538447
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "data":{
-	                              "batch_max_size":1000,
-	                              "broker_list":{
-	
-	                              },
-	                              "buffer_duration":60,
-	                              "inactive_timeout":5,
-	                              "include_req_body":false,
-	                              "kafka_topic":"1",
-	                              "key":"2",
-	                              "max_retry_count":0,
-	                              "name":"kafka logger",
-	                              "retry_delay":1,
-	                              "timeout":3
-	                          },
-	                          "name":"kafka-logger",
-	                          "type":0
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":212
-	                  },
-	                  "type":"kafka-logger"
-	              },
-	              "b93d622c-92ef-48b4-b6bb-57e1ce893ee3":{
-	                  "id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
-	                  "orientation":0,
-	                  "ports":{
-	                      "port1":{
-	                          "id":"port1",
-	                          "position":{
-	                              "x":110,
-	                              "y":0
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"input"
-	                      },
-	                      "port2":{
-	                          "id":"port2",
-	                          "position":{
-	                              "x":110,
-	                              "y":96
-	                          },
-	                          "properties":{
-	                              "custom":"property"
-	                          },
-	                          "type":"output"
-	                      }
-	                  },
-	                  "position":{
-	                      "x":988.9074986362261,
-	                      "y":478.62041800736495
-	                  },
-	                  "properties":{
-	                      "customData":{
-	                          "data":{
-	                              "abort":{
-	                                  "body":"200",
-	                                  "http_status":300
-	                              },
-	                              "delay":{
-	                                  "duration":500
-	                              }
-	                          },
-	                          "name":"fault-injection",
-	                          "type":0
-	                      }
-	                  },
-	                  "size":{
-	                      "height":96,
-	                      "width":219
-	                  },
-	                  "type":"fault-injection"
-	              }
-	          },
-	          "offset":{
-	              "x":-376.83,
-	              "y":87.98
-	          },
-	          "scale":0.832,
-	          "selected":{
-	              "id":"b93d622c-92ef-48b4-b6bb-57e1ce893ee3",
-	              "type":"node"
-	          }
-	      }
-	  }
-	}`
+	  ` + reqBodyCopy
 
 	err = json.Unmarshal([]byte(reqBody), route2)
 	assert.Nil(t, err)
 	ctx.SetInput(route2)
 	_, err = handler.Update(ctx)
 	assert.Nil(t, err)
 
+	//sleep
+	time.Sleep(time.Duration(100) * time.Millisecond)
+	
+	// check ID discrepancy on Update
+	errRoute := &UpdateInput{}
+	errRoute.ID = "2"
+	err = json.Unmarshal([]byte(reqBody), errRoute)
+	assert.Nil(t, err)
+	ctx.SetInput(errRoute)
+	ret, err = handler.Update(ctx)
+	assert.NotNil(t, err)
+	assert.EqualError(t, err, "ID on path (2) doesn't match ID on body (1)")
+	assert.Equal(t, http.StatusBadRequest, ret.(*data.SpecCodeResponse).StatusCode)
+
+	reqBodyErr := `{
+		"id": 1,
+		` + reqBodyCopy
+	errRoute2 := &UpdateInput{}
+	errRoute2.ID = "2"
+	err = json.Unmarshal([]byte(reqBodyErr), errRoute2)
+	assert.Nil(t, err)
+	ctx.SetInput(errRoute2)
+	ret, err = handler.Update(ctx)
+	assert.NotNil(t, err)
+	assert.EqualError(t, err, "ID on path (2) doesn't match ID on body (%!s(float64=1))")
+	assert.Equal(t, http.StatusBadRequest, ret.(*data.SpecCodeResponse).StatusCode)
+

Review comment:
       we should have a test case for IDs are same but ID in body is int:
   ```sh
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "id": 1,
       "uri": "/index.html",
       "upstream": {
           "type": "roundrobin",
           "nodes": [{
   			"host": "www.a.com",
   			"port": 80,
   			"weight": 1
   		}]
       }
   }'
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (fcc64d3) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **increase** coverage by `0.17%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.06%   41.23%   +0.17%     
   ==========================================
     Files          28       28              
     Lines        1773     1780       +7     
   ==========================================
   + Hits          728      734       +6     
   - Misses        939      940       +1     
     Partials      106      106              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `43.61% <100.00%> (+1.79%)` | :arrow_up: |
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `78.57% <0.00%> (-0.65%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [46bf1ef...fcc64d3](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] jinchizhou commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
jinchizhou commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-749265810


   Not sure why these CI tests are blocking. I verified that these tests are failing locally even without my changes. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (8ae95d4) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **increase** coverage by `0.23%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.06%   41.29%   +0.23%     
   ==========================================
     Files          28       28              
     Lines        1773     1780       +7     
   ==========================================
   + Hits          728      735       +7     
     Misses        939      939              
     Partials      106      106              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `43.61% <100.00%> (+1.79%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [46bf1ef...8ae95d4](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (5eb0cbe) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/06cb68f222adb3e52b8b9a5c62e406193dd10330?el=desc) (06cb68f) will **increase** coverage by `0.16%`.
   > The diff coverage is `62.50%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.86%   42.02%   +0.16%     
   ==========================================
     Files          29       30       +1     
     Lines        1825     1856      +31     
   ==========================================
   + Hits          764      780      +16     
   - Misses        953      966      +13     
   - Partials      108      110       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.37% <ø> (-0.75%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.08% <0.00%> (-0.58%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `29.21% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `19.49% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `59.25% <100.00%> (ø)` | |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `42.92% <100.00%> (+1.10%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [06cb68f...5eb0cbe](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (c066704) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/78b4031d6899be672fcb41b29fcb40f9f898509b?el=desc) (78b4031) will **increase** coverage by `0.22%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.86%   42.08%   +0.22%     
   ==========================================
     Files          29       29              
     Lines        1825     1832       +7     
   ==========================================
   + Hits          764      771       +7     
     Misses        953      953              
     Partials      108      108              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `43.61% <100.00%> (+1.79%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [78b4031...c066704](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (fb85672) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **increase** coverage by `0.23%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.06%   41.29%   +0.23%     
   ==========================================
     Files          28       28              
     Lines        1773     1780       +7     
   ==========================================
   + Hits          728      735       +7     
     Misses        939      939              
     Partials      106      106              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `43.61% <100.00%> (+1.79%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [46bf1ef...fb85672](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] jinchizhou commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
jinchizhou commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748542416


   @nic-chen could you please take a look 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.

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



[GitHub] [apisix-dashboard] membphis commented on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-750035113


   @nic-chen need your 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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (1b593af) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/78b4031d6899be672fcb41b29fcb40f9f898509b?el=desc) (78b4031) will **decrease** coverage by `0.03%`.
   > The diff coverage is `40.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   - Coverage   41.86%   41.82%   -0.04%     
   ==========================================
     Files          29       29              
     Lines        1825     1829       +4     
   ==========================================
   + Hits          764      765       +1     
   - Misses        953      954       +1     
   - Partials      108      110       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `80.00% <ø> (-0.13%)` | :arrow_down: |
   | [api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv) | `27.08% <0.00%> (-0.58%)` | :arrow_down: |
   | [api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==) | `29.21% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=) | `19.49% <0.00%> (-0.34%)` | :arrow_down: |
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `42.92% <100.00%> (+1.10%)` | :arrow_up: |
   | [api/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | | |
   | [api/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9zY2hlbWEuZ28=) | | |
   | [api/filter/recover.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9yZWNvdmVyLmdv) | | |
   | [api/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9yZXF1ZXN0X2lkLmdv) | | |
   | [api/filter/logging.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9sb2dnaW5nLmdv) | | |
   | ... and [8 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [78b4031...1b593af](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1067: fix: error check to ensure path id doesn't conflict body id

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1067:
URL: https://github.com/apache/apisix-dashboard/pull/1067#issuecomment-748516852


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=h1) Report
   > Merging [#1067](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=desc) (f5c92d8) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **increase** coverage by `0.11%`.
   > The diff coverage is `71.42%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1067      +/-   ##
   ==========================================
   + Coverage   41.06%   41.17%   +0.11%     
   ==========================================
     Files          28       28              
     Lines        1773     1780       +7     
   ==========================================
   + Hits          728      733       +5     
   - Misses        939      940       +1     
   - Partials      106      107       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1067/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `42.73% <71.42%> (+0.91%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=footer). Last update [46bf1ef...f5c92d8](https://codecov.io/gh/apache/apisix-dashboard/pull/1067?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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:
users@infra.apache.org