-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update JdbcSearchableJobExecutionDao to support Batch 4 and 5 schemas (…
…#5613) * Ensure that boot2 and boot3 job execution are queried. * Restore the default constructor for JdbcSearchableJobExecutionDao. * Remove final from local variables. * Update so the test cases from AbstractJdbcJobSearchableExecutionDaoTests can be moved to AbstractSimpleJobServiceTests. * Moved tests from AbstractJdbcJobSearchableExecutionDaoTests to AbstractSimpleJobServiceTests. Fix JobParameter loading on JdbcSearchableJobExecutionDao. * Added DirtiesContext for each method to prevent connection errors. * Fixed formatting. * Fix Datasource handling in SimpleJobServiceMariadbTests and SimpleJobServicePostgresTests. Fixes #5609
- Loading branch information
Corneil du Plessis
authored
Dec 22, 2023
1 parent
6cb57b3
commit 5073813
Showing
13 changed files
with
782 additions
and
588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...rver-core/src/main/java/org/springframework/cloud/dataflow/server/batch/BatchVersion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.springframework.cloud.dataflow.server.batch; | ||
|
||
import org.springframework.cloud.dataflow.schema.AppBootSchemaVersion; | ||
import org.springframework.cloud.dataflow.schema.SchemaVersionTarget; | ||
import org.springframework.util.Assert; | ||
|
||
/** | ||
* Provides enumeration of Batch Schema versions needed to be supported. | ||
* @author Corneil du Plessis | ||
*/ | ||
public enum BatchVersion { | ||
BATCH_4, | ||
BATCH_5; | ||
public static BatchVersion from(AppBootSchemaVersion bootSchemaVersion) { | ||
Assert.notNull(bootSchemaVersion, "bootSchemaVersion required"); | ||
return AppBootSchemaVersion.BOOT3.equals(bootSchemaVersion) ? BATCH_5 : BATCH_4; | ||
} | ||
public static BatchVersion from(SchemaVersionTarget versionTarget) { | ||
Assert.notNull(versionTarget, "versionTarget required"); | ||
return from(versionTarget.getSchemaVersion()); | ||
} | ||
} |
369 changes: 285 additions & 84 deletions
369
...n/java/org/springframework/cloud/dataflow/server/batch/JdbcSearchableJobExecutionDao.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 0 additions & 195 deletions
195
...ringframework/cloud/dataflow/server/batch/AbstractJdbcJobSearchableExecutionDaoTests.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.