119 Commits

Author SHA1 Message Date
Glenn Renfro
e60c29d41d Updated the order in which the TaskLifecycleListener is configured
resolves #605
2019-06-25 10:05:58 -05:00
Spring Buildmaster
af078ec763 [artifactory-release] Next development version 2019-05-24 13:07:12 +00:00
Spring Buildmaster
1d07aa8cc8 [artifactory-release] Release version 2.0.2.RELEASE 2019-05-24 13:07:08 +00:00
Spring Operator
fef2986417 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 196 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 13:30:23 -05:00
Spring Operator
deff0f36ea URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 18 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 with 19 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 36 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 18 occurrences
2019-03-16 10:51:53 -05:00
Spring Buildmaster
83a7003656 [artifactory-release] Next development version 2019-02-21 19:54:44 +00:00
Spring Buildmaster
a8b61539c9 [artifactory-release] Release version 2.0.1.RELEASE 2019-02-21 19:54:41 +00:00
Glenn Renfro
6d87cc47f0 Treat MariaDB type as MySQL
resolves #514
2019-02-21 11:55:14 -06:00
wildloop
e8855ef10f bug-fix: throwable param's required for @FailedTask annotated methods
Lack of this parameter causes:
-  the exception with message: "o.s.c.t.listener.TaskLifecycleListener: taskExecution and throwable parameters are required for @FailedTask annotated methods :While handling this error: java.lang.IllegalStateException: Failed to execute ApplicationRunner" - please, take look at [this](https://github.com/spring-cloud/spring-cloud-task/blob/master/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/listener/annotation/TaskListenerExecutor.java#L113)
- and, as a consequence, a lost lock on the task (record in the table `task_locks`)
2018-12-07 11:27:06 -05:00
Glenn Renfro
53eb0620e7 Updated javadoc to remove ContextRefreshedEvent
Updated it to discuss SmartLifecycle#start() as the agent that kicks off the task.

resolves #447
2018-11-02 14:57:01 -05:00
Ilayaperumal Gopinathan
cf3a0dce8c Exit code is nullable
- Make exit code nullable and only update of execution status can make it a valid integer
 - Update JDBC create/start task execution queries to have exitCode as `null` values
 - Update tests to validate/verify the appropirate exit code values for create/start/complete task executions

On merge had to add a pause to the TaskLauncherSinkTests to wait for the task to complete successfully   Before we assumed that 0 was a satisfactory result meaning it was either running or completed.    Now with the null being returned it could be zero or null.  So we have to wait for the task to complete.
2018-10-31 15:40:46 -04:00
Glenn Renfro
219aa2741f TaskLifecycleListener triggers early, and possibly cyclical, bean initialisation
Replaced TaskListenerExecutorFactory with TaskListenerExecutorObjectProviderTests.  This delays the need to acquire a bean till it is needed vs at application event time.

resolves #448
2018-10-23 09:39:09 -04:00
David Turanski
cba26ed968 Implement getRunningTaskCount
Expose functionality via TaskExplorer

Polishing on merge
2018-09-05 08:43:55 -04:00
Gunnar Hillert
de1ebfb351 gh-424 Add the ability to retrieve the last TaskExecution for Tasks
- Add the ability to retrieve the last TaskExecution to:
  - MapTaskExecutionDao
  - JdbcTaskExecutionDao
- Refactor `JdbcTaskExecutionDao` and use `NamedParameterJdbcTemplate` for all persistence store calls
- Add the following TaskExecution methods to TaskExplorer:
  - getLatestTaskExecutionsByTaskNames
  - getLatestTaskExecutionForTaskName
- Add Tests
- Ensure that code is JDK7 compatible due to backporting needs
- Ensure commit backports to 1.2.x

Polishing on tests during merge
2018-06-15 16:54:28 -04:00
Michael Minella
4c5ce965fd Incremented version to the next development version 2018-05-08 17:01:51 -05:00
Spring Buildmaster
81b54aadba [artifactory-release] Next development version 2018-05-03 20:43:48 +00:00
Glenn Renfro
5672b326ed SimpleTaskConfiguration ignores proxy beans when validating datasources
If a user adds spring-cloud-starter-config to the dependencies it has to add a proxy for the datasource else the Hikari connection pool pukes.

resolves #407
2018-04-13 16:19:52 -05:00
Glenn Renfro
0915dc6dfe TaskRepositoryInitializer now uses TaskConfigurer to determine the datasource
resolves #405
2018-03-09 13:22:17 -05:00
Michael Minella
6426cfea7e Polish 2018-02-13 09:28:22 -06:00
Glenn Renfro
76309b89ff Removed code that was marked as deprecated.
Also updated test that tested deprecated code.

resolves #366
2018-02-13 09:28:09 -06:00
Glenn Renfro
d8a73ba183 Prevent a task from starting if an inst with the same name is running.
resolves #81

Using LockRegistryLeaderInitiator to do leadership election.

When task is started and singleInstanceEnabled isset to true then we use leader election
to determine if a task needs to be started.

Error Event Name had to be updated
2018-01-25 13:24:53 -06:00
Glenn Renfro
94e074d841 Set the spring.cloud.task.closecontext_enable default to false
resolves #364
2018-01-24 14:11:35 -06:00
Glenn Renfro
3f316a0170 SCT now handles exceptions thrown by execution listeners
resolves #341
2018-01-24 12:12:50 -06:00
Glenn Renfro
fd2d4a9124 Adds configuration metadata for properties
resolves #365
2018-01-18 11:51:29 -06:00
Glenn Renfro
3ad9efe3fe Updated tests to remove deprecated code from tests
* cleanup removing unused headers
* Updated asserts in code base that needed messages (marked as deprecated)
* left one test that was testing a deprecated constructor.  When that code is removed we can remove that test.
* some other cleanup

resolves #338
2018-01-18 11:42:37 -06:00
Glenn Renfro
e279846e7e Updated Spring Cloud Task to latest releases
Updated to remove all commons-logging-api dependencies to resolve  logging issue.

Updated to handle 2.0.0.M3 Spring Cloud Stream

resovles #347

Changes based on code review
2017-11-01 09:12:46 -04:00
Glenn Renfro
d95f46002f Migrate Task to Spring Cloud Build 2.0.x
resolves #313
2017-07-12 11:38:00 -05:00
Spring Buildmaster
54bce9a590 [artifactory-release] Next development version 2017-06-27 15:46:26 +00:00
Glenn Renfro
c7f15f5c8a Sets Version of repo to 1.2.1
* Docs and poms updated

* Updated deployer dependencies

resolves #323
2017-06-26 17:19:11 -04:00
Glenn Renfro
6c47223859 Repository is not initialized if tablePrefix is set.
resolves #311
2017-06-26 16:04:22 -05:00
Glenn Renfro
b03f8398a7 Task identifies if JPA is in use and uses JPTransactionManager
resolves #309
2017-06-26 15:49:20 -05:00
Glenn Renfro
6fad14ead7 Support DB2 on Mainframe as DB2ZOS
resolves #303

Added support for DB2ZOS DatabaseType.
Added DB2AS400, DB2VSE, based on how Spring Batch implemeted DB2 identification via metadata.
All DB2 database types will use the DB2 repository initialize sql script

Tested this against a local DB2.
2017-05-19 10:44:08 -04:00
Spring Buildmaster
1a16d44b2c [artifactory-release] Next development version 2017-04-24 19:36:00 +00:00
David Turanski
a1cffe8bd4 Change closecontextEnable to closeContextEnabled
Added test

Updated to use the standard log library

resolves #217
2017-04-12 11:06:26 -04:00
Michael Minella
fc708ac775 Removed dependencies on Spring Boot starters
This commit removes the dependency on any Spring Boot starters.
Starters are still used in the test scope, but should not impact the
library's dependencies.

Resolves #294
2017-03-30 10:33:03 -05:00
Michael Minella
ac41b8c26d Refactor to clense task name
When using Spring Boot, the id of the application context can be a colon
delimited string of values.  By default, Spring Cloud Task uses this
value as the task name.  However, when using JMX, this can cause issues.
This commit updates the SimpleTaskNameResolver to clense the colons and
replace them with underscores.

Resolves #280
2017-03-29 17:45:28 -04:00
Thomas Risberg
fec40fd3f8 Adding a method to pass in taskName for new empty TaskExecution
Resolves #298

Added test and add param to javadoc
2017-03-29 14:17:02 -04:00
Thomas Risberg
3c8d61447c Revert incremented versions for release 2017-03-21 10:34:05 -04:00
Michael Minella
a32d26f14c Incremented versions for release 2017-03-20 21:54:54 -05:00
Glenn Renfro
80812beee8 Updated the migration scripts to use all caps for table names (#288)
* Updated the migration scripts to use all caps for table names

In the original migration scripts the table names were all lower case.  However the original table definitions were capitalized, and on file systems that are case sensitive,
mysql fails to update the table.  Because of the 2 different cases.

resolves #287

* Updated the 1.1.x branch migration scripts

In the original migration scripts the table names were all lower case.  However the original table definitions were capitalized, and on file systems that are case sensitive,
mysql fails to update the table.  Because of the 2 different cases.

* Added migration script for db2.
2017-03-02 16:07:06 -05:00
Thomas Risberg
929117b365 Changing PARENT_EXECUTION_ID to NUMBER
Resolves #283
2017-02-23 18:59:07 -05:00
Michael Minella
48af5e5b32 Added TaskExecutionListenerSupport
This commit adds the TaskExecutionListenerSupport, a no-op
implementation of the TaskExecutionListner. This allows a user to extend
the TaskExecutionListenerSupport and simply override what they need
instead of implementing all of the methods.
2017-02-10 14:16:11 -06:00
Glenn Renfro
a7fe76c7d6 Do not update the externalExecutionId if null when starting TaskExecution
resolves #271
2017-02-09 09:07:22 -06:00
Glenn Renfro
acaaad89f3 Adds support for Task Execution Parent Ids
resolves #261
2017-01-20 14:47:12 -06:00
Glenn Renfro
91aaf0022c Change Engine for sequence to InnoDB
resolves #262
2017-01-06 13:15:12 -06:00
Michael Minella
3d1ee18db3 Minor polish 2017-01-06 12:54:38 -06:00
Glenn Renfro
10bb457a5a Allows user to set table prefix via properties.
resolves #244
2017-01-06 12:54:30 -06:00
Glenn Renfro
2eb1c49e12 Added ability to update externalExecutionId
resolves #259
2017-01-06 16:47:29 +01:00
Glenn Renfro
1185421803 TaskBatchAutoConfiguration now uses datasource from TaskConfigurer
resovles #252
2016-12-20 19:25:26 -06:00
Spring Buildmaster
ce31582995 [artifactory-release] Next development version 2016-11-22 16:58:27 +00:00