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/11/05 13:12:43 UTC

[GitHub] [apisix-dashboard] nic-chen opened a new pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

nic-chen opened a new pull request #704:
URL: https://github.com/apache/apisix-dashboard/pull/704


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   
   - fix issues
   #695
   #690
   
   
   
   
   


----------------------------------------------------------------
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] juzhiyuan merged pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   


----------------------------------------------------------------
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] juzhiyuan commented on pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   ![image](https://user-images.githubusercontent.com/2106987/98261195-24b52d00-1fbf-11eb-8c34-1d145ad8e187.png)
   
   It should be `close #xxx, close #xxx`, one number with one keyword.


----------------------------------------------------------------
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 #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/704?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`v2.0@88a6761`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/704/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/704?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##             v2.0     #704   +/-   ##
   =======================================
     Coverage        ?   42.97%           
   =======================================
     Files           ?       18           
     Lines           ?     1217           
     Branches        ?        0           
   =======================================
     Hits            ?      523           
     Misses          ?      605           
     Partials        ?       89           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/704?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/704?src=pr&el=footer). Last update [88a6761...1d4672e](https://codecov.io/gh/apache/apisix-dashboard/pull/704?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 #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   # [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/704?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`v2.0@88a6761`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/704/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/704?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##             v2.0     #704   +/-   ##
   =======================================
     Coverage        ?   42.89%           
   =======================================
     Files           ?       18           
     Lines           ?     1217           
     Branches        ?        0           
   =======================================
     Hits            ?      522           
     Misses          ?      606           
     Partials        ?       89           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/704?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/704?src=pr&el=footer). Last update [88a6761...8f76782](https://codecov.io/gh/apache/apisix-dashboard/pull/704?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] membphis commented on a change in pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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



##########
File path: api/internal/handler/route/route.go
##########
@@ -309,7 +309,7 @@ func (h *Handler) Update(c droplet.Context) (interface{}, error) {
 		script, _ := h.scriptStore.Get(input.Route.ID)
 		if script != nil {
 			if err := h.scriptStore.BatchDelete(c.Context(), strings.Split(input.Route.ID, ",")); err != nil {
-				log.Warnf("script %s failed", input.Route.ID)
+				log.Warnf("delete script %s failed", input.Route.ID)

Review comment:
       I means do we should write the `err` into the error log, the error message is important.




----------------------------------------------------------------
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] juzhiyuan edited a comment on pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on pull request #704:
URL: https://github.com/apache/apisix-dashboard/pull/704#issuecomment-722453162


   ![image](https://user-images.githubusercontent.com/2106987/98261335-4f9f8100-1fbf-11eb-8db3-56fc04ec789e.png)
   
   This PR is connected with issues successfully only when there has an underline.


----------------------------------------------------------------
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] juzhiyuan commented on pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   ![image](https://user-images.githubusercontent.com/2106987/98261335-4f9f8100-1fbf-11eb-8db3-56fc04ec789e.png)
   
   This PR is connected with issues successfully when there has the underline.


----------------------------------------------------------------
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 a change in pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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



##########
File path: api/internal/handler/route/route.go
##########
@@ -304,6 +304,14 @@ func (h *Handler) Update(c droplet.Context) (interface{}, error) {
 				return handler.SpecCodeResponse(err), err
 			}
 		}
+	} else {
+		//remove exists script
+		script, _ := h.scriptStore.Get(input.Route.ID)
+		if script != nil {
+			if err := h.scriptStore.BatchDelete(c.Context(), strings.Split(input.Route.ID, ",")); err != nil {
+				log.Warnf("try to delete script %s again", input.Route.ID)

Review comment:
       should we write the error message to log file?




----------------------------------------------------------------
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 #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   > ![image](https://user-images.githubusercontent.com/2106987/98261335-4f9f8100-1fbf-11eb-8db3-56fc04ec789e.png)
   > 
   > This PR is connected with issues successfully only when there has an underline.
   
   thanks for tips


----------------------------------------------------------------
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] juzhiyuan edited a comment on pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on pull request #704:
URL: https://github.com/apache/apisix-dashboard/pull/704#issuecomment-722453162


   ![image](https://user-images.githubusercontent.com/2106987/98261335-4f9f8100-1fbf-11eb-8db3-56fc04ec789e.png)
   
   This PR is connected with issues successfully when there has an underline.


----------------------------------------------------------------
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 #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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



##########
File path: api/internal/handler/route/route.go
##########
@@ -304,6 +304,14 @@ func (h *Handler) Update(c droplet.Context) (interface{}, error) {
 				return handler.SpecCodeResponse(err), err
 			}
 		}
+	} else {
+		//remove exists script
+		script, _ := h.scriptStore.Get(input.Route.ID)
+		if script != nil {
+			if err := h.scriptStore.BatchDelete(c.Context(), strings.Split(input.Route.ID, ",")); err != nil {
+				log.Warnf("try to delete script %s again", input.Route.ID)

Review comment:
       sure.but i wrote a wrong log here.




----------------------------------------------------------------
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 #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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



##########
File path: api/internal/handler/route/route.go
##########
@@ -309,7 +309,7 @@ func (h *Handler) Update(c droplet.Context) (interface{}, error) {
 		script, _ := h.scriptStore.Get(input.Route.ID)
 		if script != nil {
 			if err := h.scriptStore.BatchDelete(c.Context(), strings.Split(input.Route.ID, ",")); err != nil {
-				log.Warnf("script %s failed", input.Route.ID)
+				log.Warnf("delete script %s failed", input.Route.ID)

Review comment:
       yes, It will write to the error log file.




----------------------------------------------------------------
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] Firstsawyou commented on pull request #704: fix:bug that dirty data exists after updating route and wrong mod for prod env

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


   LGTM.


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