Skip to content
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

[Improve] Refactor update setting interface #3585

Merged
merged 6 commits into from
Feb 27, 2024

Conversation

zzzk1
Copy link
Contributor

@zzzk1 zzzk1 commented Feb 27, 2024

What changes were proposed in this pull request

Issue Number: close #3578
Platforms such as Dcker Configuration and Alert Configuration lack parameter checks and are too arbitrary. Improve this by making the configurations for the different functions available as a complete form, so that they can be verified for completeness and compliance at submission time.

Brief change log

Verifying this change

This change added tests and can be verified as follows:

  • Added unit test to verify the change.

…to improve-docker-email-setting

# Conflicts:
#	streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/bean/SettingAlertEmailConfigParams.java
#	streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/bean/SettingDockerConfigParams.java
#	streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/SettingController.java
#	streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/SettingService.java
#	streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SettingServiceImpl.java
#	streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/bean/SettingAlertEmailConfigParamsTest.java
#	streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/bean/SettingDockerConfigParamsTest.java
#	streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/service/SettingServiceTest.java
@zzzk1 zzzk1 force-pushed the improve-docker-email-setting branch from f19ec3e to ea9c1c8 Compare February 27, 2024 15:01
/* Docker namespace rules based on the format of the domain name */
private static final String NAMESPACE_REGEX = "^(?!-)[a-zA-Z0-9-]{1,253}(?<!-)$";

public static boolean verifyParams(SettingDockerConfigParams params) {
Copy link
Member

Choose a reason for hiding this comment

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

Just send the request directly, connect to the target Docker instance, and perform the validation. 🤔

@wolfboys
Copy link
Member

I'll merge the PR first, and later I'll submit a PR to fix it

@wolfboys wolfboys merged commit 2e4306e into apache:dev-2.1.3 Feb 27, 2024
8 checks passed
@zzzk1 zzzk1 deleted the improve-docker-email-setting branch March 2, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants