Skip to content

Releasing new BrokerAPI major version

Felisia Martini edited this page Apr 6, 2021 · 2 revisions

Creating a new major version will mean more work for you and for any consuming clients. Always make sure that there is no other way to make the change non-breaking before committing to a new major version.

  1. Identify that you really need a new major version. Remember: We support only one major version at a time.
  2. Update go.mod module to be the next version:
module github.com/pivotal-cf/brokerapi/v9

Read more about major versions here

  1. Now all in code imports need to be updated to point to v9. It can be done manually, but that's what machines were invented for. You can use tools like mod that update all import statements. You can find the tool here.

After installing it run:

mod upgrade --mod-name=github.com/pivotal-cf/brokerapi/v8

This will update all /v8 imports to /v9 imports.

E.g. Before:

import (
    "github.com/pivotal-cf/brokerapi/v8"
)

After:

import (
    "github.com/pivotal-cf/brokerapi/v9"
)
  1. Create a new release in Github with the new version and release notes.
  2. Update BrokerAPI in all places we use it. In the order that they need to be changed, those are:
  • on-demand-services-sdk
  • kafka-example-service-adapter (cascade SDK update)
  • redis-example-service-adapter (cascade SDK update)
  • on-demand-broker (update both BrokerAPI and SDK)

You can find a more comprehensive map of dependencies here

On each repo you should run

## This will add the new version to `go.mod`
> go get github.com/pivotal-cf/brokerapi/[email protected]

## If needed 
> go mod vendor 

## This will update all import statement to refer to v9 rather than v8 
> mod upgrade --mod-name=github.com/pivotal-cf/brokerapi/v8  

## This should remove the previous version from `go.mod`
> go mod tidy 
Clone this wiki locally