Commit Graph

8263 Commits

Author SHA1 Message Date
Ryan Fowler
e4e2dfffd6 CORDA-3192: Add an exception for Unrecoverable RPC errors so that the
RPC doesn't keep trying to reconnect when there's no reason to.
2019-11-07 10:32:07 +00:00
Jonathan Locke
86f1f9e371
CORDA-3393: Lazy load MessageDeduplicationHandler.flowId (#5679)
CORDA-3393: Lazy load `MessageDeduplicationHandler.flowId` (#5679)
2019-11-07 09:44:03 +00:00
Dan Newton
b15db200e3 NOTICK: Quick and dirty change to stop "Unable to start notaries." error message (#5686)
* Quick and dirty change to stop "Unable to start notaries." error message (#5686)

"Unable to start notaries. A required port might be bound already" is
returned whenever a startup error occurs while starting the notary nodes
in driver tests. This hides the real error.

This change prints the actual error to std_err and read from file
at a later point. This means the real error is not lost and will be
shown in failed builds.

* Suppress detekt warnings
2019-11-07 09:43:29 +00:00
Tudor Malene
b1e5b659c1 ENT-4107: Document blob inspector issue (#5685)
* ENT-4107 - document issue with enums in the blob inspector (#5685)

* ENT-4107 - fixed formatting
2019-11-06 17:04:05 +00:00
Jonathan Locke
0445fac0e5
CORDA-3298: Update sql server driver version (#5684)
CORDA-3298: Update sql server driver version (#5684)
2019-11-06 17:03:21 +00:00
Chris Rankin
7708a3c28a CORDA-2876: Add explicit Kotlin dependencies to DJVM serialization modules. (#5678)
* CORDA-2876: Add explicit Kotlin dependencies to DJVM serialization modules.

* Publish slf4j-api at compile scope for corda-core-deterministic.

* Bump Corda platform version to 6.
2019-11-06 16:49:27 +00:00
Dimos Raptis
a88ee7d138 NOTICK - Fixes for advanced concepts docs (#5671) 2019-11-06 15:03:14 +00:00
Stefano Franz
996183dd2a
Merge pull request #5677 from corda/my_merge_branch
Merge OS4.3 -> OS4.4
2019-11-06 14:33:57 +00:00
Dimos Raptis
55525820cf [CORDA-3298] - Update sql server driver version 2019-11-06 13:35:21 +00:00
stefano
5d6fc34f88 fix merge issue with exception thrown in RpcExceptionHandlingTest 2019-11-06 12:28:05 +00:00
LankyDan
91f35d5967 CORDA-3393 Lazy load MessageDeduplicationHandler.flowId
This is to potentially help with debugging in the future as the
`flowId` could become confusing for received messages where the `flowId`
has nothing to do with the current flow.
2019-11-06 11:26:25 +00:00
stefano
03d8009c7d fix temp folder rules 2019-11-05 17:56:06 +00:00
stefano
d8ed3492b9 fix merge conflicts due to changes in Signed test cordapp creation 2019-11-05 17:42:38 +00:00
stefano
6a3a9eded3 Merge remote-tracking branch 'origin/release/os/4.3' into my_merge_branch
# Conflicts:
#	core/src/main/kotlin/net/corda/core/internal/TransactionVerifierServiceInternal.kt
#	node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcExceptionHandlingTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt
2019-11-05 17:19:18 +00:00
Chris Rankin
02ed8e91b3 CORDA-2876: Ensure NodeConfig does not have devModeOptions outside of devMode. (#5676) 2019-11-05 16:59:40 +00:00
Razvan Codreanu
7106b0f1b9 Converting Groovy to Java in the Distributed testing plugin (#5642)
* TM-74 Converting ParallelTestGroup

* TM-74 private fields, getters, distributedTesting refactoring

* TM-74 More conversions

* TM-74 reinstating ListTests groovy class

* TM-74 extracting enum and clas from ListTests

* TM-74 switching to java ListTests

* TM-74 null check

* TM-74 new access modifiers

* TM-74 minor changes

* TM-74 scrapping the conversions of ListTests to java

* TM-74 reverting build.gradle

* TM-74 formatting main gradle

* TM-74 removing the commented out code. It has been linked in the jira

* TM-74 adding list tests back for investigation

* TM-74 collecting after every operation

* TM-74 collecting after every operation

* TM-74 more debugging

* TM-74 more debugging with lifecycle now

* TM-74 debugging on the existing groovy file

* TM-74 with stream output

* TM-74 switching back to java

* TM-74 reverting java code, fixing cast in distributed testing file?

* TM-74 nailing down the line causing the problem

* TM-74 casting

* TM-74 changing types

* TM-74 stacktrace at pod lvl

* TM-74 stacktrace at pod lvl

* TM-74 fix issue with immutable list

* TM-74 reverting changes now that fix is in place

* TM-74 switching to generic task

* TM-74 turning off debugging

* TM-74 allocating by method
2019-11-05 16:59:19 +00:00
Stefano Franz
ed50016ed0
Merge pull request #5668 from corda/add_publishing_tests_to_regression_builds
add smoke tests via comment trigger build
2019-11-05 15:29:33 +00:00
Chris Rankin
f226ddc4f2 CORDA-2876: Integrate the DJVM with the Corda Node. (#5633)
* * CORDA-2876: Migrate DJVM serialization modules into Corda.
* Pre-generate Corda classes for DJVM sandbox when node boots in production mode.
* Ensure that all DJVM test contract CorDapps are signed.
* Test examining attachments within DJVM sandbox.
* Test Contract.verify() using cryptographic verify function.
* Add test cases for more non-determinism in Contract.verify().
* Update node-driver to support testing nodes with DJVM support.
* Modify Node to allow alternative DJVM configurations for testing.
* Refactor DeterministicVerifierFactoryService for default use-case.
* Small whitespace and code-style refactors.
* Create and activate a DJVM execution profile for the Node.
* Revert making Verifier implement AutoCloseable.
* Allow the node to cache sandboxed Corda byte-code for reuse.
* Use updated Quasar agent that knows not to touch DJVM classloaders.
* Fix Quasar's package exclusions globs for DJVM.
* Deserialise LedgerTransaction into the sandbox for Contract.verify().
* Add the DJVM's serialisation modules to the Corda node.
* Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes.
* Add corda-dev to repositories while DJVM is SNAPSHOT.
* Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl.
* Exclude sandbox.** and shaded djvm.** classes from Quasar agent.
* Add the corda-dev repository to :node for the deterministic runtime.
* Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier.
* Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances.
* Add DJVM to contract verification path inside Corda Node.
* Minor lambda simplifications and removing unused import.
* CORDA-2871: Remove @CordaSerializable from LedgerTransaction.
* CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object.
* CORDA-2871: Refactor the contract verification code into a separate class,
 and allow LedgerTransaction to choose different Verifier objects.
* Update DJVM to use Corda 4.4-SNAPSHOT. (#95)
* CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92)
* Add support for SourceClassLoader.getResources() to DJVM.
* Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload.
* CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91)
* CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88)
* Fix tests broken by Windows line endings. (#82)
* CORDA-3292: Reimplement ExecutionProfile as a data class. (#80)
* CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76)
* CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75)
* Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules.
* CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72)
* CORDA-2871: Minor cosmetic fixes. (#69)
* CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68)
* Ensure we get the latest SNAPSHOT of the serialisation code.
* CORDA-2871: Refactor SourceClassLoader to define source classes. (#66)
* Rewrite SourceClassLoader to support parent/child relationships.
* Revert catching TypNotPresebtException - it was a symptom of a bigger problem.
* Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader.
* SourceClassLoader.getResource() must delegate to its parent first.
* CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64)
* CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62)
* Make TaskExecutors implement BiFunction to make them composable.
* Create ImportTask to wrap a java.Function inside a sandbox.Function.
* Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader.
* Update serialization to use SandboxClassLoader.toSandboxClass().
* Remove a layer of lambdas from the serialisation code.
* Update SandboxExecutor and SandboxRawExecutor.
* Rename Executor to TaskFactory.
* Rename dangling executor -> taskFactory.
* CORDA-2871: Sanity fixes! (#63)
* Improve message for SandboxClassLoadingException.
* Fix serialisation API for using sandboxed environment.
* CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60)
* Update DJVM Example project for serialisation.
* Add serializers for InputStream and OpaqueBytesSubSequence.
* Support ZIP Inflater and CRC32 inside the sandbox.
* Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream.
* Configure tests also to preserve @DeprecatedConstructorForDeserialization.
* CORDA-3174: Implement Corda serialization modules. (#59)
* Create DJVM serialization modules.
* Create test cases for Array<T>, List<T> and List<Array<T>>.
* Refactor SandboxPrimiveSerializer for all primitive types.
* Implement SandboxCollectionSerializer to support Collection types.
* Implement SandboxMapSerializer to support Map types.
* Attempt to fix infinite loop when computing Collection and Map fingerprints.
* Apply special handling when deserialising sandbox.java.lang.Character.
* Remap Java primitive types to sandbox Java object types to deter evolution.
* Use Class.getPackage().getName() to determine sandbox package name.
* Implement SandboxEnumSerializer to support Enum types.
* Implement SandboxPublicKeySerializer to support Java security keys.
* Add serialization projects to the composite example project.
* Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer.
* Test that deserialising does not instantiate the untrusted user classes.
* Implement serializers for java.time.* types.
* Add serialiser for BitSet - currently disabled until BitSet itself is supported.
* Add serialisers for EnumSet and Class.
* Include support for EnumMap in the SandboxMapSerializer.
* Ensure the DJVM Example project's tests preserve @CordaSerializable.
* Add support for UUID as a primitive type.
* Use common abortReadOnly() method for declaring serialization as unsupported.
* Streamline the API for deserialising into the sandbox.
* Add preliminary support for deserialising X.509 certificates.
* Implement serializer for java.util.Optional.
* Refactor configuration of the sandbox serialization scheme.
* Add tests for deserialising arrays of basic types.
* Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped.
* Enable test for SandboxBitSetSerializer.
* Enable tests for X.509 serializers.
* Implement serializers for ProtonJ primitive types.
* Serialize java.util.Date as a primitive type.
* Add the bintray Gradle plugin to the serialisation modules.
* Do not publish serialisation modules - they will become part of Corda itself.

* CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true.

* Resolve DeteKT warnings.

* Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM.

* Enable DJVM for DemoBench nodes.

* Disable Quasar instrumentation verification for DemoBench nodes.

* Upgrade to DJVM 1.0-RC01.

* Try to modify DriverParameters in a more "ABI friendly" way.

* Refactor and simplify sandbox deserialisation of primitive objects.

* Review fixes.

* Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
Jonathan Locke
d9876f5537
[NOTICK] Ignore p2p messaging test (#5672)
[NOTICK] Ignore p2p messaging test (#5672)
2019-11-05 13:07:51 +00:00
LankyDan
532e4989d6 @Ignore P2PMessagingTest - communicating with a distributed service which we're part of 2019-11-05 11:52:32 +00:00
Dimos Raptis
485feb2d6c CORDA-3350: Increase size of constraints column (#5639)
* CORDA-3350: Increase size of constraints column (#5639)

* Detekt

* Update api file with new threshold

* Add check in transaction builder

* Revert "Add check in transaction builder"

This reverts commit ca3128f44c.

* Add check for max number of keys

* Update api file

* Address Tudor's comments

* Remove check for pre-5 and add test for EC keys

* fix typo and rename liquibase script

* updated docs with measurement numbers for composite keys

* Make detekt happy again
2019-11-05 11:00:26 +00:00
Stefano Franz
f9d8084d44
Merge pull request #5670 from corda/my_merge_branch
Merge OS 4.3 -> OS 4.4
2019-11-05 10:55:39 +00:00
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