Skip to content

[Improve] support delete flink home #2582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 10, 2023

Conversation

zhoulii
Copy link
Member

@zhoulii zhoulii commented Apr 7, 2023

What changes were proposed in this pull request

Issue Number: close #2542

Brief change log

after

Verifying this change

  • Manually verified the change by testing locally.

Does this pull request potentially affect one of the following parts

  • Dependencies (does it add or upgrade a dependency): (yes / no)

@zhoulii zhoulii force-pushed the support-remove-flink-home branch from 9406a74 to 66572eb Compare April 7, 2023 07:41
Copy link
Contributor

@RocMarshal RocMarshal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhoulii Thanks for your contribution & quick-drive
I left a few of comments. PTAL in your free time.

May the items from my limit read as follows get your @wolfboys @zhoulii confirmation ?

  1. If there are running jobs or sessions using the target flinkhome, it would be better not to support changing Flinkhome to avoid abnormal risks when some savepoints are triggered.
  2. The delete,update,create api have no ApiAccess or XXXPermission annotations . Is here any risk ?

I'd appreciated with your confirmation.
thanks~

@@ -39,6 +42,8 @@
public class FlinkEnvServiceImpl extends ServiceImpl<FlinkEnvMapper, FlinkEnv>
implements FlinkEnvService {

@Autowired private FlinkClusterService flinkClusterService;
@Autowired private ApplicationService applicationService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Autowired private ApplicationService applicationService;
@Autowired private ApplicationService applicationService;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 538 to 540
LambdaQueryWrapper<Application> lambdaQueryWrapper =
new LambdaQueryWrapper<Application>().eq(Application::getVersionId, flinkEnvId);
return this.count(lambdaQueryWrapper) > 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May here use getBaseMapper() .exists(.... ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 328 to 330
LambdaQueryWrapper<FlinkCluster> lambdaQueryWrapper =
new LambdaQueryWrapper<FlinkCluster>().eq(FlinkCluster::getVersionId, flinkEnvId);
return this.count(lambdaQueryWrapper) > 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as mentioned above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -18,6 +18,8 @@ export default {
title: 'Flink Home',
conf: 'Flink 配置',
sync: '配置同步',
edit: '编辑 Flink Home',
delete: '确定要删除此 Flink home ?',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the header of the edit tab window is :
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加-> 编辑 / Add ->Edit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to Adding and Editing Flink Home use the same modal#L169, and the title is fixed. I have limited understanding of frontend, what I can do is change the title to Add/Edit. but maybe it's not a elegant way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhoulii Take it easy, please ~ 😁
Hi, @wangsizhu0504 Could you help take a look about this ?
Thanks a lot~

@zhoulii
Copy link
Member Author

zhoulii commented Apr 7, 2023

@zhoulii Thanks for your contribution & quick-drive I left a few of comments. PTAL in your free time.

May the items from my limit read as follows get your @wolfboys @zhoulii confirmation ?

  1. If there are running jobs or sessions using the target flinkhome, it would be better not to support changing Flinkhome to avoid abnormal risks when some savepoints are triggered.
  2. The delete,update,create api have no ApiAccess or XXXPermission annotations . Is here any risk ?

I'd appreciated with your confirmation. thanks~

@RocMarshal Thanks for the review. I agree with you, maybe we can hanle these in another pr, and let this one focus on delete operation. what do you think?

@RocMarshal
Copy link
Contributor

I agree with you, maybe we can hanle these in another pr, and let this one focus on delete operation. what do you think?
Thanks for the reply~
SGTM If we can do it before the next release.
looking forward to it~
CC @wolfboys .

@wolfboys
Copy link
Member

wolfboys commented Apr 7, 2023

I agree with you, maybe we can hanle these in another pr, and let this one focus on delete operation. what do you think?
Thanks for the reply~
SGTM If we can do it before the next release.
looking forward to it~
CC @wolfboys .

I agree with you, We can do it in next pr.

await fetchFlinkEnvRemove(item.id);
await getFlinkSetting();
createMessage.success('The current flink home is removed');
}
Copy link
Member

@wolfboys wolfboys Apr 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 async function handleDelete(item: FlinkEnv) {
    const resp = await fetchFlinkEnvRemove(item.id);
    if (resp.data.code == 200) {
      await getFlinkSetting();
      createMessage.success('The current flink home is removed');
    }
  }

@wolfboys wolfboys added the feature/accepted This feature request is accepted label Apr 9, 2023
Copy link
Member

@wolfboys wolfboys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wolfboys wolfboys merged commit 180ea4e into apache:dev Apr 10, 2023
@zhoulii zhoulii deleted the support-remove-flink-home branch April 23, 2023 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKEND feature/accepted This feature request is accepted WEB UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Support delete Flink home.
3 participants