Commit Graph

309 Commits

Author SHA1 Message Date
Ryan Fowler
5da114caa3 CORDA-3281: Drop some errors to warnings and clean up logic around (#5605)
shell "gracefulShutdown" command.
2019-10-22 11:02:04 +01:00
Dimos Raptis
a3adb4816a [CORDA-3304] - Add test for max attempts on reconnecting rpc 2019-10-17 16:27:50 +01:00
Dimos Raptis
5e78e0a7ae Add documentation and param renaming 2019-10-14 15:07:13 +01:00
Dimos Raptis
05a8f050e3 Shortening lines 2019-10-14 13:37:40 +01:00
Dimos Raptis
a7884c53aa [CORDA-3304] Introduce max number of retries per invocation for reconnecting rpc 2019-10-14 11:12:08 +01:00
Ryan Fowler
f5a966ee3b Revert "CORDA-3281: Add a check for shutdown to avoid some of the errors (#5562)" (#5578)
This reverts commit d983b7dd70.
2019-10-11 13:29:30 +01:00
Stefan Iliev
48fd78d059 CORDA-3236 fix observables not being tagged with notUsed() (#5557)
* Fixed not utilising the observables being returned by stateMachines added response with a notUsed(). Opening a ticket for implementation investigation.

* stateMachinesFeed will unsubscribe on interrupt rather than remaining infinitely subscribed.

* Fixed reported detekt issues on the InteractiveShell.

* Changes according to PR review.
2019-10-10 14:24:32 +01:00
Ryan Fowler
515d1088d5 CORDA-2979: Remove quasar from RPC client (#5572)
* CORDA-2979: Remove QUASAR from rpc-client

* CORDA-2979: Remove usage of QUASAR class since it's not used.  This
eventually triggers a check for the java agent that won't be run
for RPC clients.
2019-10-09 17:43:11 +01:00
Ryan Fowler
d983b7dd70 CORDA-3281: Add a check for shutdown to avoid some of the errors (#5562)
from the reconnecting RPC when we know the server is going away
2019-10-09 13:43:22 +01:00
Dimos Raptis
ec4d20d987 [CORDA-3243] - Improve CorDapp loading logic for duplicates (#5551) 2019-10-07 16:20:55 +01:00
Dimos Raptis
4f0c87a697 [CORDA-3274] - Enhance backwards compatibility logic to include Inter… (#5549)
* [CORDA-3274] - Enhance backwards compatibility logic to include InternalCordaRPCOps

* Add InternalCordaRPCOps in server-side backwards compatibility logic
2019-10-03 18:17:48 +01:00
Ryan Fowler
6ca4b589e2 CORDA-3091: Move executor thread management into CordaRPCConnection (#5491) 2019-09-26 17:48:07 +01:00
Viktor Kolomeyko
51330c2e44 CORDA-3232: Support of multiple interfaces for RPC calls (#5495)
* CORDA-3232: Make backward compatible RPC client changes

Such that it will be able to talk to new and old server versions.

* CORDA-3232: Make backward compatible RPC server changes

Such that it will be able to talk to new and old client versions.

* CORDA-3232: Trick Detekt

* CORDA-3232: Integration test for multi-interface communication.

* CORDA-3232: Add legacy mode test.

* CORDA-3232: Making Detekt happier

* CORDA-3232: Fix Detekt baseline after merge with `4.3` branch

* CORDA-3232: Incrementing Platform version

As discussed with @lockathan

* CORDA-3232: Fix legacy test post platform version increment

* CORDA-3232: Use recursive logic to establish complete population of method names

* Revert "CORDA-3232: Incrementing Platform version"

This reverts commit d75f48aa

* CORDA-3232: Remove logic that conditions on PLATFORM_VERSION

* CORDA-3232: Making Detekt happier

* CORDA-3232: Few more changes after conversation with @mnesbit

* CORDA-3232: Make a strict match to `CordaRPCOps` on client side

Or else will fail:
net.corda.tools.shell.InteractiveShellIntegrationTest.dumpCheckpoints creates zip with json file for suspended flow

Flagging that `InternalCordaRPCOps.dumpCheckpoints` cannot be called.

* CORDA-3232: Address PR comments by @rick-r3

* CORDA-3232: Address further review input from @rick-r3

* Change the way how methods stored in the map;
* Extend test to make sure that `CordaRPCOps` can indeed be mixed with other RPC interfaces.
2019-09-26 16:01:14 +01:00
josecoll
3fafbe551c
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
2019-09-18 10:26:26 +01:00
Ryan Fowler
75e66f9db9 CORDA-3141: Add GracefulReconnect callbacks which allow logic to be performed when RPC disconnects unexpectedly (#5430)
Also removed potential for growing stack trace on reconnects.
2019-09-17 10:00:27 +01:00
Zoltan Kiss
f171de7b69 TM-23 Fail build on compiler warnings (#5453)
* java compile respects compilation.allWarningsAsErrors

* suppress or cleanup warnings

* suppress warning

* use non-deprecated kotlin dependency

* rename property

* handle property existence check

* Deal with warnings
2019-09-11 16:34:51 +01:00
Dimos Raptis
1ac7715e28 [CORDA-2890] - Close security manager after broker is shut down (#5425) 2019-09-04 14:06:46 +01:00
Stefano Franz
a842740c9e
WIP Kubenetes parallel build (#5396)
* Split integration tests

* add simple example of printing all methods annotated with @Test

* add docker plugin to root project
remove docker plugin from child projects
add Dockerfile for image to use when testing
add task to build testing image to root project

* add comment describing proposed testing workflow

* simple attempt at running tests in docker container

* add my first k8s interaction script

* add fabric8 as dependnency to buildSrc

* before adding classpath

* collect reports from containers and run through testReports

* re-enable kubes backed testing

* for each project
1. add a list tests task
2. use this list tests task to modify the included tests
3. add a parallel version of the test task

* tweak logic for downloading test report XML files

* use output of parallel testing tasks in report tasks to determine build resultCode

* prepare for jenkins test

* prepare for jenkins test

* make docker reg password system property

* add logging to print out docker reg creds

* enable docker build

* fix gradle build file

* gather xml files into root project

* change log level for gradle modification

* stop printing gradle docker push passwd

* tidy up report generation

* fix compilation errors

* split signature constraints test into two

* change Sig constraint tests type hierarchy

* tidy up build.gradle

* try method based test includes

* add unit test for test listing

* fix  bug with test slicing

* stop filtering ignored tests to make the numbers match existing runs

* change log level to ensure print out

* move all plugin logic to buildSrc files

* tidy up test modification
add comments to explain what DistributedTesting plugin does

* move new plugins into properly named packages

* tidy up runConfigs

* fix compile errors due to merge with slow-integration-test work

* add system parameter to enable / disable build modification

* add -Dkubenetise to build command

* address review comments

* type safe declaration of parameters in KubesTest
2019-09-03 15:40:08 +00:00
Dimos Raptis
b97062bacc [CORDA-3098] - Close previous connection after reconnection (#5339) 2019-08-28 16:44:57 +01:00
Stefan Iliev
3a6787437d CORDA-3022 Add wildcard RPC permissions (#5174)
* Added small poc changes to accommodate requested permissions.

* Added node user that can only start flows and has the neccessary permissions.

* Fixed type in the rpc unit tests.

* Finaliase wildcard RPC permissions, remove builtin maintainer/nodeuser roles

* Tidy up
2019-08-28 15:29:06 +01:00
Stefano Franz
e35c0c1df7
CORDA-3009 - Migrate identity service to use to string short (#5217)
* migrate PersistentIdentityService to use key.toShortString()
update definition of PublicKeyToExternalId mapping to allow fast lookup by externalId/publicKey

* fix misspelled table name

* add test of migration script

* add design document for proposal to move IdentityService to using the correct PK.toStringShort() method for hashing a publickey

* add enterprise testing considerations to design

* address review comments

* fix compilation errors

* modify PublicKeyToOwningIdentityCache to use toStringShort() as it's lookup key

* address syzmon's code review comments
2019-08-28 14:16:18 +00:00
Jonathan Locke
e5f314ffbf Merge branch 'release/4' into jlocke/merge_4.1_20190827
Merged release/4 (Corda OS version 4.1) into a branch created from master (Corda OS version 4.3)

Conflicts:
	build.gradle
	client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt
	common/logging/build.gradle
	common/logging/src/main/kotlin/net/corda/common/logging/CordaVersion.kt
	constants.properties
	core-tests/src/test/kotlin/net/corda/coretests/utilities/ProgressTrackerTest.kt
	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
	docs/source/api-contract-constraints.rst
	docs/source/api-stability-guarantees.rst
	docs/source/app-upgrade-notes.rst
	docs/source/changelog.rst
	docs/source/clientrpc.rst
	docs/source/conf.py
	docs/source/corda-network/UAT.md
	docs/source/getting-set-up.rst
	docs/source/network-builder.rst
	docs/source/upgrading-cordapps.rst
	docs/source/versioning.rst
	node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt
	serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt
	serialization/src/main/kotlin/net/corda/serialization/internal/model/LocalTypeInformationBuilder.kt
	tools/network-builder/src/main/resources/node-Dockerfile
	tools/network-builder/src/main/resources/notary-Dockerfile
2019-08-27 14:51:22 +01:00
Stefan Iliev
7f3eca44dd Ignore RPCStability tests. (#5351)
* Added Ignore on repeatedly failing tests to start getting builds through.

* Added ignore reason and link to jira ticket.
2019-08-02 13:51:26 +01:00
James Higgs
5736a8e09f [CORDA-2923] Revert previous test fix and workaround other test failures (#5319)
* Revert "[CORDA-2923] Prevent connection threads leaking on reconnect (#5313)"

This reverts commit a204b50f5b.

* [CORDA-2923] Move CordaRPCClientReconnectionTest to prevent test failures
2019-07-23 09:05:56 +01:00
James Higgs
a204b50f5b [CORDA-2923] Prevent connection threads leaking on reconnect (#5313) 2019-07-19 15:28:44 +01:00
James Higgs
50d4ab6951 [CORDA-2923] Ensure the RPC connection is closed in Reconnection test (#5303) 2019-07-17 17:41:22 +01:00
Dimos Raptis
8962d930d4 [CORDA-2923] - Make the RPC client reconnect with gracefulReconnect param (#5244)
When set to true the RPC client will:

* automatically reconnect when the connection is broken
* simple RPC calls will block until connection is established
* Observables returned from RPC will automatically resubscribe on reconnect so the client continues to receive events. This doesn't guarantee that events will not be lost during the reconnect.
2019-07-16 11:29:21 +01:00
Stefano Franz
88894bc592
add a shared memory port allocator to allow multiple processes to sha… (#5223)
* add a shared memory port allocator to allow multiple processes to share a single allocation pool

* remove dangerous reset function on port allocator

* set forkCount = 2 in node integration test

* only allow one build of a cordapp at any given time for Driver tests

* make all portallocation requests use same starting point

* globally set forks to 6

* tweak forking parameters to allow parallel builds

* tweak unit test parallelism

* 2 workers for integrationTest

* some more tweaks for parallel builds

* some more tweaks for parallel builds

* seems that 49K is not the start of ephemeral ports on all kernels

* tweak parallel settings

* try fix RPC shutdown test in parallel env

* add some logging for RPC shutdown test

* added some logging around PortAllocation tests - try figure out where they are getting stuck

* added some logging around PortAllocation tests - try figure out where they are getting stuck

* fix api-scanner tests

* minimize api changes

* revert to complying with existing API

* add the AtomicInteger for api compatibility reasons

* make sizing script executable

* address review comments pt1

* address review comments pt2

* fix compile errors after review comments

* return to using home dir as temp dir seemed to interact badly with gradle
2019-07-02 18:38:33 +00:00
Pranav Kotamraju
ebe3169826 CORDA-3034. Reconnecting Rpc will now not wait only for 60 min after normal operation (#5262) 2019-06-27 18:03:06 +01:00
Shams Asari
2e02968c63
ENT-3496: dumpCheckpoints shell command (#5171)
Dumps all the node's checkpoints as JSON into a single zip file in the node's directory. The output contains:

* All the fields for the top-level flow
* The current sub-flow call stack, along with the current progress tracker step for each sub-flow
* The event that suspended the flow, which if it's a send or sendAndReceive will show the payload that was sent
* Low level information on the active sessions with other peers
2019-06-26 15:31:02 +01:00
LankyDan
31a0c077b8 ENT-3496 Move dumpCheckpoints to the new InternalCordaRPCOps interface
To prevent making `dumpCheckpoints` part of the public API a new
interface, `InternalCordaRPCOps` has been created and the function
has been moved there. `InternalCordaRPCOps` inherits from
`CordaRPCOps`.

`CordaRPCOpsImpl` now implements `InternalCordaRPCOps`.

`RunShellCommand` and `StringToMethodCallParser` required additional
changes due to issues handling inherited functions. This has only been
raised now due to `InternalCordaRPCOps` inheriting from `CordaRPCOps`.

Many classes have had references to `CordaRPCOps` changed to
`InternalCordaRPCOps`.
2019-06-10 16:15:03 +01:00
Rick Parker
0c0101948b
CORDA-2981 Disable slow consumers for RPC since it doesn't work. (#5194)
* CORDA-2981 Disable slow consumers for RPC since it doesn't work.
2019-06-05 11:47:38 +01:00
Rick Parker
d6ac4e2393
CORDA-2838 Set Artemis memory config. (#5011)
* CORDA-2838 Set Artemis memory config.

* CORDA-2838 Cannot have page size larger than max size.

* CORDA-2838 Use real slow consumers.  Need to see if the old config settings can work with a global limit to avoid this.
2019-05-23 14:30:11 +01:00
Chris Rankin
b9f7c1a08a CORDA-2893, ENT-3422: Tweak JUnit 5 configurations to keep vintage engine off compile classpaths. (#5138)
* Tweak JUnit 5 configurations to keep vintage engine off compile classpaths.

* Configure Gradle tests to use JUnit 5.
2019-05-20 11:57:56 +01:00
Dominic Fox
0b63157a4b ENT-3422 Add JUnit 5 dependencies to all projects (#5084)
* ENT-3422 Add JUnit 5 dependencies to all projects

* Remove explicit junit 4 imports where not needed

* Minor PR fixes

* Limit import scope
2019-05-15 16:40:12 +01:00
Dimos Raptis
a468bee0ed [CORDA-2473] - Remove AMQP system property (#5112) 2019-05-14 13:22:22 +01:00
Tudor Malene
7b0d177a34 More leniency with auth errors in RpcReconnectTests (#5061) 2019-04-26 15:17:26 +01:00
Rick Parker
45b2d06936
CORDA-2845 Drop the acknowledge window for RPC responses to 16KB from 1MB because the memory footprint is multipled by the number of RPC clients. (#4997) 2019-04-26 09:33:27 +01:00
Tudor Malene
555abc193e CORDA-2886 - Better handling of authentication error when re-connecting to RPC in RpcReconnectTest (#5052) 2019-04-25 13:40:25 +01:00
Tudor Malene
5821ad5f5c CORDA-2743: Tweak RPC reconnecting test. Adjust the exponential retry factor. (#5026) 2019-04-17 10:56:55 +01:00
Tudor Malene
21adcffd31 CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) (#5015)
(cherry picked from commit 6771386b4b)
2019-04-15 10:25:55 +01:00
Tudor Malene
6771386b4b CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) 2019-04-12 14:03:38 +01:00
Dominic Fox
c2ad64ccde CORDA-2802 use eventually to wait (#4932)
* CORDA-2802 use eventually to wait

* Catch Exception, not Throwable
2019-03-26 16:01:06 +00:00
Jonathan Locke
3e4a5976d8 Revert "CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables (#4920)"
This reverts commit 12e7897316.
2019-03-26 12:18:45 +01:00
josecoll
12e7897316
CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables (#4920)
* CORDA-2782 Add Comparable to default whitelist for vault query criteria using comparables

* Commit the java.lang.Comparable type.

* Fix broken unit test in serialization-deterministic
2019-03-25 11:59:39 +00:00
Chris Rankin
ea263b3e54 CORDA-2569: Add "flow kill <ID>" command to Corda's shell. (#4861)
* CORDA-2569: Add "flow kill <ID>" command to Corda's shell.

* Add testing and documentation for RPC killFlow operation.
2019-03-08 16:39:22 +00:00
Mike Hearn
96134c8cfa Bugfix: register SwapIdentitiesHandler again. (#4789) 2019-02-19 18:42:32 +00:00
Shams Asari
c39c61ecab
CORDA-2467: Moved non-contract things out of finance-contracts and into finance-workflows (#4700)
This includes all of the cash selection logic, JSON support using jackson and a bunch of utilities which are not relevant to contract verification. The exception to this are Interpolator which has been moved to the IRS demo, and PhysicalLocationStructures.kt which is now in explorer.
2019-02-01 17:31:12 +00:00
Dimos Raptis
fbb00bff9c
[CORDA-2431] - Small refactorings following-up on PR-4551 (#4564)
* Small refactorings following-up on PR-4551

* Adjust thread context class loader

* Address Shams' comments
2019-01-15 14:34:11 +00:00
Shams Asari
24a7821dce
CORDA-2434: CordaRPCClient now only has c'tors rather a mix of c'tors and factory methods (#4569) 2019-01-14 16:07:56 +00:00