You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2023/01/04 07:51:37 UTC

[GitHub] [incubator-devlake] likyh opened a new pull request, #4097: fix: fix the bug in upgrade

likyh opened a new pull request, #4097:
URL: https://github.com/apache/incubator-devlake/pull/4097

   ### Summary
   fix the bugs in upgrade:
   1. a typo when reading name
   2. scope -> scopes
   3. pass correct scopeId


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

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] warren830 merged pull request #4097: fix: fix the bug in upgrade

Posted by GitBox <gi...@apache.org>.
warren830 merged PR #4097:
URL: https://github.com/apache/incubator-devlake/pull/4097


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

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

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


[GitHub] [incubator-devlake] mintsweet commented on a diff in pull request #4097: fix: fix the bug in upgrade

Posted by GitBox <gi...@apache.org>.
mintsweet commented on code in PR #4097:
URL: https://github.com/apache/incubator-devlake/pull/4097#discussion_r1061211809


##########
config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts:
##########
@@ -104,25 +104,25 @@ export const useBPUpgrade = ({ id, onResetError }: UseBPUpgradeProps) => {
     const scopeDetail = await getScopeDetail(plugin, connectionId, scope.options);
 
     // put data scope
-    const res = await API.updateDataScope(plugin, connectionId, getScopeId(plugin, scopeDetail), {
+    await API.updateDataScope(plugin, connectionId, getScopeId(plugin, scopeDetail), {
       ...scopeDetail,
-      transformationRuleId: transfromationRule?.id,
+      transformationRuleId: transformationRule?.id,
     });
 
     return {
-      id: res.id,
+      id: getScopeId(plugin, scopeDetail).toString(),
       entities: scope.entities,
     };
   };
 
   const upgradeConnection = async (connection: any) => {
     const { plugin, connectionId } = connection;
 
-    const scope = await Promise.all(connection.scope.map((sc: any) => upgradeScope(plugin, connectionId, sc)));

Review Comment:
   Do not modify this name, because scopes means glasses.



##########
config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts:
##########
@@ -104,25 +104,25 @@ export const useBPUpgrade = ({ id, onResetError }: UseBPUpgradeProps) => {
     const scopeDetail = await getScopeDetail(plugin, connectionId, scope.options);
 
     // put data scope
-    const res = await API.updateDataScope(plugin, connectionId, getScopeId(plugin, scopeDetail), {
+    await API.updateDataScope(plugin, connectionId, getScopeId(plugin, scopeDetail), {
       ...scopeDetail,
-      transformationRuleId: transfromationRule?.id,
+      transformationRuleId: transformationRule?.id,
     });
 
     return {
-      id: res.id,
+      id: getScopeId(plugin, scopeDetail).toString(),

Review Comment:
   `${getScopeId(plugin, scopeDetail)}` will better.



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

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

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