You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "likyh (via GitHub)" <gi...@apache.org> on 2023/02/14 14:29:15 UTC
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #4416: fix(config-ui): transformation name is duplicated when upgrading bp
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