You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "mintsweet (via GitHub)" <gi...@apache.org> on 2023/02/14 14:27:05 UTC

[GitHub] [incubator-devlake] mintsweet opened a new pull request, #4416: fix(config-ui): transformation name is duplicated when upgrading bp

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

   ### Summary
   Fixed transformation name is duplicated when upgrading bp.
   


-- 
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 pull request #4416: fix(config-ui): transformation name is duplicated when upgrading bp

Posted by "mintsweet (via GitHub)" <gi...@apache.org>.
mintsweet commented on PR #4416:
URL: https://github.com/apache/incubator-devlake/pull/4416#issuecomment-1430864922

   > Have you tested it?
   
   Yes.


-- 
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] likyh merged pull request #4416: fix(config-ui): transformation name is duplicated when upgrading bp

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh merged PR #4416:
URL: https://github.com/apache/incubator-devlake/pull/4416


-- 
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] likyh commented on a diff in pull request #4416: fix(config-ui): transformation name is duplicated when upgrading bp

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh commented on code in PR #4416:
URL: https://github.com/apache/incubator-devlake/pull/4416#discussion_r1105898552


##########
config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts:
##########
@@ -90,27 +90,28 @@ export const useBPUpgrade = ({ id, onResetError }: UseBPUpgradeProps) => {
   };
 
   const upgradeScope = async (plugin: string, connectionId: ID, scope: any) => {
+    // get data scope detail
+    const scopeDetail = await getScopeDetail(plugin, connectionId, scope.options);
+    const scopeId = getScopeId(plugin, scopeDetail);
+
     let transformationRule;
 
     if (scope.transformation) {
       // create transfromation template
       transformationRule = await API.createTransformation(plugin, {
         ...scope.transformation,
-        name: `upgrade-${plugin}-${connectionId}-${new Date().getTime()}`,
+        name: `upgrade-${plugin}-${connectionId}-${scopeId}`,

Review Comment:
   Does it will duplicated if one scope in 2 different bp?



-- 
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 #4416: fix(config-ui): transformation name is duplicated when upgrading bp

Posted by "mintsweet (via GitHub)" <gi...@apache.org>.
mintsweet commented on code in PR #4416:
URL: https://github.com/apache/incubator-devlake/pull/4416#discussion_r1105901861


##########
config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts:
##########
@@ -90,27 +90,28 @@ export const useBPUpgrade = ({ id, onResetError }: UseBPUpgradeProps) => {
   };
 
   const upgradeScope = async (plugin: string, connectionId: ID, scope: any) => {
+    // get data scope detail
+    const scopeDetail = await getScopeDetail(plugin, connectionId, scope.options);
+    const scopeId = getScopeId(plugin, scopeDetail);
+
     let transformationRule;
 
     if (scope.transformation) {
       // create transfromation template
       transformationRule = await API.createTransformation(plugin, {
         ...scope.transformation,
-        name: `upgrade-${plugin}-${connectionId}-${new Date().getTime()}`,
+        name: `upgrade-${plugin}-${connectionId}-${scopeId}`,

Review Comment:
   You're right, I'll fixed it.
   



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

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] likyh commented on pull request #4416: fix(config-ui): transformation name is duplicated when upgrading bp

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh commented on PR #4416:
URL: https://github.com/apache/incubator-devlake/pull/4416#issuecomment-1429842894

   Have you tested it?


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

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

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