Skip to content

Commit

Permalink
Remove the restriction on underscores in job names
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxt2015 committed Oct 9, 2024
1 parent e5ca76f commit 7688e47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ public void init() {
protected void initConfig() {
flinkConfigPath = config.getClusterConfig().getFlinkConfigPath();
flinkConfig = config.getFlinkConfig();
String jobName = flinkConfig.getJobName();
if (null != jobName && jobName.contains("_")) {
jobName = jobName.replace("_", "-");
flinkConfig.setJobName(jobName);
}
k8sConfig = config.getKubernetesConfig();

configuration.set(CoreOptions.CLASSLOADER_RESOLVE_ORDER, "parent-first");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@ const JobModal: React.FC<JobModalProps> = (props) => {
* @param value
*/
const validateName = async (rule: any, value: string) => {
if (/_/g.test(value)) {
return Promise.reject(l('catalog.name.validate.error'));
} else if (!value) {
if (!value) {
return Promise.reject(l('catalog.name.placeholder'));
} else {
return Promise.resolve();
Expand Down

0 comments on commit 7688e47

Please sign in to comment.