Skip to content

Conversation

@zhengkezhou1
Copy link
Contributor

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
@zhengkezhou1 zhengkezhou1 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
@zhengkezhou1 zhengkezhou1 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