Commit Graph

8191 Commits

Author SHA1 Message Date
Jonathan Locke
c193aa46f0
CID-1154: reliable finality merge to OS (#5658)
CID-1154: reliable finality merge to OS (#5658)
2019-11-05 10:48:00 +00:00
Jonathan Locke
7a78b93124
CORDA-3369: fix samples readme (#5651)
CORDA-3369: fix samples readme (#5651)
2019-11-05 10:12:06 +00:00
stefano
5ac1e50135 Merge remote-tracking branch 'origin/release/os/4.3' into my_merge_branch 2019-11-04 17:48:15 +00:00
Barry
4a7a9a56be TM-80 Do not publish the junit zip file to Artifactory automatically. (#5667)
This functionality was only in place for debugging purposes, to switch
it back on, set -Dpublish.junit=true in the Jenkinsfile.
2019-11-04 17:37:43 +00:00
Barry
6bf49bc4b7 TM-81 Do not write out the callstack when we cannot find tests.csv (#5669)
The first run of any new branch will not find a corresponding tests.csv
and will return 404 not found which is fine.  We do not need to display
the callstack at warning level.
2019-11-04 17:36:33 +00:00
stefano
718b7abb2f add pod index to container output message to make it easier to find in artifacts 2019-11-04 17:12:50 +00:00
stefano
2dab35c362 tidy up environment within pipeline 2019-11-04 17:00:38 +00:00
stefano
62002e0b3c surround post steps with check if comment build 2019-11-04 16:28:52 +00:00
stefano
f858827757 trigger is not null when comment caused build 2019-11-04 16:24:14 +00:00
stefano
6ae082f67f fix pipeline syntax errors 2019-11-04 16:19:55 +00:00
Chris Rankin
b2c944bb0e CORDA-3390: Allow EvolutionSerializer to handle primitive types becoming nullable. (#5661) 2019-11-04 16:19:46 +00:00
stefano
bf792c63d5 redesign Jenkinsfile for smoketests to determine if current build is a comment triggered build 2019-11-04 16:18:31 +00:00
stefano
35def14b1f add ability to tigger smoke tests on arbitrary PR 2019-11-04 16:03:12 +00:00
Stefano Franz
f7e0ce6f0b
convert to nanos from seconds rather than milliseconds when parsing JUnit xml (#5666)
* convert to nanos from seconds rather than milliseconds

* fix tests
2019-11-04 15:17:57 +00:00
Stefano Franz
5a0b8c7992
add extra whitespace in jenkins regression build command (#5665) 2019-11-04 13:26:43 +00:00
LankyDan
54394f6747 Release state soft locks when a flow is killed via killFlow 2019-11-04 13:21:06 +00:00
Stefano Franz
e09cd84339
add test time publishing to regression test build (#5664) 2019-11-04 13:05:13 +00:00
Stefano Franz
e4e920eee9
multiprocess port allocator is no longer used, so we can remove the tests as they add a significant amount of time to run (2-3 min) (#5663) 2019-11-04 11:56:38 +00:00
LankyDan
3c0631a26a Fix VaultObserverExceptionTest due to differences between ENT and OS 2019-11-04 09:42:41 +00:00
Barry
91e6c9783f TM-51 Read and write test results to artifactory. (#5597)
* TM-51  Prep for reading and writing test results to artifactory.

* TM-51  Tests from target branch if no tests for current branch

* TM-51  Placeholder for test averaging over runs.

* TM-51  Replace slashes in branch names used as tags.

* TM-51  More placeholder work for the mean duration work.

* TM-51  Write out average tests results as as csv.

The csv file should grow and be updated on each run.  This includes whether or not we are running unit tests, integration tests and so on.

* TM-51  Comment out old junit test archiving, add more comments.

* TM-51  Zip task needs to depend on a csv creation task.

If there isn't a csv file present, then the zip task doesn't run due to 'NO-SOURCE'

* TM-51  Zip task should ignore empty dirs

* TM-51  Fix up loading of test results.

We were looking for the wrong artifact name.
Add a bit more logging.

* TM-51  Fix up possible problem with allocating by class distribution.

If we encounter a class we haven't seen before, there won't be any tests.
This means we should give it some weight.  '1' is far too small.

* TM-51  Test that we are definitely increment the run count.

Tracking down whether the zipped csv file should have incremented.

* TM-51  Better default value for missing test/class names.

Begin by using mean unit test duration, but we have the option to bump
that to the mean class unit tests duration.

* TM-51  More debug information around csv writing.

We should be incrementing the tests.

* TM-51  Reload the csv before updating it.

* TM-51  Reduce verbosity of logging.

* TM-51  Reinstate unit tests.  Remove logging verbosity.

* TM-51  Load tests from artifactory in memory and avoid interim file.

* TM-51  Better handling of zero duration tests.

Ensure we return zero times from junit artifacts which may either be zero or have no recorded time.  Before writing the tests duration csv file, store those with a known time, and then store those with zero using the average time.

* TM-51  Log whether we have recorded a test.

Tracking down the curious case where we seem to not be rerunning the
same set of tests on the second run.

* TM-51  Capture junit files as well.

Trying to track down whether some tests are intermittently run.

* TM-51  Change task dependencies to ensure ziptask is triggered.

* TM-51  Remove test assertion, and trigger build

* TM-51  Add corda/enterprise to artifactory tag name.

Moved properties to own file.

* TM-51  Remove unnecessary mean class-based duration.

* TM-51  Add more BucketingAllocator tests.

We need these to nail down its behaviour some more.

* TM-51  Further log information.

We don't seem to be finding the tests in the 'production' runs which is odd.

* TM-51  corda type double set?

* TM-51  do not set the project type in the properties.

SRP and all that.

* TM-51  better plan reporting

* TM-51  duration may be zero

Another runtime problem that doesn't show in tests.

* TM-51  better plan reporting

* fix missing space after image id

* fix merge issue in DistributedTesting

* TM-51  remove unused code when GET/PUT-ting to Artifactory.

* TM-51  put tasks in gradle group and tidy up zip task creation

* TM-51 Fix the junit XML path.

* TM-51 Fix the task graph

* TM-51 Less logging
2019-11-02 09:07:53 +00:00
Stefano Franz
cf849fbdbd
Merge pull request #5662 from corda/setup_regression_builds
Setup regression builds in jenkins
2019-11-01 16:51:07 +00:00
stefano
f8b4b334e3 truncate pod name from start rather than end 2019-11-01 16:10:35 +00:00
LankyDan
be2e34b33a Fix error from warning from detekt 2019-11-01 16:00:09 +00:00
stefano
d54f2ddd87 fix Library import 2019-11-01 15:57:08 +00:00
stefano
e7e7de1d05 add regression test jenkins file 2019-11-01 15:53:05 +00:00
LankyDan
3aaddb47ea Attempt to fix detekt issues in DriverDSLImpl again 2019-11-01 14:36:47 +00:00
LankyDan
dfb86f5d9c Attempt to fix detekt issues in DriverDSLImpl 2019-11-01 14:21:17 +00:00
Chris Rankin
43856319bd CORDA-3392: Fix caching of local AMQPSerializer<*> instances. (#5657) 2019-11-01 14:08:27 +00:00
LankyDan
b05bd76a77 Fix error in VaultObserverExceptionTest due to bad merge 2019-11-01 13:38:42 +00:00
Stefano Franz
359bb64d69
Merge pull request #5655 from corda/my_merge_branch
Use Kubernetes Jobs rather than Pods to preallocate nodes
2019-11-01 13:11:46 +00:00
LankyDan
4aa9add8c8 CORDA-2050 Upgrade Corda to Java 11 (compatibility mode) (#5356) Upgrade Corda to run with Java 11 (compatibility mode) - see https://github.com/corda/corda/pull/5356 - 3fafbe55
Reapply change that was lost during merge - Adjust resolution of byteman jar to use java 11 compatible mechanism. - a1077092

Manual cherry pick of these changes (a1077092 + 3fafbe55)
2019-11-01 11:50:16 +00:00
Viktor Kolomeyko
c53ea9dde5 Eliminate extensive printout when Byteman not found on the classpath. (#1277)
Byteman is absent for most of the integration tests and long stacktrace is seen in the log
presently that un-necessarily attracts attention and consumes logging space.

(cherry picked from commit 2b6e59e7bd)
2019-11-01 11:50:16 +00:00
LankyDan
e737b01184 Port ledger integrity work to SingleThreadedStateMachineManager
- Port ledger integrity work to `SingleThreadedStateMachineManager`
- Fix `StatemachineErrorHandlingTest`
- Fix compile errors in `RetryFlowMockTest` + `VaultObserverExceptionTest`
- Add method to `StaffedFlowHospital` that was missed during original merge
2019-11-01 11:50:16 +00:00
LankyDan
bedfba8c3d ENT-1967: Illustration for Byteman library can be used in Node integration test. (#1204) - c396b80a
(Only took `DriverDSLImpl` changes)

Simplifying internal startNode with bytemanPort parameter - d88b02f7

Manual cherry pick of these changes (c396b80a + d88b02f7)
2019-11-01 11:50:16 +00:00
Christian Sailer
8a2f4478d2 Undo changes to detekt config that were not required. 2019-11-01 11:48:08 +00:00
Christian Sailer
e9808c5e67 Update compiler.xml for new projects (and code style settings)
# Conflicts:
#	.idea/codeStyles/Project.xml
#	.idea/compiler.xml
2019-11-01 11:48:07 +00:00
Christian Sailer
f670cf774b Suppress/fix more warnings 2019-11-01 11:48:07 +00:00
Christian Sailer
9f15457045 add else branch to avoid warning that fails the warning check 2019-11-01 11:48:07 +00:00
Christian Sailer
1f82213827 Suppress/Baseline detekt issues that were highlighted freshly because of the merge. 2019-11-01 11:48:07 +00:00
Christian Sailer
5b9c5a6b83 Fix and or suppress detekt warnings 2019-11-01 11:48:07 +00:00
Christian Sailer
119f939ee1 Fix and or suppress detekt warnings 2019-11-01 11:48:07 +00:00
Christian Sailer
48aa2f2faa Update compiler.xml for new projects (and code style settings) 2019-11-01 11:48:07 +00:00
LankyDan
c5124689ca CORDA-3194 Update TODOs with jira tickets 2019-11-01 11:48:07 +00:00
Christian Sailer
8f2923c7a3 CID-843 code review fixes (#2681)
* Layout fix

* Fix test to use proper hook in flow hospital

* Fix comment
2019-11-01 11:48:07 +00:00
LankyDan
44206a0bea CORDA-3194 Update flow hospital docs, tidy comment and make exception public 2019-11-01 11:48:07 +00:00
Dan Newton
f4e9b9d5d2 CORDA-3194 Stop killed flows from re-entering hospital (#2664)
* CORDA-3194 Do not allow killed flows back into the hospital

This change has been made to prevent killed flows from being added back
to the hospital after being forcibly removed by `killFlow`. Not doing so,
could leave references to a flow inside of the hospital, which is not
the correct behaviour.

`killFlow` now sets a flow's `StatemachineState.isRemoved` to true.

This check is then used in `StaffedFlowHospital` and the
`DumpHistoryOnErrorInterceptor`.

* CORDA-3194 Log different message for transition error due to killed flow

When a flow is killed, its checkpoint is deleted. Currently, the
statemachine will still try a process the next event even if it has
been killed. This can lead to an error when trying to update the
deleted checkpoint. The exception thrown from this is logged out.

An if statement has been added to log a different message at debug level
if it is due to an update error for a killed flow. This is done to not
alarm node operators of the exception.
2019-11-01 11:48:07 +00:00
Dan Newton
3b3dbd7352 CORDA-3194 Add extra test cases to StatemachineErrorHandlingTest (#2651)
* CORDA-3194 - Add `ReceiveFinalityFlow` byteman tests

* CORDA-3194 Tidy up `StatemachineErrorHandlingTest`
2019-11-01 11:48:07 +00:00
Dan Newton
a591c8e25b CORDA-3194 Relax duplicate insert flow hospital handling (#2643)
* CORDA-3194 Relax duplicate insert flow hospital handling

Revert a previous change to now make the duplicate insert staff member to
give a diagnosis of discharge or not my speciality (previously gave
terminal).

This is to prevent duplicate insert handling from overriding finality
flow error handling.
2019-11-01 11:48:07 +00:00
kyriathar
877ce5587f CORDA-3196 warning at intervals when flows waiting in flow hospital (#2636)
* added the warning as a TimerTask at StaffedFlowHospital#delayedDischargeTimer

* moved the scheduling of the warning task at StaffedFlowHospital#init block. That way we ensure that the task will be scheduled only once at StaffedFlowHospital initialization.

* Corrected overnight observation warning task's logging message. Changed StaffedFlowHospital#delayedDischargeTimer to the more generic StaffedFlowHospital#hospitalJobTimer since it now schedules delayed discharges tasks as well the overnight observation warning task. Removed this from property reference

* switching to fun timerTask for the instantiation of anonymous TimerTask classes

* Correct condition to log patients who are currently in the hospital, whose last record in their medical records is Outcome.OVERNIGHT_OBSERVATION. Extended logging to include treatableSessionInits staying in the hospital

* Add not empty check for patientsUnderOvernightObservation. Correct strings.
2019-11-01 11:48:07 +00:00
Dan Newton
ef01a99737 CORDA-3194 Failure during flow retry forces the flow into overnight observation (#2640)
When a flow fails to retry, it should be kept in for overnight observation and aborted.

In the future, it might be possible to retry flows again that failed during their retry, but for now keeping for observation and aborting is satisfactory.

* CORDA-3194 Remove hospitalised flows from `HospitalisingInterceptor`

Small refactor to remove some of the hospital logic out of the
`HospitalisingInterceptor` and into the `StaffedFlowHospital`.

Add some comments to help clarify the purpose of the two maps inside
of the hospital.

* CORDA-3194 When a flow fails to retry force it into observation

When a flow fails to retry, it should be kept in for overnight
observation and aborted.

In the future, it might be possible to retry flows again that failed
during their retry, but for now keeping for observation and aborting is
satisfactory.

* CORDA-3194 Test for database commit failure when retrying a flow

Failing during the database commit failure that occurs after the retry
flow action does not stop the flow from actually retrying. This test
confirms this functionality.

The retried flow gets scheduled as part of the retry action. The failure
in the commit action does not prevent this since it has already been
scheduled.
2019-11-01 11:48:07 +00:00