profile
viewpoint
Roy Clarkson royclarkson 🍃👨🏻‍💻

joshlong/the-spring-rest-stack 350

the deck to my talk on building more powerful REST APIs

gregturn/spring-a-gram 98

Use Spring Data REST to upload, store, and manage pictures

royclarkson/bookstore-service-broker 1

Sample application for Spring Cloud Open Service Broker

cppwfs/SD2017 0

Spring Days 2017 presentation

cppwfs/spring-primer-talk 0

Materials that apply to a overview of the Spring Framework and projects.

royclarkson/androidannotations 0

Fast Android Development. Easy maintainance.

royclarkson/bosh-lite 0

A lite development env for BOSH

PR opened cppwfs/cpmtask

Add binaries
+46 -0

0 comment

6 changed files

pr created time in 13 days

push eventroyclarkson/cpmtask

Glenn Renfro

commit sha 2a93a489a4aad89e7b85ea2cc49f8f1fa61ca42c

Updated to add ssh

view details

Roy Clarkson

commit sha 0976b9311c7ef724164f928bb8e0c32f35461d54

Add build scripts

view details

Roy Clarkson

commit sha 90512edcac6b1f3999bd1b6a8b47813c74e7b63c

Add binaries

view details

push time in 13 days

push eventroyclarkson/cpmtask

Roy Clarkson

commit sha 12c436f3cdc18e7213c86c56b8c870f162ab7e08

Add schema.sql

view details

push time in 14 days

push eventroyclarkson/cpmtask

Roy Clarkson

commit sha 3d80d6e309c4684a5c922f87075b04e8807c1cca

Update binaries

view details

push time in 14 days

push eventroyclarkson/cpmtask

Roy Clarkson

commit sha 68d4192daa257c9ec20bc6781eee84fccc885c2b

Include db schema in app binary

view details

push time in 14 days

push eventroyclarkson/cpmtask

Roy Clarkson

commit sha 1065d03182844d3638e0308a9f37b7afb7b37cc9

Add build scripts

view details

Roy Clarkson

commit sha 857b17d8511ce2f8b34475577f34c0f1a9a6f9b6

Add binaries

view details

push time in 14 days

issue openedspring-cloud/spring-cloud-app-broker

Test against Java 11

The project is currently built against Java 8, however no tests are run against Java 11, the current LTS version of Java.

created time in 20 days

startedmbhave/release-notes-generator

started time in 21 days

startedcheckstyle/checkstyle

started time in 21 days

Pull request review commentspring-cloud/spring-cloud-app-broker

Deleting CredHub permissions on unbind

 public CredHubPersistingDeleteServiceInstanceBindingWorkflow(ReactiveCredHubOper 		DeleteServiceInstanceBindingResponseBuilder responseBuilder) { 		return buildCredentialName(request.getServiceDefinitionId(), request.getBindingId()) 			.filterWhen(this::credentialExists)-			.flatMap(credentialName -> credHubOperations.credentials()-				.deleteByName(credentialName)-				.doOnRequest(-					l -> LOG.debug("Deleting binding credentials with name '{}' in CredHub", credentialName.getName()))-				.doOnSuccess(r -> LOG-					.debug("Finished deleting binding credentials with name '{}' in CredHub", credentialName.getName()))-				.doOnError(exception -> LOG.error(-					String.format("Error deleting binding credentials with name '%s' in CredHub with error: '%s'",-						credentialName.getName(), exception.getMessage()), exception)))+			.flatMap(deleteCredential())+			.flatMap(deletePermission()) 			.thenReturn(responseBuilder); 	} +	private Function<ServiceInstanceCredentialName, Mono<ServiceInstanceCredentialName>> deleteCredential() {

My preference is to return Reactor types instead of functions. I find it more readable and maintainable. That said, this is perfectly fine and looks clean. Happy to discuss further.

Albertoimpl

comment created time in 21 days

release spring-cloud/spring-cloud-app-broker

v1.1.0.M1

released time in 22 days

push eventspring-cloud/spring-cloud-app-broker

Spring Buildmaster

commit sha 1f1b8be1ca81b8207d3b327a0e54b8403c8e01ce

Release v1.1.0.M1

view details

Roy Clarkson

commit sha 20b3143bf3bd589e4e0aadca1a950a8ed7cf054a

Increment version to 1.1.0.BUILD-SNAPSHOT

view details

push time in 22 days

push eventspring-cloud-samples/spring-cloud-app-broker-samples

Roy Clarkson

commit sha 418cd7f1ff868f7a3c6785c809e46a155c45a920

Polish reactive code and add tests

view details

push time in 23 days

push eventroyclarkson/spring-cloud-app-broker

Roy Clarkson

commit sha 3f9686e0ceeecf31beaff10c5e139022ec18a0da

Do not apply maven plugin to all projects

view details

push time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha 3f9686e0ceeecf31beaff10c5e139022ec18a0da

Do not apply maven plugin to all projects

view details

push time in a month

push eventroyclarkson/spring-cloud-app-broker

Roy Clarkson

commit sha e90ad83cd0cb444ff9b5b67ffae9cd2067dbd449

Upgrade to pmd 6.21.0

view details

Roy Clarkson

commit sha 027baa1dd5c8d0fa1c304151bd3c2e13564098bf

Upgrade to checkstyle 8.29

view details

push time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha e90ad83cd0cb444ff9b5b67ffae9cd2067dbd449

Upgrade to pmd 6.21.0

view details

Roy Clarkson

commit sha 027baa1dd5c8d0fa1c304151bd3c2e13564098bf

Upgrade to checkstyle 8.29

view details

push time in a month

push eventroyclarkson/spring-cloud-app-broker

Roy Clarkson

commit sha e5802e6602be76974bdb392eecb09b86aedbd4c4

Document example implementation of ServiceInstanceStateRepository - Add example implementation in reference docs - Include warning in javadoc and reference about using in mem implementation in production Resolves #257. Resolves #314

view details

Roy Clarkson

commit sha 926cda2c62916157cce73bd2dcc10ae7ce9a7e11

Log warnings when auto-configuration enables an InMemory repository Resolves #334

view details

push time in a month

delete branch spring-cloud/spring-cloud-app-broker

delete branch : 257-state-repository-docs

delete time in a month

delete branch spring-cloud/spring-cloud-app-broker

delete branch : 334-in-memory-repo-warning

delete time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha 926cda2c62916157cce73bd2dcc10ae7ce9a7e11

Log warnings when auto-configuration enables an InMemory repository Resolves #334

view details

push time in a month

issue closedspring-cloud/spring-cloud-app-broker

Log WARNING when using InMemory repositories

Log WARNING message when one of the InMemory repository implementation is chosen by autoconfiguration so that people can also see it on their logs.

closed time in a month

Albertoimpl

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha e5802e6602be76974bdb392eecb09b86aedbd4c4

Document example implementation of ServiceInstanceStateRepository - Add example implementation in reference docs - Include warning in javadoc and reference about using in mem implementation in production Resolves #257. Resolves #314

view details

push time in a month

PR merged spring-cloud/spring-cloud-app-broker

Document example implementation of ServiceInstanceStateRepository
  • Add example implementation in reference docs
  • Include warning in javadoc and reference about using in mem implementation in production

Resolves #257. Resolves #314

+351 -4

2 comments

12 changed files

royclarkson

pr closed time in a month

issue closedspring-cloud/spring-cloud-app-broker

Document that the default behaviour of ServiceInstanceStateRepository

At the moment, we default to an InMemoryServiceInstanceStateRepository. However, we should recommend and provide an example of a better one using a persistence model.

closed time in a month

Albertoimpl

issue closedspring-cloud/spring-cloud-app-broker

Update docs to specify that the in memory state repositories should only be used for testing

The in memory state repositories should absolutely not be used for production as they will lose their state if the application restarts. An implementing application should utilize a persistence storage for these state repositories. Related to #254.

closed time in a month

royclarkson

pull request commentspring-cloud/spring-cloud-app-broker

Document example implementation of ServiceInstanceStateRepository

@Albertoimpl I've added the binding reference examples and docs too, for your review.

royclarkson

comment created time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha b8c9290d54105cb458b173bbf57c0c9b79196d04

Document example implementation of ServiceInstanceStateRepository - Add example implementation in reference docs - Include warning in javadoc and reference about using in mem implementation in production Resolves #257. Resolves #314

view details

push time in a month

push eventroyclarkson/spring-cloud-app-broker-samples

Roy Clarkson

commit sha fbb831e4a774e3d9eb095917591b17ac7dee90a6

Polish reactive code and add tests

view details

push time in a month

issue openedspring-cloud/spring-cloud-app-broker

Rename ServiceInstanceStateRepository

In retrospect it's not a good name. ServiceInstanceStateService seems better.

created time in a month

PR opened spring-cloud/spring-cloud-app-broker

Reviewers
Document example implementation of ServiceInstanceStateRepository
  • Add example implementation in reference docs
  • Include warning in javadoc and reference about using in mem implementation in production

Resolves #257. Resolves #314

+177 -4

0 comment

8 changed files

pr created time in a month

create barnchspring-cloud/spring-cloud-app-broker

branch : 257-state-repository-docs

created branch time in a month

push eventroyclarkson/spring-cloud-app-broker

Roy Clarkson

commit sha 80f035728c92d23e4ac3555183a18c1b37c10a4e

Truncate app name if too long when using `ServiceInstanceGuidSuffix` Resolves #204

view details

Alberto Rios

commit sha 566c5b77f44b7b1299db3e42be213f38e4c0629f

Adding links to gitter channel

view details

Roy Clarkson

commit sha d47b1502b9568bc147ec44c450ef2e0a742834ed

Do not include tests in docs and distribution zips - Correct the javadoc exclusion path to the acceptance and integration tests - Remove starters, docs and test jars from distribution zip Resolves #269

view details

Alberto Rios

commit sha f04ac8d38018ce5a72d737b99fc3717f47878feb

Replacing InMemory Map data structure To avoid blocking from time to time: #313 this commit replaces the Map implementation by a ConcurrentSkipListMap, it might not be the most efficient way to store this information, but, considering the order of magnitude we are dealing with and, the fact that the reading time is around logaritmic, should be good enough for this use case. [Finishes #313]

view details

Ben Klein

commit sha 4a985e5adb658c62ec0d4aab45f14da4a29cef57

Move to new Spring docs style

view details

Roy Clarkson

commit sha 9db5ce4c4cd2eea3803b27ce059dc036459869ac

Extract versions and urls from reference docs

view details

Roy Clarkson

commit sha c955c12a9a604f88465513b9fcefde704ac20873

Improve use of code blocks in reference docs

view details

Roy Clarkson

commit sha 082daa29253f04b734cabbbb9a0c0f1783f25a04

Do not apply pmd and checkstyle plugins against docs subproject

view details

push time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha 9db5ce4c4cd2eea3803b27ce059dc036459869ac

Extract versions and urls from reference docs

view details

Roy Clarkson

commit sha c955c12a9a604f88465513b9fcefde704ac20873

Improve use of code blocks in reference docs

view details

Roy Clarkson

commit sha 082daa29253f04b734cabbbb9a0c0f1783f25a04

Do not apply pmd and checkstyle plugins against docs subproject

view details

push time in a month

issue openedspring-cloud/spring-cloud-app-broker

Update javadoc

Enable pmd rules and add missing javadoc

created time in a month

issue closedspring-cloud/spring-cloud-app-broker

Use latest Spring style in docs

As implemented in Spring Cloud Open Service Broker docs build file with these commits:

  • https://github.com/spring-cloud/spring-cloud-open-service-broker/commit/d55bc84b5640d57490d823ae6590585f678805cb
  • https://github.com/spring-cloud/spring-cloud-open-service-broker/commit/e6700a0b18aae5c30f8e50a449789816cf0a69bf

closed time in a month

scottfrederick

issue commentspring-cloud/spring-cloud-app-broker

Use latest Spring style in docs

Closed in 4a985e5adb658c62ec0d4aab45f14da4a29cef57

scottfrederick

comment created time in a month

push eventspring-cloud/spring-cloud-app-broker

Ben Klein

commit sha 4a985e5adb658c62ec0d4aab45f14da4a29cef57

Move to new Spring docs style

view details

push time in a month

issue closedspring-cloud/spring-cloud-app-broker

InMemoryServiceInstanceBindingStateRepositoryTest.ensureConcurrency blocks

Since we are using BlockHound our test implementation of the InMemoryServiceInstanceBindingStateRepository and the InMemoryServiceInstanceStateRepositoryhttps://github.com/spring-cloud/spring-cloud-app-broker/blob/master/spring-cloud-app-broker-core/src/main/java/org/springframework/cloud/appbroker/state/InMemoryServiceInstanceStateRepository.java#L30 blocks from time to time when restructuring the tree in ConcurrentHashMap

        private final void lockRoot() {
            if (!U.compareAndSwapInt(this, LOCKSTATE, 0, WRITER))
                contendedLock(); // offload to separate method
        }

closed time in a month

Albertoimpl

issue commentspring-cloud/spring-cloud-app-broker

InMemoryServiceInstanceBindingStateRepositoryTest.ensureConcurrency blocks

Closed in f04ac8d38018ce5a72d737b99fc3717f47878feb

Albertoimpl

comment created time in a month

delete branch spring-cloud/spring-cloud-app-broker

delete branch : in-memory-reactive-blocking

delete time in a month

push eventspring-cloud/spring-cloud-app-broker

Alberto Rios

commit sha f04ac8d38018ce5a72d737b99fc3717f47878feb

Replacing InMemory Map data structure To avoid blocking from time to time: #313 this commit replaces the Map implementation by a ConcurrentSkipListMap, it might not be the most efficient way to store this information, but, considering the order of magnitude we are dealing with and, the fact that the reading time is around logaritmic, should be good enough for this use case. [Finishes #313]

view details

push time in a month

PR merged spring-cloud/spring-cloud-app-broker

Replacing InMemory Map data structure

To avoid blocking from time to time: #313 this commit replaces the Map implementation by a ConcurrentSkipListMap, it might not be the most efficient way to store this information, but, considering the order of magnitude we are dealing with and, the fact that the reading time is around logaritmic, should be good enough for this use case.

[Finishes #313]

+11 -14

1 comment

4 changed files

Albertoimpl

pr closed time in a month

issue closedspring-cloud/spring-cloud-app-broker

Update reference docs to reflect apps and services hierarchy

Currently App Broker users can't create a backing service instance unless it is bound to an application. App Broker users are also unable to have multiple apps bind to the same backing service instance.

Rather than using configuration like:

spring.cloud.appbroker.services:
- service-name: example
  plan-name: standard
  apps:
  - name: example-app1
    services:
    - service-instance-name: ...
      name: ...
      plan: ...

consider using configuration like:

spring.cloud.appbroker.services:
- service-name: example
  plan-name: standard
  services:
    service1:
      service-instance-name: backing-service-1
      name: ...
      plan: ...
    service2:
      service-instance-name: backing-service-2
      name: ...
      plan: ...
    unbound-service-instance:
      service-instance-name: service3
      name: ...
      plan: ...
  apps:
  - name: example-app1
    bound-service-instances:
      service1:
      service2:
        binding-parameters: { ... }
  - name: example-app2
    bound-service-instances:
      service1:

closed time in a month

mheath

issue commentspring-cloud/spring-cloud-app-broker

Update reference docs to reflect apps and services hierarchy

I reviewed the current docs and it appears the services and apps hierarchy has been updated already.

mheath

comment created time in a month

issue openedspring-cloud/spring-cloud-app-broker

Review access to members and classes

Consider reducing scope to package private where reasonable and removing the pmd rule

created time in a month

delete branch spring-cloud/spring-cloud-app-broker

delete branch : 269-do-not-publish-acceptance-test

delete time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha d47b1502b9568bc147ec44c450ef2e0a742834ed

Do not include tests in docs and distribution zips - Correct the javadoc exclusion path to the acceptance and integration tests - Remove starters, docs and test jars from distribution zip Resolves #269

view details

push time in a month

PR merged spring-cloud/spring-cloud-app-broker

Do not include tests in docs and distribution zips
  • Correct the javadoc exclusion path to the acceptance and integration tests
  • Remove starters, docs and test jars from distribution zip

Resolves #269

+8 -3

1 comment

1 changed file

royclarkson

pr closed time in a month

issue closedspring-cloud/spring-cloud-app-broker

Stop publishing acceptance and integration tests jars and api docs in distribution zips

We should exclude those modules from publishing when building the SNAPSHOTs.

closed time in a month

Albertoimpl

PR opened spring-cloud/spring-cloud-app-broker

Reviewers
Do not include tests in docs and distribution zips
  • Correct the javadoc exclusion path to the acceptance and integration tests
  • Remove starters, docs and test jars from distribution zip

Resolves #269

+8 -3

0 comment

1 changed file

pr created time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha 9d3af34eb9cd3bc93a138e431e1fbeaf94a06ff9

Do not include tests in docs and distribution zips - Correct the javadoc exclusion path to the acceptance and integration tests - Remove starters, docs and test jars from distribution zip Resolves #269

view details

push time in a month

issue commentspring-cloud/spring-cloud-app-broker

Configure properties metadata for IntelliJ autocomplete support

The Spring Boot Metadata annotation processor is already in place. See https://github.com/spring-cloud/spring-cloud-app-broker/blob/master/spring-cloud-app-broker-autoconfigure/build.gradle#L35

royclarkson

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Interests in orange contributions supporting osb-cmdb use-cases ?

There are are couple or three issues that potentially imply breaking changes, or at least we should consider as major breaking changes. See #244, #241, and #243. I'm seeing these as candidates for a 2.x release.

gberche-orange

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Make integration testing a first class citizen

hmm. we could also potentially eliminate a lot of the mocked OSBAPI requests and responses in our current integration tests. I'm already liking the sound of this. Unfortunately, this feels like an architecture change that would need to happen in a 2.x timeframe.

mheath

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Add SPeL support to services configuration

eliminate the need for parameters transformers

That's a significant breaking change.

mheath

comment created time in a month

issue openedspring-cloud/spring-cloud-app-broker

Replace `InMemoryServiceInstanceStateRepository` with real database

This implementation was meant to be obviously the wrong thing to use in a production application, but now it's causing problems with Reactor and BlockHound (see #313). Let's replace it with a real Reactive data repository and deprecate this one (or remove it entirely).

created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Consider moving backing services configuration to `apps` level

Added #323 to cover the properties metadata.

mheath

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Interests in orange contributions supporting osb-cmdb use-cases ?

@gberche-orange it appears that you've created issues for all of your items you listed here. If that's the case, can we close this issue? We'll continue to review and include as many of your PRs as possible.

gberche-orange

comment created time in a month

delete branch spring-cloud/spring-cloud-app-broker

delete branch : 204-truncate-app-name-with-guid-suffix

delete time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha 80f035728c92d23e4ac3555183a18c1b37c10a4e

Truncate app name if too long when using `ServiceInstanceGuidSuffix` Resolves #204

view details

push time in a month

issue closedspring-cloud/spring-cloud-app-broker

ServiceInstanceGuidSuffix only works with short service names

It turns out that CF only supports service names up to a length of 50 characters. With a 36 char guid forming part of the final name, that makes it quite likely that users will specify a service name prefix that results in the final name overrunning the allowed number of characters, which results in an error like this:

2019-02-13 05:54:07.744 ERROR 8 --- [ry-client-nio-2] pDeploymentCreateServiceInstanceWorkflow : Error creating backing services for p.config-server-alpha/standard with error 'CF-ServiceInstanceNameTooLong(60009): You have requested an invalid service instance name. Names are limited to 50 characters.'

Would it make sense for App Broker to truncate the service name prefix to ensure that the final name fits within the limit? Or could it fail fast somehow?

closed time in a month

spikymonkey

issue commentspring-cloud/spring-cloud-app-broker

Cleanup ATs after unsuccessful run

I just got bit again by this today and lost half an hour. 🙃

Albertoimpl

comment created time in a month

issue closedspring-cloud/spring-cloud-app-broker

Consider moving all CI from Bamboo to Concourse

The main goals of the Bamboo build are to:

  • compile and run tests
  • automatically publish snapshot builds to Spring Artifactory
  • facilitate publishing of milestones, release candidates, and releases to Spring Artifactory and Maven Central

closed time in a month

scottfrederick

issue commentspring-cloud/spring-cloud-app-broker

Consider moving all CI from Bamboo to Concourse

Closing this because we now have a working pipeline

scottfrederick

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Allow more control over CredHub paths

@Albertoimpl Is this related to the CredHub concerns we were discussing? If so, let's add it to 1.1.0.M2.

spikymonkey

comment created time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha fbe1c75465f35d105b76313e41a382687882ac0d

Upgrade to Spring Boot 2.2.4.RELEASE

view details

Roy Clarkson

commit sha 647f84eb5b1c2d5c323ac6414a73252df8f24fe2

Truncate app name if too long when using `ServiceInstanceGuidSuffix` Resolves #204

view details

push time in a month

delete branch spring-cloud/spring-cloud-app-broker

delete branch : boot-upgrade

delete time in a month

push eventroyclarkson/spring-cloud-app-broker

Roy Clarkson

commit sha fbe1c75465f35d105b76313e41a382687882ac0d

Upgrade to Spring Boot 2.2.4.RELEASE

view details

push time in a month

push eventspring-cloud/spring-cloud-app-broker

Roy Clarkson

commit sha fbe1c75465f35d105b76313e41a382687882ac0d

Upgrade to Spring Boot 2.2.4.RELEASE

view details

push time in a month

Pull request review commentspring-cloud/spring-cloud-app-broker

Truncate app name if too long when using `ServiceInstanceGuidSuffix`

 void shouldAddPropertiesToAllBackingApps() { 	}  	@Test-	void shouldAddNameAsServiceInstanceGuidSuffix() {-		TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();-		BackingApplication backingApplication = BackingApplication.builder().name("app-name").build();+	void shouldAddShortNameAsServiceInstanceGuidSuffix() {+		final String appName = "app-name";+		final String serviceInstanceId = UUID.randomUUID().toString();+		final TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();+		final BackingApplication backingApplication = BackingApplication.builder().name(appName).build();++		assertUsingAvailableLength(serviceInstanceId, appName);++		StepVerifier.create(targetService.addToBackingApplications(singletonList(backingApplication), targetSpec,+				serviceInstanceId))+				.assertNext(backingApplications -> assertThat(backingApplications.get(0).getName())+						.isEqualTo(assembleNameWithGuidSuffix(appName, serviceInstanceId)))+				.verifyComplete();+	} -		List<BackingApplication> backingApplications =-			targetService-				.addToBackingApplications(singletonList(backingApplication), targetSpec, "guid")-				.block();+	@Test+	void shouldAddLongNameAsServiceInstanceGuidSuffix() {+		final String appName = "this-is-a-much-longer-app-name-that-will-require-truncation";+		final String serviceInstanceId = UUID.randomUUID().toString();+		final TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();+		final BackingApplication backingApplication = BackingApplication.builder().name(appName).build();++		final String truncatedAppName = appName.substring(0, calculateAvailableLength(serviceInstanceId));+		assertUsingAvailableLength(serviceInstanceId, truncatedAppName);++		StepVerifier.create(targetService.addToBackingApplications(singletonList(backingApplication), targetSpec,+				serviceInstanceId))+				.assertNext(backingApplications -> assertThat(backingApplications.get(0).getName())+						.isEqualTo(assembleNameWithGuidSuffix(truncatedAppName, serviceInstanceId)))+				.verifyComplete();+	}++	@Test+	void shouldAddMaxLengthNameAsServiceInstanceGuidSuffix() {+		final String appName = "maxlengthname";+		final String serviceInstanceId = UUID.randomUUID().toString();+		final TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();+		final BackingApplication backingApplication = BackingApplication.builder().name(appName).build();++		assertUsingAvailableLength(serviceInstanceId, appName);++		StepVerifier.create(targetService.addToBackingApplications(singletonList(backingApplication), targetSpec,+				serviceInstanceId))+				.assertNext(backingApplications -> assertThat(backingApplications.get(0).getName())+						.isEqualTo(assembleNameWithGuidSuffix(appName, serviceInstanceId)))+				.verifyComplete();+	}++	private String assembleNameWithGuidSuffix(String appName, String serviceInstanceId) {+		return appName + CONCAT_DELIM + serviceInstanceId;+	}++	private int calculateAvailableLength(String serviceInstanceId) {+		return CF_SERVICE_NAME_MAX_LENGTH - CONCAT_DELIM.length() - serviceInstanceId.length();+	}

ok, redesigned the tests. thanks.

royclarkson

comment created time in a month

push eventspring-cloud/spring-cloud-app-broker

Yuxin Bai

commit sha b0f2cbc5f4738cb0df8b5d06f3a9888c0188dc06

`UpdateServiceInstance` creates/binds new backing services and unbinds/deletes old backing services. To keep the behavior consisten, also updated delete flow to delete backing services that the backing app are actually bound to. As part of making the new AT pass, moved delete backing services step to before deleting backing app. Connects to #293

view details

Roy Clarkson

commit sha 2d94b66d1a5ca3589347d1d8aa7ac38745dbddd8

Truncate app name if too long when using `ServiceInstanceGuidSuffix` Resolves #204

view details

push time in a month

push eventroyclarkson/spring-cloud-app-broker

Yuxin Bai

commit sha b0f2cbc5f4738cb0df8b5d06f3a9888c0188dc06

`UpdateServiceInstance` creates/binds new backing services and unbinds/deletes old backing services. To keep the behavior consisten, also updated delete flow to delete backing services that the backing app are actually bound to. As part of making the new AT pass, moved delete backing services step to before deleting backing app. Connects to #293

view details

push time in a month

Pull request review commentspring-cloud/spring-cloud-app-broker

Truncate app name if too long when using `ServiceInstanceGuidSuffix`

 void shouldAddPropertiesToAllBackingApps() { 	}  	@Test-	void shouldAddNameAsServiceInstanceGuidSuffix() {-		TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();-		BackingApplication backingApplication = BackingApplication.builder().name("app-name").build();+	void shouldAddShortNameAsServiceInstanceGuidSuffix() {+		final String appName = "app-name";+		final String serviceInstanceId = UUID.randomUUID().toString();+		final TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();+		final BackingApplication backingApplication = BackingApplication.builder().name(appName).build();++		assertUsingAvailableLength(serviceInstanceId, appName);++		StepVerifier.create(targetService.addToBackingApplications(singletonList(backingApplication), targetSpec,+				serviceInstanceId))+				.assertNext(backingApplications -> assertThat(backingApplications.get(0).getName())+						.isEqualTo(assembleNameWithGuidSuffix(appName, serviceInstanceId)))+				.verifyComplete();+	} -		List<BackingApplication> backingApplications =-			targetService-				.addToBackingApplications(singletonList(backingApplication), targetSpec, "guid")-				.block();+	@Test+	void shouldAddLongNameAsServiceInstanceGuidSuffix() {+		final String appName = "this-is-a-much-longer-app-name-that-will-require-truncation";+		final String serviceInstanceId = UUID.randomUUID().toString();+		final TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();+		final BackingApplication backingApplication = BackingApplication.builder().name(appName).build();++		final String truncatedAppName = appName.substring(0, calculateAvailableLength(serviceInstanceId));+		assertUsingAvailableLength(serviceInstanceId, truncatedAppName);++		StepVerifier.create(targetService.addToBackingApplications(singletonList(backingApplication), targetSpec,+				serviceInstanceId))+				.assertNext(backingApplications -> assertThat(backingApplications.get(0).getName())+						.isEqualTo(assembleNameWithGuidSuffix(truncatedAppName, serviceInstanceId)))+				.verifyComplete();+	}++	@Test+	void shouldAddMaxLengthNameAsServiceInstanceGuidSuffix() {+		final String appName = "maxlengthname";+		final String serviceInstanceId = UUID.randomUUID().toString();+		final TargetSpec targetSpec = TargetSpec.builder().name("ServiceInstanceGuidSuffix").build();+		final BackingApplication backingApplication = BackingApplication.builder().name(appName).build();++		assertUsingAvailableLength(serviceInstanceId, appName);++		StepVerifier.create(targetService.addToBackingApplications(singletonList(backingApplication), targetSpec,+				serviceInstanceId))+				.assertNext(backingApplications -> assertThat(backingApplications.get(0).getName())+						.isEqualTo(assembleNameWithGuidSuffix(appName, serviceInstanceId)))+				.verifyComplete();+	}++	private String assembleNameWithGuidSuffix(String appName, String serviceInstanceId) {+		return appName + CONCAT_DELIM + serviceInstanceId;+	}++	private int calculateAvailableLength(String serviceInstanceId) {+		return CF_SERVICE_NAME_MAX_LENGTH - CONCAT_DELIM.length() - serviceInstanceId.length();+	}

Yep, I see your point. Thanks! We do need to validate that case where the resulting name is less than 50 chars as well. While I don't like duplicating code, I do consider the goal of the test to be to validate the expected results. Even if the code to do that is basically the same now, the new name still needs to be determined somehow for comparison. But I'll reduce that duplication and update the PR.

royclarkson

comment created time in a month

push eventspring-cloud/spring-cloud-app-broker

Yuxin Bai

commit sha b0f2cbc5f4738cb0df8b5d06f3a9888c0188dc06

`UpdateServiceInstance` creates/binds new backing services and unbinds/deletes old backing services. To keep the behavior consisten, also updated delete flow to delete backing services that the backing app are actually bound to. As part of making the new AT pass, moved delete backing services step to before deleting backing app. Connects to #293

view details

push time in a month

Pull request review commentspring-cloud/spring-cloud-app-broker

`UpdateServiceInstance` creates new backing services and/or deletes old backing services

 		return Mono.empty(); 	} +	default Mono<GetApplicationResponse> get(GetApplicationRequest request) {

yep, agreed. I wasn't looking at the whole file, so missed the other methods are the same. Thanks.

LittleBaiBai

comment created time in a month

Pull request review commentspring-cloud/spring-cloud-app-broker

`UpdateServiceInstance` creates new backing services and/or deletes old backing services

 public AppDeploymentUpdateServiceInstanceWorkflow(BrokeredServices brokeredServi 			.flatMap(backingServices -> 				servicesParametersTransformationService.transformParameters(backingServices, 					request.getParameters()))-			.flatMapMany(backingServicesProvisionService::updateServiceInstance)+			.flatMap(backingServices -> Flux.fromIterable(backingServices)+				.collectMap(BackingService::getServiceInstanceName, Function.identity()))+			.zipWith(backingAppManagementService.getDeployedBackingApplications(request.getServiceInstanceId())+				.flatMapMany(Flux::fromIterable)+				.map(BackingApplication::getServices)+				.flatMap(Flux::fromIterable)+				.distinct()+				.map(servicesSpec -> BackingService.builder()+					.serviceInstanceName(servicesSpec.getServiceInstanceName())+					.build())+				.collectMap(BackingService::getServiceInstanceName, Function.identity()))+			.flatMapMany(newAndExisting -> {

that looks much more reactive! :)

LittleBaiBai

comment created time in a month

Pull request review commentspring-cloud/spring-cloud-app-broker

`UpdateServiceInstance` creates new backing services and/or deletes old backing services

+/*+ * Copyright 2002-2019 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.appbroker.deployer;++import java.util.HashMap;+import java.util.Map;++import org.springframework.util.CollectionUtils;++public class GetApplicationRequest {++	private final String name;++	private final Map<String, String> properties;

Understood. I like consistency. Maybe this should be something we reconsider in 2.x? String is still limiting for storing numeric values (unless you store them as strings), regardless of needing to nest properties.

LittleBaiBai

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Stop publishing acceptance-tests and sample app jar

We do this in bamboo for SCOSB using the following command:

-x :spring-cloud-open-service-broker-acceptance-webmvc:artifactoryPublish -x :spring-cloud-open-service-broker-acceptance-webflux:artifactoryPublish```
maybe we can do the same for app broker?
Albertoimpl

comment created time in a month

create barnchspring-cloud/spring-cloud-app-broker

branch : boot-upgrade

created branch time in a month

issue commentspring-cloud/spring-cloud-app-broker

Document that the default behaviour of ServiceInstanceStateRepository

maybe we should just make the default and in memory mongo db and use the reactive support. that would solve all these issues.

Albertoimpl

comment created time in a month

issue commentspring-cloud/spring-cloud-app-broker

Document that the default behaviour of ServiceInstanceStateRepository

Yep, looks good! We need to include the note in the reference docs, and probably the java doc as well, so no one misses it.

Albertoimpl

comment created time in a month

more