Skip to content

@sbrossie sbrossie released this Jul 13, 2018 · 189 commits to master since this release

Overview

The release 0.20.0 is now the official release supported by the Kill Bill team. It is a large release that contains a lot of improvements all across the board. These release notes provide a non exhaustive list of all the changes that happened, but instead they provide an overview of all these changes. While we don't expect major issues during upgrade from 0.18.x releases to 0.20.x, we do advise users, teams, companies to treat this upgrade with some amount of caution, i.e run some solid regression testing matching your specific use case and report issues if any.

Code Changes and Tasks/Bugs

Summary of the Changes

Features

Account

  • Ability to modify account reference time -- used to improve determinism of when things things (events) happen on a per-account level

Catalog

  • Allow to bill in-advance and in-arrear (Plan level) within one catalog
  • Rework catalog apis
  • Catalog plugin api improvements (usage sections, ability to control caching, ability to server per account/catalogs)
  • Add pretty name for catalog Plan, Product, ..

Invoice

  • Added AUTO_INVOICING_DRAFT and AUTO_INVOICING_REUSE_DRAFT for advanced invoicing use cases
  • Service period for external charges
  • New API to create TAX items
  • Ability to void invoices
  • Ability to search invoices by start and end date
  • Add api to commit HA invoices prior end of day

Subscription/Entitlement

  • Ability to specify a target phase type when changing plans

Payment

  • Ability to retrieve all payment methods/account
  • Enhancement for payment control plugin apis

Usage

  • Capture usage info during invoicing and provide both a DETAIL/DETAIL mode to control behavior
  • Add new TOP_TIER consumable in arrear policy

Bugs Fixed

The following list is solely taking into account bugs that were filed against the main killbill repo:

API/Documentation

One of the large focus in this release was around api and documentation. The following blog post summarizes the work we have done in that respect. One important piece is the new api documentation.

Platform Improvements

In each release we spend some amount of times working on performance: In this release specifically, we have reworked the catalog layer -- reduce number of calls, improve caching -- and the entitlement/subscription layer to also remove database calls, leading to some performance improvements.

With more and more emphasis on privacy in the industry, we have also worked done some work and created a new Logging and GDPR section.

In terms of deployments/ops, we have done a lot of work.

Plugins

We have worked on our base plugin frameworks, see java plugin framework to provide solid foundation to write plugins. This includes reworking some of our plugin apis, addressing plugin ordering, providing support to handling (retrying) failed bus events, ...

Upgrade from 0.18.21 to 0.20.0

Database Upgrade

Migrating database schema is documenting here, and in a nutshell this consists of running the following command to get the ddl changes:

> kpm migrations killbill killbill-0.18.21 killbill-0.20.0

However, due to a slight mistake we have corrected in this commit, we provide the corrected output below:

DROP TABLE IF EXISTS catalog_override_usage_definition;
 create table catalog_override_usage_definition
 (
 record_id serial unique,
 parent_usage_name varchar(255) NOT NULL,
 type varchar(255) NOT NULL,
 fixed_price decimal(15,9) NULL,
 recurring_price decimal(15,9) NULL,
 currency varchar(3) NOT NULL,
 effective_date datetime NOT NULL,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_usage_definition_idx ON catalog_override_usage_definition(tenant_record_id, parent_usage_name, currency);


 DROP TABLE IF EXISTS catalog_override_tier_definition;
 create table catalog_override_tier_definition
 (
 record_id serial unique,
 fixed_price decimal(15,9) NULL,
 recurring_price decimal(15,9) NULL,
 currency varchar(3) NOT NULL,
 effective_date datetime NOT NULL,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_tier_definition_idx ON catalog_override_usage_definition(tenant_record_id, currency);

 DROP TABLE IF EXISTS catalog_override_block_definition;
 create table catalog_override_block_definition
 (
 record_id serial unique,
 parent_unit_name varchar(255) NOT NULL,
 size decimal(15,9) NOT NULL,
 max decimal(15,9) NULL,
 currency varchar(3) NOT NULL,
 price decimal(15,9) NOT NULL,
 effective_date datetime NOT NULL,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_block_definition_idx ON catalog_override_block_definition(tenant_record_id, parent_unit_name, currency);


 DROP TABLE IF EXISTS catalog_override_phase_usage;
 create table catalog_override_phase_usage
 (
 record_id serial unique,
 usage_number int /*! unsigned */,
 usage_def_record_id  bigint /*! unsigned */ not null,
 target_phase_def_record_id bigint /*! unsigned */ not null,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_phase_usage_idx ON catalog_override_phase_usage(tenant_record_id, usage_number, usage_def_record_id);

 DROP TABLE IF EXISTS catalog_override_usage_tier;
 create table catalog_override_usage_tier
 (
 record_id serial unique,
 tier_number int /*! unsigned */,
 tier_def_record_id bigint /*! unsigned */ not null,
 target_usage_def_record_id bigint /*! unsigned */ not null,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_usage_tier_idx ON catalog_override_usage_tier(tenant_record_id, tier_number, tier_def_record_id);


 DROP TABLE IF EXISTS catalog_override_tier_block;
 create table catalog_override_tier_block
 (
 record_id serial unique,
 block_number int /*! unsigned */,
 block_def_record_id bigint /*! unsigned */ not null,
 target_tier_def_record_id bigint /*! unsigned */ not null,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ NOT NULL default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_tier_block_idx ON catalog_override_tier_block(tenant_record_id, block_number, block_def_record_id);alter table accounts modify external_key varchar(255) NOT NULL;
 alter table account_history modify external_key varchar(255) NOT NULL;
 drop index bundles_key on bundles;
 create unique index bundles_external_key on bundles(external_key, tenant_record_id);alter table tag_definitions add column applicable_object_types varchar(500) after name;
 alter table tag_definition_history add column applicable_object_types varchar(500) after name;
 alter table accounts add column reference_time datetime NOT NULL DEFAULT '1970-01-01 00:00:00' after payment_method_id;
 alter table account_history add column reference_time datetime NOT NULL DEFAULT '1970-01-01 00:00:00' after payment_method_id;
 update accounts set reference_time = created_date;
 update account_history set reference_time = created_date;alter table invoice_items add column quantity int after linked_item_id;
 alter table invoice_items add column item_details text after quantity;alter table bus_events modify event_json text not null;
 alter table bus_events_history modify event_json text not null;
 alter table notifications modify event_json text not null;
 alter table notifications_history modify event_json text not null;
 alter table bus_ext_events modify event_json text not null;
 alter table bus_ext_events_history modify event_json text not null;
 alter table invoice_items add column product_name varchar(255) after description;
 alter table accounts drop column is_notified_for_invoices;
 alter table account_history drop column is_notified_for_invoices;

Clients

Lots of api changes have happened to any application making api calls to killbill should be upgraded to use the new clients -- note that some of these clients are now automatically generated through swagger and so you should expect some significant api changes.

Plugins

All the Kill Bill plugins, the one maintained on our GH account, have been updated to work against 0.20. If you have any custom plugin, you will need to update your dependencies, potentially fix the code for api changes, rebuild, and test, test...

Below are the links that track the api changes for Kill Bill API and plugin API:

Note that for the Kill Bill plugins DLL changes may have occurred and will need to run the kpm migration tool to find out.

Assets 2
You can’t perform that action at this time.